由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - [合集] 微软的一个面试题
相关主题
面试题求解 (转载)一个quadratic programming的问题,请指教!
What's the efficient way to merge two BST?请问这是什么语法(C++)?
How can matlab loop over functionssingleton question
一个有向图问题C语言里面的register变量能否进行取地址操作? (转载)
一个算法求助top 4 IT company interview question looking for answer
c# 3 很强大c++ 从linux移植到windows上面
在线求中位数的算法看来以后要把春运买票网设计当做面试考题了
一个C#似疑模板问题请教一个有向图的算法
相关话题的讨论汇总
话题: waab话题: median话题: terms话题: middle话题: 面试题
进入Programming版参与讨论
1 (共1页)
b***y
发帖数: 2799
1
☆─────────────────────────────────────☆
waab (waab) 于 (Mon Mar 24 17:17:01 2008) 提到:
Given a BST (Binary search Tree) how will you find median in that?
Constraints:
* No extra memory.
* Function should be reentrant (No static, global variables allowed.)
* Median for even no of nodes will be the average of 2 middle elements
and for odd no of terms will be middle element only.
* Algorithm should be efficient in terms of complexity.
Write a solid secure code for it.
我的想法:
1.是先遍
1 (共1页)
进入Programming版参与讨论
相关主题
请教一个有向图的算法一个算法求助
C#, recruiter发过来的面试题 (转载)c# 3 很强大
[bssd]怎么作合理的控制让程序产生bugs在线求中位数的算法
predictive analysis只能用来prediction吧?一个C#似疑模板问题
面试题求解 (转载)一个quadratic programming的问题,请指教!
What's the efficient way to merge two BST?请问这是什么语法(C++)?
How can matlab loop over functionssingleton question
一个有向图问题C语言里面的register变量能否进行取地址操作? (转载)
相关话题的讨论汇总
话题: waab话题: median话题: terms话题: middle话题: 面试题