ARTS #30 Algorithm 本周选择的算法题是:Combination Sum 规则如下: Given a set of candidate numbers (candidates) (without duplicates) and a target number (target), find all unique combinations in candidates where the ca... 2019-12-289 min read
ARTS #29 Algorithm 本周选择的算法题是:Plus One 规则如下: Given a non-empty array of digits representing a non-negative integer, plus one to the integer. The digits are stored such that the most significant digit is ... 2019-12-217 min read
ARTS #28 Algorithm 本周选择的算法题是:Find First and Last Position of Element in Sorted Array 规则如下: Given an array of integers nums sorted in ascending order, find the starting and ending position of a given targ... 2019-12-143 min read
ARTS #27 Algorithm 本周选择的算法题是:Search in Rotated Sorted Array 规则如下: Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,1,2,4,5,6,7] might become [4,5,... 2019-12-074 min read
ARTS #26 Algorithm 本周选择的算法题是:Next Permutation 规则如下: Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possib... 2019-11-303 min read
ARTS #25 Algorithm 本周选择的算法题是:Remove Element 规则如下: Given an array nums and a value val, remove all instances of that value in-place and return the new length. Do not allocate extra space for another arra... 2019-11-234 min read
ARTS #24 Algorithm 本周选择的算法题是:4Sum 规则如下: Given an array nums of n integers and an integer target, are there elements a, b, c, and d in nums such that a + b + c + d = target? Find all unique quadruplets in... 2019-11-165 min read
ARTS #23 Algorithm 本周选择的算法题是:Search Insert Position 规则如下: Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted ... 2019-11-097 min read
ARTS #22 Algorithm 本周选择的算法题是:Longest Valid Parentheses 规则如下: Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. Example ... 2019-11-025 min read
ARTS #21 Algorithm 本周选择的算法题是:Remove Duplicates From Sorted Array 规则如下: Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length. Do not... 2019-10-266 min read