由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - question 2: o(1) euque and dequeue?
相关主题
what is the internal implementation of Deque职业杯另外一道
面试题google phone interview
再问一个blockingqueue的问题问个经典面试题
MS Azure SDET 新鲜面经implement Blocking Queue in java
面经兼求祝福priority_queue C++ implementation
G家电面题,求解答‏Java String concatenation
one facebook software problemsnapchat 面试题
ms onsite面经面试的时候可以用STL吗
相关话题的讨论汇总
话题: dequeue话题: euque话题: constant话题: question话题: queue
进入JobHunting版参与讨论
1 (共1页)
S**Y
发帖数: 136
1
Given a constant number of priorities implement a priority queue with O(1) e
nqueue and dequeue implementations.
I can not think of a way doing this...O(1) enque and deque..
even with a constant number of prioritties..
Any ideas?
h**k
发帖数: 3368
2
大O还是小o,这个差很远的

e

【在 S**Y 的大作中提到】
: Given a constant number of priorities implement a priority queue with O(1) e
: nqueue and dequeue implementations.
: I can not think of a way doing this...O(1) enque and deque..
: even with a constant number of prioritties..
: Any ideas?

S**Y
发帖数: 136
3
big O(1)
SORRY

【在 h**k 的大作中提到】
: 大O还是小o,这个差很远的
:
: e

k***e
发帖数: 556
4
as the problems says, you only have const numbers that need to take care of
then just use idea similar to counting sort
by the way, i guess you are talking about priority queue.
please make problems clear.

e

【在 S**Y 的大作中提到】
: Given a constant number of priorities implement a priority queue with O(1) e
: nqueue and dequeue implementations.
: I can not think of a way doing this...O(1) enque and deque..
: even with a constant number of prioritties..
: Any ideas?

S**Y
发帖数: 136
5
yes. it is priority_queue(sated in the text)
can u elabrate it? thx.

of

【在 k***e 的大作中提到】
: as the problems says, you only have const numbers that need to take care of
: then just use idea similar to counting sort
: by the way, i guess you are talking about priority queue.
: please make problems clear.
:
: e

g*******y
发帖数: 1930
6
就是个脑筋急转弯或者文字游戏吧。。。
题目说constant number of priorities
你就假设这个constant number = 2,i.e.,只有两种priorities。。。

【在 S**Y 的大作中提到】
: yes. it is priority_queue(sated in the text)
: can u elabrate it? thx.
:
: of

1 (共1页)
进入JobHunting版参与讨论
相关主题
面试的时候可以用STL吗面经兼求祝福
Implement an web-based dictionary lookupG家电面题,求解答‏
A家面试题one facebook software problem
Expedia Hiring for SQL Server Developer (转载)ms onsite面经
what is the internal implementation of Deque职业杯另外一道
面试题google phone interview
再问一个blockingqueue的问题问个经典面试题
MS Azure SDET 新鲜面经implement Blocking Queue in java
相关话题的讨论汇总
话题: dequeue话题: euque话题: constant话题: question话题: queue