ARTS #164 Algorithm 本周选择的算法题是:partition-list。 规则 Given the head of a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should prese... 2022-07-235 min read
ARTS #163 Algorithm 本周选择的算法题是:Max Area of Island。 规则 You are given an m x n binary matrix grid. An island is a group of 1’s (representing land) connected 4-directionally (horizontal or vertical.) You may ... 2022-07-167 min read
ARTS #162 Algorithm 本周选择的算法题是:Interleaving String。 规则 Given strings s1, s2, and s3, find whether s3 is formed by an interleaving of s1 and s2. An interleaving of two strings s and t is a configuration wh... 2022-07-106 min read
ARTS #161 Algorithm 本周选择的算法题是:Minimum Moves to Equal Array Elements II。 规则 Given an integer array nums of size n, return the minimum number of moves required to make all array elements equal. In one move... 2022-07-035 min read
ARTS #160 Algorithm 本周选择的算法题是:Construct Target Array With Multiple Sums。 规则 You are given an array target of n integers. From a starting array arr consisting of n 1’s, you may perform the following proced... 2022-06-265 min read
ARTS #159 Algorithm 本周选择的算法题是:Number of 1 Bits。 规则 Write a function that takes an unsigned integer and returns the number of ‘1’ bits it has (also known as the Hamming weight). Note: Note that in som... 2022-06-194 min read
ARTS #158 Algorithm 本周选择的算法题是:Remove Palindromic Subsequences。 规则 You are given a string s consisting only of letters 'a' and 'b'. In a single step you can remove one palindromic subsequence from s. Retu... 2022-06-125 min read
ARTS #157 Algorithm 本周选择的算法题是:transpose-matrix。 规则 Given a 2D integer array matrix, return the transpose of matrix. The transpose of a matrix is the matrix flipped over its main diagonal, switching the m... 2022-06-046 min read
ARTS #156 Algorithm 本周选择的算法题是:Number of Steps to Reduce a Number to Zero。 规则 Given an integer num, return the number of steps to reduce it to zero. In one step, if the current number is even, you have to... 2022-05-294 min read
ARTS #155 Algorithm 本周选择的算法题是:Coin Change。 规则 You are given an integer array coins representing coins of different denominations and an integer amount representing a total amount of money. Return the few... 2022-05-225 min read