摘要:
题目: Reverse a linked list. Example For linked list 1->2->3, the reversed linked list is 3->2->1 For linked list 1->2->3, the reversed linked list is 3 阅读全文
摘要:
题目: Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. Example Given 1->2 阅读全文
摘要:
题目: Given a sorted linked list, delete all duplicates such that each element appear only once. Example Given 1->1->2, return 1->2.Given 1->1->2->3->3, 阅读全文
摘要:
题目: Given a root of Binary Search Tree with unique value for each node. Remove the node with given value. If there is no such a node with given value 阅读全文
摘要:
题目: Given two values k1 and k2 (where k1 < k2) and a root pointer to a Binary Search Tree. Find all the keys of tree in range k1 to k2. i.e. print all 阅读全文
摘要:
题目: 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 阅读全文