上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 37 下一页
摘要: Given a binary tree, return the vertical order traversal of its nodes' values. (ie, from top to bottom, column by column). If two nodes are in the sam 阅读全文
posted @ 2017-09-07 04:48 Review->Improve 阅读(323) 评论(0) 推荐(0) 编辑
摘要: Given a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus sum of all 阅读全文
posted @ 2017-09-07 01:56 Review->Improve 阅读(135) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, check whether it is a mirror of itself using both recursion and iterative approach. Examples: Solution 1. Recursion For two trees 阅读全文
posted @ 2017-09-07 00:33 Review->Improve 阅读(165) 评论(0) 推荐(0) 编辑
摘要: Given a Binary Tree, extract all leaves of it in a Doubly Linked List (DLL). Note that the DLL need to be created in-place. Assume that the node struc 阅读全文
posted @ 2017-09-06 12:54 Review->Improve 阅读(277) 评论(0) 推荐(0) 编辑
摘要: Consider a game where a player can score 3 or 5 or 10 points in a move. Given a total score n, find the number of ways to reach the given score. Examp 阅读全文
posted @ 2017-09-06 11:57 Review->Improve 阅读(897) 评论(0) 推荐(0) 编辑
摘要: Given a 2D matrix of integers, find maximum sum rectangle in this matrix. Brute force solution of enumerating all possible submatrix then check their 阅读全文
posted @ 2017-09-05 15:04 Review->Improve 阅读(580) 评论(0) 推荐(0) 编辑
摘要: Given a 2D matrix of 0s and 1s, find maximum size rectangle of all 1s in this matrix. Brute force solution is very inefficient. A better solution is t 阅读全文
posted @ 2017-09-05 13:17 Review->Improve 阅读(200) 评论(0) 推荐(0) 编辑
摘要: Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the hist 阅读全文
posted @ 2017-09-05 12:37 Review->Improve 阅读(299) 评论(0) 推荐(0) 编辑
摘要: You are given n pairs of numbers. In every pair, the first number is always smaller than the second number. A pair (c, d) can follow another pair (a, 阅读全文
posted @ 2017-09-05 09:13 Review->Improve 阅读(515) 评论(0) 推荐(0) 编辑
摘要: Given an array of length n that stores a stock's price in n consecutive days, Buy/Sell stock with at most K transactions to maximize profit. You must 阅读全文
posted @ 2017-08-29 13:45 Review->Improve 阅读(418) 评论(0) 推荐(0) 编辑
上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 37 下一页