上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 33 下一页
摘要: Given N pairs of parentheses “()”, return a list with all the valid permutations. Assumptions N > 0 Examples N = 1, all valid permutations are ["()"] 阅读全文
posted @ 2020-02-16 11:00 xuan_abc 阅读(148) 评论(0) 推荐(0)
摘要: Given a string, remove all leading/trailing/duplicated empty spaces. Assumptions: The given string is not null. Examples: “ a” --> “a” “ I love MTV ” 阅读全文
posted @ 2020-02-16 05:57 xuan_abc 阅读(113) 评论(0) 推荐(0)
摘要: Given a matrix of size N x M. For each row the elements are sorted in ascending order, and for each column the elements are also sorted in ascending o 阅读全文
posted @ 2020-02-16 04:04 xuan_abc 阅读(109) 评论(0) 推荐(0)
摘要: Given a string, sort it in decreasing order based on the frequency of characters. Example 1: Input: "tree" Output: "eert" Explanation: 'e' appears twi 阅读全文
posted @ 2020-02-16 00:33 xuan_abc 阅读(164) 评论(0) 推荐(0)
摘要: Given a non-empty array of integers, return the k most frequent elements. Example 1: Input: nums = [1,1,1,2,2,3], k = 2 Output: [1,2] Example 2: Input 阅读全文
posted @ 2020-02-15 23:37 xuan_abc 阅读(129) 评论(0) 推荐(0)
摘要: Given an array nums sorted in ascending order, return true if and only if you can split it into 1 or more subsequences such that each subsequence cons 阅读全文
posted @ 2020-02-14 12:46 xuan_abc 阅读(148) 评论(0) 推荐(0)
摘要: You are given a doubly linked list which in addition to the next and previous pointers, it could have a child pointer, which may or may not point to a 阅读全文
posted @ 2020-02-14 11:01 xuan_abc 阅读(95) 评论(0) 推荐(0)
摘要: Design an algorithm to encode a list of strings to a string. The encoded string is then sent over the network and is decoded back to the original list 阅读全文
posted @ 2020-02-14 10:43 xuan_abc 阅读(145) 评论(0) 推荐(0)
摘要: You are given two integer arrays nums1 and nums2 sorted in ascending order and an integer k. Define a pair (u,v) which consists of one element from th 阅读全文
posted @ 2020-02-13 12:07 xuan_abc 阅读(91) 评论(0) 推荐(0)
摘要: Given a list of words, each word consists of English lowercase letters. Let's say word1 is a predecessor of word2 if and only if we can add exactly on 阅读全文
posted @ 2020-02-13 10:48 xuan_abc 阅读(146) 评论(0) 推荐(0)
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 33 下一页