由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - a algo design question
相关主题
lock-free data structuresSTL感觉实在太变态了
free back test tool in python - for quant algos (转载)[菜鸟问题]类模板问题
最新的MS面试题 (转载)文一个简单的c++
a c++ questionHelp: who has gcc 4.0 or higher
菜鸟读C++ STL源程序的疑问where to define my template function
a simple question for C++ classC++ template question
Any difference between class and typename identifier?thrust help ~~~
我写的quick sortc++ template question:
相关话题的讨论汇总
话题: fifo话题: data话题: design话题: algo话题: map
进入Programming版参与讨论
1 (共1页)
z****e
发帖数: 2024
1
You are asked to design a map like data structure, which support look_up
by ID, remove by ID and FIFO look_up and FIFO remove.
FIFO stands for first in and first out.
How would to do it?
Thanks.
h****8
发帖数: 599
2
can u define what is FIFO look up ?
b********h
发帖数: 119
3
Does that mean it is both a map and a queue? If so, I guess you can augment
a binary search tree. keep a pointer between the elements pushed into this
data structure to maintain the queue structure.

【在 z****e 的大作中提到】
: You are asked to design a map like data structure, which support look_up
: by ID, remove by ID and FIFO look_up and FIFO remove.
: FIFO stands for first in and first out.
: How would to do it?
: Thanks.

j******n
发帖数: 271
4
linked list + map
template
struct FifoWithKeyLookup {
list l;
map m;
};
1 (共1页)
进入Programming版参与讨论
相关主题
c++ template question:菜鸟读C++ STL源程序的疑问
c++ template question:a simple question for C++ class
私有成员不能用类成员函数修改?Any difference between class and typename identifier?
谁给详细说一下这句我写的quick sort
lock-free data structuresSTL感觉实在太变态了
free back test tool in python - for quant algos (转载)[菜鸟问题]类模板问题
最新的MS面试题 (转载)文一个简单的c++
a c++ questionHelp: who has gcc 4.0 or higher
相关话题的讨论汇总
话题: fifo话题: data话题: design话题: algo话题: map