摘要:
问题描述 Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2 阅读全文
摘要:
题目描述 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 阅读全文
摘要:
题目描述 Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST. Calling next() will return 阅读全文
摘要:
题目描述 Given a linked list, rotate the list to the right by k places, where k is non-negative. Example 1: Example 2: 参考答案 答案分析 分成三部分: 1. 链接首尾 2. 移动 3. 拆 阅读全文
摘要:
题目描述 Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. Exa 阅读全文