-
Find the contiguous subarray within an array (containing at least one number) which has the largest product.
For example, gi...
-
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.
...
-
Given inorder and postorder traversal of a tree, construct the binary tree.
Note:You may assume that duplicates do not exist ...
-
Given preorder and inorder traversal of a tree, construct the binary tree.
Note:You may assume that duplicates do not exist ...
-
Given a 2D board and a word, find if the word exists in the grid.
The word can be constructed from letters of sequentially ad...
-
Given a set of distinct integers, nums, return all possible subsets (the power set).
Note: The solution set must not contain...
-
Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:
Integer...
-
Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place.
Follow up:
Did you use extra sp...
-
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all...
-
Given a set of candidate numbers (C) (without duplicates) and a target number (T), find all unique combinations in C where th...