上一页 1 ··· 5 6 7 8 9 10 11 12 下一页
摘要: The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1 is read off as "one 1" or 11... 阅读全文
posted @ 2012-11-14 17:00 程序员杰诺斯 阅读(111) 评论(0) 推荐(0)
摘要: Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.由于链表不能随机访问,只能修改链表结构,要不就只能... 阅读全文
posted @ 2012-11-14 16:41 程序员杰诺斯 阅读(96) 评论(0) 推荐(0)
摘要: Given an array where elements are sorted in ascending order, convert it to a height balanced BST.平分,递归。/** * Definition for binary tre... 阅读全文
posted @ 2012-11-14 16:32 程序员杰诺斯 阅读(89) 评论(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 th... 阅读全文
posted @ 2012-11-14 16:13 程序员杰诺斯 阅读(120) 评论(0) 推荐(0)
摘要: Given preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree... 阅读全文
posted @ 2012-11-14 15:14 程序员杰诺斯 阅读(97) 评论(0) 推荐(0)
摘要: Construct Binary Tree from Inorder and Postorder TraversalGiven inorder and postorder traversal of a tree, construct the binary tree.N... 阅读全文
posted @ 2012-11-08 18:52 程序员杰诺斯 阅读(109) 评论(0) 推荐(0)
摘要: Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sum... 阅读全文
posted @ 2012-11-08 16:52 程序员杰诺斯 阅读(101) 评论(0) 推荐(0)
摘要: Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.... 阅读全文
posted @ 2012-11-08 16:33 程序员杰诺斯 阅读(85) 评论(0) 推荐(0)
摘要: You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ... 阅读全文
posted @ 2012-11-06 17:13 程序员杰诺斯 阅读(78) 评论(0) 推荐(0)
摘要: Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the... 阅读全文
posted @ 2012-11-06 16:09 程序员杰诺斯 阅读(159) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 12 下一页