上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 41 下一页
摘要: Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally identical a 阅读全文
posted @ 2016-08-18 13:13 冰凌花花~ 阅读(152) 评论(0) 推荐(0) 编辑
摘要: Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST. Calling next() will return the n 阅读全文
posted @ 2016-08-17 23:07 冰凌花花~ 阅读(237) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For example:Given binary tree [3 阅读全文
posted @ 2016-08-17 14:05 冰凌花花~ 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 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-08-17 11:18 冰凌花花~ 阅读(613) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, find the maximum path sum. For this problem, a path is defined as any sequence of nodes from some starting node to any node in th 阅读全文
posted @ 2016-08-16 14:56 冰凌花花~ 阅读(137) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, find the maximum path sum from root. The path may end at any node in the tree and contain at least one node in it. 给一棵二叉树,找出从根节点出 阅读全文
posted @ 2016-08-15 17:00 冰凌花花~ 阅读(139) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According to the definition of LCA on Wikipedia: “The lowes 阅读全文
posted @ 2016-08-14 23:17 冰凌花花~ 阅读(217) 评论(0) 推荐(0) 编辑
摘要: Given a binary search tree (See Definition) and a node in it, find the in-order successor of that node in the BST. If the given node has no in-order s 阅读全文
posted @ 2016-08-14 19:15 冰凌花花~ 阅读(292) 评论(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-08-14 16:22 冰凌花花~ 阅读(147) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest l 阅读全文
posted @ 2016-08-13 18:45 冰凌花花~ 阅读(133) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 41 下一页