上一页 1 ··· 42 43 44 45 46 47 48 49 50 ··· 54 下一页
摘要: 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 only 阅读全文
posted @ 2016-07-08 10:29 北叶青藤 阅读(170) 评论(0) 推荐(0)
摘要: Given a binary tree, find the maximum path sum. The path may start and end at any node in the tree. Example Given the below binary tree: 1 / \ 2 3 ret 阅读全文
posted @ 2016-07-08 10:19 北叶青藤 阅读(230) 评论(0) 推荐(0)
摘要: 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 numbers along its path. 阅读全文
posted @ 2016-07-08 05:14 北叶青藤 阅读(157) 评论(0) 推荐(0)
摘要: Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as a binary tree in which the dept 阅读全文
posted @ 2016-07-08 04:05 北叶青藤 阅读(191) 评论(0) 推荐(0)
摘要: Given the root and two nodes in a Binary Tree. Find the lowest common ancestor(LCA) of the two nodes. The lowest common ancestor is the node with larg 阅读全文
posted @ 2016-07-08 02:55 北叶青藤 阅读(238) 评论(0) 推荐(0)
摘要: Design an iterator over a binary search tree with the following rules: Elements are visited in ascending order (i.e. an in-order traversal) next() and 阅读全文
posted @ 2016-07-08 02:39 北叶青藤 阅读(171) 评论(0) 推荐(0)
摘要: Given a sequence of integers, find the longest increasing subsequence (LIS). You code should return the length of the LIS. Clarification What's the de 阅读全文
posted @ 2016-07-08 00:58 北叶青藤 阅读(247) 评论(0) 推荐(0)
摘要: Given inorder and postorder traversal of a tree, construct the binary tree. Notice You may assume that duplicates do not exist in the tree. Given inor 阅读全文
posted @ 2016-07-08 00:21 北叶青藤 阅读(220) 评论(0) 推荐(0)
摘要: Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). Example Given binary tree {3,9,2 阅读全文
posted @ 2016-07-07 12:30 北叶青藤 阅读(141) 评论(0) 推荐(0)
摘要: Given two strings, find the longest common subsequence (LCS). Your code should return the length of LCS. Example For "ABCD" and "EDCA", the LCS is "A" 阅读全文
posted @ 2016-07-06 12:51 北叶青藤 阅读(265) 评论(0) 推荐(0)
上一页 1 ··· 42 43 44 45 46 47 48 49 50 ··· 54 下一页