上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 49 下一页
摘要: Implement the following operations of a stack using queues. push(x) -- Push element x onto stack. pop() -- Removes the element on top of the stack. to 阅读全文
posted @ 2017-10-24 20:50 daniel456 阅读(94) 评论(0) 推荐(0)
摘要: Implement a trie with insert, search, and startsWith methods. 题目含义:实现字典树的insert, search, 和startsWith 方法 字典树概念参考http://blog.csdn.net/u012501459/article 阅读全文
posted @ 2017-10-24 20:41 daniel456 阅读(109) 评论(0) 推荐(0)
摘要: Suppose you have N integers from 1 to N. We define a beautiful arrangement as an array that is constructed by these N numbers successfully if one of t 阅读全文
posted @ 2017-10-24 20:38 daniel456 阅读(139) 评论(0) 推荐(0)
摘要: A binary watch has 4 LEDs on the top which represent the hours (0-11), and the 6 LEDs on the bottom represent the minutes (0-59). Each LED represents 阅读全文
posted @ 2017-10-24 20:19 daniel456 阅读(97) 评论(0) 推荐(0)
摘要: Given a collection of distinct numbers, return all possible permutations. For example,[1,2,3] have the following permutations: [ [1,2,3], [1,3,2], [2, 阅读全文
posted @ 2017-10-24 20:08 daniel456 阅读(118) 评论(0) 推荐(0)
摘要: Given a list, rotate the list to the right by k places, where k is non-negative. For example:Given 1->2->3->4->5->NULL and k = 2,return 4->5->1->2->3- 阅读全文
posted @ 2017-10-24 16:56 daniel456 阅读(77) 评论(0) 推荐(0)
摘要: Given a linked list, return the node where the cycle begins. If there is no cycle, return null. Note: Do not modify the linked list. 题目含义:判断列表是否有环路,如果 阅读全文
posted @ 2017-10-24 16:47 daniel456 阅读(184) 评论(0) 推荐(0)
摘要: Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve the 阅读全文
posted @ 2017-10-24 16:44 daniel456 阅读(106) 评论(0) 推荐(0)
摘要: Given a singly linked list, determine if it is a palindrome. 题目含义:给定一个单列表,判断是否构成回文 阅读全文
posted @ 2017-10-24 16:28 daniel456 阅读(121) 评论(0) 推荐(0)
摘要: Given a linked list, remove the nth node from the end of list and return its head. For example, Note:Given n will always be valid.Try to do this in on 阅读全文
posted @ 2017-10-24 16:26 daniel456 阅读(97) 评论(0) 推荐(0)
上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 49 下一页