08 2020 档案

摘要:Given a non-empty 2D array grid of 0's and 1's, an island is a group of 1's (representing land) connected 4-directionally (horizontal or vertical.) Yo 阅读全文
posted @ 2020-08-31 01:43 苗妙苗 阅读(131) 评论(0) 推荐(0)
摘要:Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of a sequentially adjacent cells, where "ad 阅读全文
posted @ 2020-08-29 00:12 苗妙苗 阅读(189) 评论(0) 推荐(0)
摘要:Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacen 阅读全文
posted @ 2020-08-27 10:24 苗妙苗 阅读(133) 评论(0) 推荐(0)
摘要:Given a non-empty 2D array grid of 0's and 1's, an island is a group of 1's (representing land) connected 4-directionally (horizontal or vertical.) Yo 阅读全文
posted @ 2020-08-26 23:15 苗妙苗 阅读(161) 评论(0) 推荐(0)
摘要:Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. Example: I 阅读全文
posted @ 2020-08-15 11:14 苗妙苗 阅读(101) 评论(0) 推荐(0)
摘要:Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numb 阅读全文
posted @ 2020-08-13 23:17 苗妙苗 阅读(158) 评论(0) 推荐(0)
摘要:Given a set of candidate numbers (candidates) (without duplicates) and a target number (target), find all unique combinations in candidates where the 阅读全文
posted @ 2020-08-11 23:25 苗妙苗 阅读(177) 评论(0) 推荐(0)
摘要:Given a collection of numbers that might contain duplicates, return all possible unique permutations. Example: Input: [1,1,2] Output: [ [1,1,2], [1,2, 阅读全文
posted @ 2020-08-11 07:50 苗妙苗 阅读(100) 评论(0) 推荐(0)
摘要:Given a collection of distinct integers, return all possible permutations. Example: Input: [1,2,3] Output: [ [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1, 阅读全文
posted @ 2020-08-10 07:31 苗妙苗 阅读(183) 评论(0) 推荐(0)
摘要:Given a collection of integers that might contain duplicates, nums, return all possible subsets (the power set). Note: The solution set must not conta 阅读全文
posted @ 2020-08-07 10:37 苗妙苗 阅读(155) 评论(0) 推荐(0)
摘要:Given a nested list of integers, return the sum of all integers in the list weighted by their depth. Each element is either an integer, or a list -- w 阅读全文
posted @ 2020-08-04 10:46 苗妙苗 阅读(119) 评论(0) 推荐(0)
摘要:Implement an iterator to flatten a 2d vector. Example: Input: 2d vector = [ [1,2], [3], [4,5,6] ] Output: [1,2,3,4,5,6] Explanation: By calling next r 阅读全文
posted @ 2020-08-04 07:49 苗妙苗 阅读(107) 评论(0) 推荐(0)
摘要:Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the arr 阅读全文
posted @ 2020-08-03 01:16 苗妙苗 阅读(115) 评论(0) 推荐(0)
摘要:Given an array of n positive integers and a positive integer s, find the minimal length of a contiguous subarray of which the sum ≥ s. If there isn't 阅读全文
posted @ 2020-08-02 11:07 苗妙苗 阅读(147) 评论(0) 推荐(0)
摘要:Given a string s and a non-empty string p, find all the start indices of p's anagrams in s. Strings consists of lowercase English letters only and the 阅读全文
posted @ 2020-08-01 10:24 苗妙苗 阅读(129) 评论(0) 推荐(0)