摘要: Unique Binary Search Trees IGivenn, how many structurally uniqueBST's(binary search trees) that store values 1...n?For example,Givenn= 3, there are a ... 阅读全文
posted @ 2014-05-16 15:25 linyx 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 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... 阅读全文
posted @ 2014-05-16 15:06 linyx 阅读(212) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, remove the nth node from the end of list and return its head.For example,Given linked list: 1->2->3->4->5, and n = 2.After removi... 阅读全文
posted @ 2014-05-16 13:53 linyx 阅读(146) 评论(0) 推荐(0) 编辑