由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - Amazon queston in cup
相关主题
construct a binary tree from in-order and level-order travcheck if a binary tree is a valid binary search tree
请教一个binary search tree和heap的问题。Leetcode上Binary Tree Level Order Traversal II的疑问
问道题,binary tree里有一个有indegree 2啥叫encode/decode binary tree啊?
出个题。reconstruct binary tree请教find number of duplicates in a binary search tree
non recursive binary tree traversal in O(n) time and O(1) spaceleetcode tree level by level traversal problem
binary tree, sum of 2 nodes == given numberBinary Tree Right Side View这个题的point是什么?
求LeetCode Binary Tree Level Order Traversal II解法一道google题
LeetCode 更新M家onsite题一道
相关话题的讨论汇总
话题: tree话题: amazon话题: queston话题: element话题: do
进入JobHunting版参与讨论
1 (共1页)
s*******n
发帖数: 97
1
Find the K'th Maximum Element in a Binary Search Tree . Do it in O(log N).
Please dont do a in order tree traversal and return the K'th element from
the end. I told that but interviewer did not wanted me to traverse the
entire tree. Any suggestions ?
m*****f
发帖数: 1243
2
没说不能preprocess阿, 每个节点储存tree size就行了
s******s
发帖数: 3694
3
好好找找以前的帖子, 俺写过怎么实现

max
to

【在 s*******n 的大作中提到】
: Find the K'th Maximum Element in a Binary Search Tree . Do it in O(log N).
: Please dont do a in order tree traversal and return the K'th element from
: the end. I told that but interviewer did not wanted me to traverse the
: entire tree. Any suggestions ?

1 (共1页)
进入JobHunting版参与讨论
相关主题
M家onsite题一道non recursive binary tree traversal in O(n) time and O(1) space
amazon一道面试题binary tree, sum of 2 nodes == given number
求教一个onsite面试题目求LeetCode Binary Tree Level Order Traversal II解法
问几个有关Binary tree的题LeetCode 更新
construct a binary tree from in-order and level-order travcheck if a binary tree is a valid binary search tree
请教一个binary search tree和heap的问题。Leetcode上Binary Tree Level Order Traversal II的疑问
问道题,binary tree里有一个有indegree 2啥叫encode/decode binary tree啊?
出个题。reconstruct binary tree请教find number of duplicates in a binary search tree
相关话题的讨论汇总
话题: tree话题: amazon话题: queston话题: element话题: do