摘要:
题目: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may co 阅读全文
摘要:
题目: 107. Binary Tree Level Order Traversal II Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to 阅读全文
摘要:
题目:108. Convert Sorted Array to Binary Search Tree Given an array where elements are sorted in ascending order, convert it to a height balanced BST. 题 阅读全文
摘要:
111. Minimum Depth of Binary Tree 问题描述: Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path 阅读全文
摘要:
题目: Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements that appear 阅读全文
摘要:
题目: Given a list of strings, you need to find the longest uncommon subsequence among them. The longest uncommon subsequence is defined as the longest 阅读全文
摘要:
题目: You have a number of envelopes with widths and heights given as a pair of integers (w, h). One envelope can fit into another if and only if both t 阅读全文