上一页 1 ··· 39 40 41 42 43 44 45 46 47 ··· 76 下一页
摘要: 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 @ 2018-10-14 10:42 bernieloveslife 阅读(71) 评论(0) 推荐(0)
摘要: Given a linked list, swap every two adjacent nodes and return its head. Example: Given 1 2 3 4, you should return the list as 2 1 4 3. Note: Your algo 阅读全文
posted @ 2018-10-14 10:42 bernieloveslife 阅读(85) 评论(0) 推荐(0)
摘要: Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Example: Input: [ 1 4 5, 1 3 4, 2 6 ] Output: 1 1 2 阅读全文
posted @ 2018-10-14 10:42 bernieloveslife 阅读(92) 评论(0) 推荐(0)
摘要: You are given a license key represented as a string S which consists only alphanumeric character and dashes. The string is separated into N+1 groups b 阅读全文
posted @ 2018-10-13 10:19 bernieloveslife 阅读(120) 评论(0) 推荐(0)
摘要: We are playing the Guess Game. The game is as follows: I pick a number from 1 to n. You have to guess which number I picked. Every time you guess wron 阅读全文
posted @ 2018-10-13 10:19 bernieloveslife 阅读(134) 评论(0) 推荐(0)
摘要: Given an array A of non negative integers, return an array consisting of all the even elements of A, followed by all the odd elements of A. You may re 阅读全文
posted @ 2018-10-13 10:18 bernieloveslife 阅读(166) 评论(0) 推荐(0)
摘要: Given a non empty string check if it can be constructed by taking a substring of it and appending multiple copies of the substring together. You may a 阅读全文
posted @ 2018-10-13 10:18 bernieloveslife 阅读(105) 评论(0) 推荐(0)
摘要: Given n non negative integers a1, a2, ..., an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endp 阅读全文
posted @ 2018-10-13 10:18 bernieloveslife 阅读(106) 评论(0) 推荐(0)
摘要: Given a binary search tree (BST) with duplicates, find all the mode(s) (the most frequently occurred element) in the given BST. Assume a BST is define 阅读全文
posted @ 2018-10-12 10:59 bernieloveslife 阅读(231) 评论(0) 推荐(0)
摘要: Design a class to find the kth largest element in a stream. Note that it is the kth largest element in the sorted order, not the kth distinct element. 阅读全文
posted @ 2018-10-12 10:59 bernieloveslife 阅读(280) 评论(0) 推荐(0)
上一页 1 ··· 39 40 41 42 43 44 45 46 47 ··· 76 下一页