摘要: 问题描述:Givenn, how many structurally uniqueBST's(binary search trees) that store values 1...n?For example,Givenn= 3, there are a total of 5 unique BST's... 阅读全文
posted @ 2015-03-21 21:35 学而~ 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 问题描述Given a binary tree, return thepreordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,2,3]... 阅读全文
posted @ 2015-03-21 20:45 学而~ 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 问题描述:Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra space ... 阅读全文
posted @ 2015-03-21 20:24 学而~ 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 问题描述:Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the t... 阅读全文
posted @ 2015-03-21 16:49 学而~ 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 问题描述Given a linked list, return the node where the cycle begins. If there is no cycle, returnnull.Follow up:Can you solve it without using extra space... 阅读全文
posted @ 2015-03-21 14:34 学而~ 阅读(204) 评论(0) 推荐(0) 编辑