上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 77 下一页
摘要: 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 苗妙苗 阅读(96) 评论(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 苗妙苗 阅读(179) 评论(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 苗妙苗 阅读(149) 评论(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 苗妙苗 阅读(115) 评论(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 苗妙苗 阅读(97) 评论(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 苗妙苗 阅读(112) 评论(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 苗妙苗 阅读(145) 评论(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 苗妙苗 阅读(124) 评论(0) 推荐(0) 编辑
摘要: Given a string s , find the length of the longest substring t that contains at most 2 distinct characters. Example 1: Input: "eceba" Output: 3 Explana 阅读全文
posted @ 2020-07-31 23:22 苗妙苗 阅读(123) 评论(0) 推荐(0) 编辑
摘要: Given a string, find the length of the longest substring without repeating characters. Example 1: Input: "abcabcbb" Output: 3 Explanation: The answer 阅读全文
posted @ 2020-07-31 11:19 苗妙苗 阅读(131) 评论(0) 推荐(0) 编辑
上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 77 下一页