摘要: Lowest Common Ancestor of a Binary Search TreeGiven a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.Ac... 阅读全文
posted @ 2015-07-11 17:27 Eason Liu 阅读(1675) 评论(0) 推荐(0) 编辑
摘要: Palindrome Linked ListGiven a singly linked list, determine if it is a palindrome.Follow up:Could you do it in O(n) time and O(1) space?将链表拆成两半,后一半反转后... 阅读全文
posted @ 2015-07-11 17:12 Eason Liu 阅读(200) 评论(0) 推荐(0) 编辑