摘要:
题目: 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 阅读全文
摘要:
题目: Given n, how many structurally unique BST's (binary search trees) that store values 1 ... n? Example: 提交后显示运行时间超时。原来是代码中有太多重复迭代,如同求解斐波那契数列时的直接迭代解法 阅读全文
摘要:
题目: Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n). Example: Note: If the 阅读全文