摘要: 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 @ 2019-10-13 04:36 xuan_abc 阅读(115) 评论(0) 推荐(0)
摘要: Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n). Example: Input: S = "ADOB 阅读全文
posted @ 2019-10-12 11:57 xuan_abc 阅读(128) 评论(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 @ 2019-10-11 11:45 xuan_abc 阅读(141) 评论(0) 推荐(0)
摘要: Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the s 阅读全文
posted @ 2019-10-11 10:12 xuan_abc 阅读(136) 评论(0) 推荐(0)
摘要: Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: Op 阅读全文
posted @ 2019-10-10 10:54 xuan_abc 阅读(136) 评论(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 @ 2019-09-27 11:20 xuan_abc 阅读(137) 评论(0) 推荐(0)
摘要: Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows: The left subtree of a node contains only 阅读全文
posted @ 2019-09-25 20:31 xuan_abc 阅读(116) 评论(0) 推荐(0)
摘要: Remove all elements from a linked list of integers that have value val. Example: 阅读全文
posted @ 2019-09-25 11:32 xuan_abc 阅读(96) 评论(0) 推荐(0)
摘要: Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as: a binary tree in which the dep 阅读全文
posted @ 2019-09-25 11:27 xuan_abc 阅读(127) 评论(0) 推荐(0)
摘要: Given a non-empty list of words, return the k most frequent elements. Your answer should be sorted by frequency from highest to lowest. If two words h 阅读全文
posted @ 2019-09-24 11:40 xuan_abc 阅读(161) 评论(0) 推荐(0)