上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 34 下一页
摘要: Given a collection of numbers that might contain duplicates, return all possible unique permutations.For example,[1,1,2] have the following unique per... 阅读全文
posted @ 2014-05-17 16:11 linyx 阅读(166) 评论(0) 推荐(0) 编辑
摘要: Remove Duplicates from Sorted List IGiven a sorted linked list, delete all duplicates such that each element appear only once.For example,Given 1->1->... 阅读全文
posted @ 2014-05-17 14:46 linyx 阅读(142) 评论(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 o... 阅读全文
posted @ 2014-05-17 13:40 linyx 阅读(128) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.If the number of nodes is not a multiple of k then le... 阅读全文
posted @ 2014-05-17 13:18 linyx 阅读(130) 评论(0) 推荐(0) 编辑
摘要: Unique Binary Search Trees IGivenn, how many structurally uniqueBST's(binary search trees) that store values 1...n?For example,Givenn= 3, there are a ... 阅读全文
posted @ 2014-05-16 15:25 linyx 阅读(150) 评论(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 n... 阅读全文
posted @ 2014-05-16 15:06 linyx 阅读(212) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, remove the nth node from the end of list and return its head.For example,Given linked list: 1->2->3->4->5, and n = 2.After removi... 阅读全文
posted @ 2014-05-16 13:53 linyx 阅读(146) 评论(0) 推荐(0) 编辑
摘要: Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A solution using O(n) space is ... 阅读全文
posted @ 2014-05-15 21:50 linyx 阅读(272) 评论(0) 推荐(0) 编辑
摘要: Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo... 阅读全文
posted @ 2014-05-15 16:51 linyx 阅读(178) 评论(0) 推荐(0) 编辑
摘要: Given an unsorted integer array, find the first missing positive integer.For example,Given [1,2,0] return 3,and [3,4,-1,1] return 2.Your algorithm sho... 阅读全文
posted @ 2014-05-15 15:40 linyx 阅读(194) 评论(0) 推荐(0) 编辑
上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 34 下一页