码迷,mamicode.com
首页 >  
搜索关键字:leedcode    ( 225个结果
[leedcode 98] Validate Binary Search Tree
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...
分类:其他好文   时间:2015-07-17 00:06:41    阅读次数:160
[leedcode 97] Interleaving String
Givens1,s2,s3, find whethers3is formed by the interleaving ofs1ands2.For example,Given:s1="aabcc",s2="dbbca",Whens3="aadbbcbcac", return true.Whens3="...
分类:其他好文   时间:2015-07-16 23:54:13    阅读次数:100
[leedcode 96] Unique Binary Search Trees II
Givenn, generate all structurally uniqueBST's(binary search trees) that store values 1...n.For example,Givenn= 3, your program should return all 5 uni...
分类:其他好文   时间:2015-07-16 21:53:43    阅读次数:121
[leedcode 94] Binary Tree Inorder Traversal
Given a binary tree, return theinordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,3,2].Note...
分类:其他好文   时间:2015-07-16 19:22:38    阅读次数:130
[leedcode 92] Reverse Linked List II
Reverse a linked list from positionmton. Do it in-place and in one-pass.For example:Given1->2->3->4->5->NULL,m= 2 andn= 4,return1->4->3->2->5->NULL.No...
分类:其他好文   时间:2015-07-16 18:23:01    阅读次数:123
[leedcode 91] Decode Ways
A message containing letters fromA-Zis being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given an encoded message conta...
分类:其他好文   时间:2015-07-16 16:24:34    阅读次数:101
[leedcode 90] Subsets II
Given a collection of integers that might contain duplicates,nums, return all possible subsets.Note:Elements in a subset must be in non-descending ord...
分类:其他好文   时间:2015-07-16 13:43:52    阅读次数:133
[leedcode 88] Merge Sorted Array
Given two sorted integer arraysnums1andnums2, mergenums2intonums1as one sorted array.Note:You may assume thatnums1has enough space (size that is great...
分类:其他好文   时间:2015-07-16 13:35:36    阅读次数:92
[leedcode 87] Scramble String
Given a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representation...
分类:其他好文   时间:2015-07-16 00:36:56    阅读次数:151
[leedcode 86] Partition List
Given a linked list and a valuex, partition it such that all nodes less thanxcome before nodes greater than or equal tox.You should preserve the origi...
分类:其他好文   时间:2015-07-16 00:24:56    阅读次数:92
225条   上一页 1 ... 13 14 15 16 17 ... 23 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!