Topic — Add New » Posts Last Poster Freshness
Find min() in queue 4 Anonymous 1 month

Modify queue data structure to support enqueue() , dequeue() , findmin() .... Is it possible to do this in O(1) with extra space ?

implement a stack using one queue 5 2 months

implement a stack using one queue

Reverse a stack using queue 2 3 months

reverse a stack using one queue

Time complexity 3 5 months

What is the complexity of insertion and deletion of the following

1) Queue
2)Linked list
3)Queue implemented using linked list

Cisco Interview Question for Software Engineer/Developer about Algorithms 3 7 months

Implement Queue using stack. How many stacks you need? Note that you can only use following functions on a queue.

enQueue() deQueue() isEmpty() isFull()

And your stack should support following operations.
push() pop() isEmpty() isFull()

Cisco
Delet negative elements from a queue 3 mAc 8 months

write an algo that deletes all negative integers without changing the order of remaining elements of the queue

priority queue implementation 1 ricky 10 months

What are the different ways to implement priority queue and how to choose one?

why circular queue 1 akhil 10 months

Why do we make queue circular? what is the use?

time complexities in Queue 2 1 year
Space efficient data structure for n queues 3 1 year

Give a good data structure for having n queues (n not fixed) in a finite memory segment. You can have some data-structure separate for each queue. Try to use at least 90% of the memory space.

Priority Queue using Queue 1 1 year

What is the minimum number of queues needed to implement the priority queue?

Variable number of integers 2 kartik 1 year

What do you mean by a stack or a queue in which each item is a variable number number of integers?
Is it a queue of a queue, queue of a stack etc

What does the given program do 2 1 year
IntQueue q = new IntQueue();
q.enqueue(0);
q.enqueue(1);
for (int i = 0; i < 10; i++) {
    int a = q.dequeue();
    int b = q.dequeue();
    q.enqueue(b);
    q.enqueue(a + b);
    ptint(a);
}
[closed] Implement queue using stacks 3 geeksforgeeks 1 year

How will implement queue using 2 stacks such that enqueue and dequeue operations are efficient