摘要: 题目:Reverse a singly linked list.代码:看不懂,我已经没救了 1 public ListNode reverseList(ListNode head) { 2 if (head == null) return head; 3 Li... 阅读全文
posted @ 2015-08-10 13:41 Hygeia 阅读(102) 评论(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 阅读全文
posted @ 2015-08-10 07:22 Hygeia 阅读(164) 评论(0) 推荐(0)
摘要: 题目:Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.Callingnext()will return the n... 阅读全文
posted @ 2015-08-10 06:13 Hygeia 阅读(241) 评论(0) 推荐(0)