由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - 是不是题出错了?
相关主题
请教一个C++ typedef的问题how to know the contents in Message queue?
Question: Given a pointer to a function最新的MS面试题 (转载)
boost::function 的 syntax 问题c++ typedef 一问
这两个地方是否需要typename?how to initialize this struct.
pointer to function为啥有人喜欢把_s结尾的结构typedef成_t结尾的,有讲究么?
lock-free data structuresabout typedef
can you insert several function pointers into a queue ?如何使用这个template?
server端用Threadpool实现request/response的两种不同方法比较Why the number is not exact in C++
相关话题的讨论汇总
话题: structure话题: push话题: min话题: data话题: design
进入Programming版参与讨论
1 (共1页)
m***t
发帖数: 254
1
考古考来的面试题。
Design a data structure, this data structure have four functions: pop, push
, min, top. DO NOT use any stack, queue, list, array or things like this.
什么都不让用怎么做啊?
t****t
发帖数: 6806
2
不让用现成的.自己写.

push

【在 m***t 的大作中提到】
: 考古考来的面试题。
: Design a data structure, this data structure have four functions: pop, push
: , min, top. DO NOT use any stack, queue, list, array or things like this.
: 什么都不让用怎么做啊?

m***t
发帖数: 254
3
那如果用C, 自己用typedef struct定义的link list算自己写的还是现成的?如果算
自己写的是不是太简单了, pop,
push, top复杂度都是constant, min扫一遍,复杂度linear。 如果这算现成的,那真
不知道怎么做了。

【在 t****t 的大作中提到】
: 不让用现成的.自己写.
:
: push

k****f
发帖数: 3794
4
是不是min-heap?

push

【在 m***t 的大作中提到】
: 考古考来的面试题。
: Design a data structure, this data structure have four functions: pop, push
: , min, top. DO NOT use any stack, queue, list, array or things like this.
: 什么都不让用怎么做啊?

m***t
发帖数: 254
5
That makes sense. Thanks!

【在 k****f 的大作中提到】
: 是不是min-heap?
:
: push

1 (共1页)
进入Programming版参与讨论
相关主题
Why the number is not exact in C++pointer to function
sizeof()的问题lock-free data structures
大家帮忙看看是什么问题can you insert several function pointers into a queue ?
intel icc hash_map 求救!server端用Threadpool实现request/response的两种不同方法比较
请教一个C++ typedef的问题how to know the contents in Message queue?
Question: Given a pointer to a function最新的MS面试题 (转载)
boost::function 的 syntax 问题c++ typedef 一问
这两个地方是否需要typename?how to initialize this struct.
相关话题的讨论汇总
话题: structure话题: push话题: min话题: data话题: design