摘要:
先上题目 Given two words (beginWord and endWord), and a dictionary's word list, find the length of shortest transformation sequence from beginWord to endW 阅读全文
摘要:
题目 Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transact 阅读全文
摘要:
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. For example, given the fo 阅读全文
摘要:
题目: 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 s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2. For example,Given:s1 = "aabcc",s2 = "dbbca", When s3 = "aadbbcbca 阅读全文
摘要:
这道题如下: Given n, generate all structurally unique BST's (binary search trees) that store values 1...n. For example,Given n = 3, your program should ret 阅读全文
摘要:
直方图上的最大矩形。这道题很有意思。研究了半天才研究出来是个什么意思。 首先看题目: Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, fin 阅读全文