摘要:https://leetcode.com/problems/combination-sum/Given a set of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the ...
阅读全文
随笔分类 - LeetCode
摘要:https://leetcode.com/problems/count-and-say/The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1i...
阅读全文
摘要:https://leetcode.com/problems/divide-two-integers/Divide two integers without using multiplication, division and mod operator.If it is overflow, retur...
阅读全文
摘要:https://leetcode.com/problems/search-for-a-range/Given a sorted array of integers, find the starting and ending position of a given target value.Your ...
阅读全文
摘要:https://leetcode.com/problems/pascals-triangle-ii/Given an indexk, return thekthrow of the Pascal's triangle.For example, givenk= 3,Return[1,3,3,1].No...
阅读全文
摘要:https://leetcode.com/problems/pascals-triangle/GivennumRows, generate the firstnumRowsof Pascal's triangle.For example, givennumRows= 5,Return[ [1...
阅读全文
摘要:https://leetcode.com/problems/restore-ip-addresses/ Given a string containing only digits, restore it by returning all possible valid IP address combi
阅读全文
摘要:https://leetcode.com/problems/word-search/Given a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of...
阅读全文
摘要:https://leetcode.com/problems/find-minimum-in-rotated-sorted-array-ii/Follow upfor "Find Minimum in Rotated Sorted Array":What ifduplicatesare allowed...
阅读全文
摘要:https://leetcode.com/problems/set-matrix-zeroes/Given amxnmatrix, if an element is 0, set its entire row and column to 0. Do it in place.click to show...
阅读全文
摘要:https://leetcode.com/problems/search-a-2d-matrix/Write an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following ...
阅读全文
摘要:https://leetcode.com/problems/plus-one/Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored suc...
阅读全文
摘要:https://leetcode.com/problems/search-in-rotated-sorted-array-ii/ Follow up for "Search in Rotated Sorted Array":What if duplicates are allowed? Would
阅读全文
摘要:https://leetcode.com/problems/search-in-rotated-sorted-array/Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e.,0 1 2 4 5...
阅读全文
摘要:https://leetcode.com/problems/rotate-image/You are given annxn2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Cou...
阅读全文
摘要:https://leetcode.com/problems/populating-next-right-pointers-in-each-node-ii/ Follow up for problem "Populating Next Right Pointers in Each Node". Wha
阅读全文
摘要:https://leetcode.com/problems/gray-code/The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negati...
阅读全文
摘要:https://oj.leetcode.com/problems/find-peak-element/ A peak element is an element that is greater than its neighbors. Given an input array where num[i]
阅读全文
摘要:https://oj.leetcode.com/problems/permutations/Given a collection of numbers, return all possible permutations.For example,[1,2,3]have the following pe...
阅读全文
摘要:https://oj.leetcode.com/problems/next-permutation/Implement next permutation, which rearranges numbers into the lexicographically next greater permuta...
阅读全文

浙公网安备 33010602011771号