上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 33 下一页
摘要: 题目: Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree is symmetric: But the 阅读全文
posted @ 2015-04-18 12:24 YRB 阅读(404) 评论(0) 推荐(0) 编辑
摘要: 题目: Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally identic 阅读全文
posted @ 2015-04-18 12:23 YRB 阅读(366) 评论(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 ... 阅读全文
posted @ 2015-04-18 12:22 YRB 阅读(631) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows: 链接:http://leetcode.com/problems/vali 阅读全文
posted @ 2015-04-18 12:21 YRB 阅读(1096) 评论(0) 推荐(0) 编辑
摘要: 题目:Givens1,s2,s3, find whethers3is formed by the interleaving ofs1ands2.For example,Given:s1="aabcc",s2="dbbca",Whens3="aadbbcbcac", return true.Whens... 阅读全文
posted @ 2015-04-18 12:20 YRB 阅读(427) 评论(0) 推荐(0) 编辑
摘要: 题目: Given n, how many structurally unique BST's (binary search trees) that store values 1...n? For example,Given n = 3, there are a total of 5 unique 阅读全文
posted @ 2015-04-18 12:19 YRB 阅读(401) 评论(0) 推荐(0) 编辑
摘要: 题目: Given n, generate all structurally unique BST's (binary search trees) that store values 1...n. For example,Given n = 3, your program should return 阅读全文
posted @ 2015-04-18 12:17 YRB 阅读(876) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a binary tree, return the inorder traversal of its nodes' values. For example:Given binary tree {1,#,2,3}, return [1,3,2]. 链接: http://leetco 阅读全文
posted @ 2015-04-18 12:16 YRB 阅读(530) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a string containing only digits, restore it by returning all possible valid IP address combinations. For example:Given "25525511135", return 阅读全文
posted @ 2015-04-18 12:15 YRB 阅读(848) 评论(0) 推荐(0) 编辑
摘要: 题目: Reverse a linked list from position m to n. Do it in-place and in one-pass. For example:Given 1->2->3->4->5->NULL, m = 2 and n = 4, return 1->4->3 阅读全文
posted @ 2015-04-18 12:13 YRB 阅读(547) 评论(0) 推荐(0) 编辑
上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 33 下一页