摘要: 96: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.1... 阅读全文
posted @ 2015-05-26 13:44 爱刷题的小盒子 阅读(1668) 评论(0) 推荐(0) 编辑
摘要: 2.6Given a circular linked list,implement an algorithm which returns the node at the beginning of the loop. 快指针和慢指针一起在头指针开始移动,快指针每次移动两步,慢指针每次移动一步,直到相遇... 阅读全文
posted @ 2015-05-10 14:09 爱刷题的小盒子 阅读(394) 评论(0) 推荐(0) 编辑
摘要: 2.5 You have two numbers represented by a linked list, where each node contains a single digit. The digits are stored in reverse order, such that the ... 阅读全文
posted @ 2015-05-10 11:59 爱刷题的小盒子 阅读(191) 评论(0) 推荐(0) 编辑