answersLogoWhite

0


Best Answer

|

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is queue algorithm?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Algorithm to implement Multiple queue in single dimensional array?

algorithm on multiple queues in a single dimensional array


Write an algorithm to implement any three operation of a queue?

8798797


What is the queue algorithm?

Usually it's modelled by the function (alpha)e^(-alpha *x).


How do you write a Java program to implement weighted queue using circular doubly linked list?

Add weights to the elements of the queue and use an algorithm to sort the queue every time an element is added.


What CPU scheduling algorithm is used Windows NT?

Windows XP uses a quantum-based, preemptive priority scheduling algorithm


What graph traversal algorithm uses a queue to keep track of vertices which need to be processed?

Breadth-first search


What are the various operations that can be performed on a queue?

In queue insertion takes place on rear end and deletion takes place on front end. INSERTION(QUEUE,N,FRONT,REAR,ITEM) :QUEUE is the name of a array on which we are implementing the queue having size N. view comlete ans at http://mcabcanotes.in/algorithm-to-perform-insertion-and-deletion-in-a-queue/


Explain with an example first come first serve scheduling algorithm?

By far the simplest CPU-scheduling algorithm is the first-come, first-served (FCFS) scheduling algorithm. With this scheme, the process that requests the CPU first is allocated the CPU first. The implementation of the FCFS policy is easily managed with a FIFO queue. When a process enters the ready queue, its PCB is linked onto the tail of the queue. When the CPU is free, it is allocated to the process at the head of the queue. The running process is then removed from the queue. The code for FCFS scheduling is simple to write and understand. The average waiting time under the FCFS policy, however, is often quite long. Consider the following set of processes that arrive at time 0, with the length of the CPU-burst time given in milliseconds:


Algorithm to delete elements at both ends in a dequeue?

Delete Front---- DQDELETE_FRONT(QUEUE, FRONT, REAR, ITEM) 1. [check for queue underflow] If FRONT<0, Then: Print: "Queue is empty", and Return. 2. ITEM = QUEUE[FRONT]; 3. Set FRONT = FRONT + 1. 4. Return. Delete Rear---- DQDELETE_REAR(QUEUE, REAR, FRONT, ITEM) 1. [check for queue underflow] If REAR<0, Then: Print: "Queue is empty", and Return. 2. ITEM = QUEUE[REAR]. 3. Set REAR = REAR - 1. 4.Return.


Will either kruskal or prim's algorithm work on negative edge graph?

The correctness of either Prim's or Kruskal's algorithm, is not affected by negative edges in the graph. They both work fine with negative edges. The question boils down to "Does a Priority Queue of numbers work with negative numbers?" because of the fact that both Prim's and Kruskal's algorithm use a priority queue. Of course -- as negative numbers are simply numbers smaller than 0. The "<" sign will still work with negative numbers.


What is the program of breadth first search in c plus plus?

The algorithm for breadth first search is to start at the root node or at an arbitrary node within the tree. First, push this node onto a queue. Then proceed as follows 1. If the queue is empty, quit the search and return a "not found" result. 2. Pop the first node from the queue. 3. If this node contains the value you seek, quit the search and return the node. 4. Enumerate the child nodes (if any), and push them onto the queue. 5. Go to step 1.


What does it means in computer algorithm while empty Q Q1 where Q is queue and Q1 is element of queue?

That doesn't make much sense. I guess it should be while NOT empty Q. Note that in many programming languages, the "not" is expressed with the exclamation mark. Perhaps you overlooked it... or it disappeared from the question. In that case (not empty), the meaning would be something like: while there is something in the queue (i.e., while not empty queue), process the elements in the queue (do something with the element). The statement is incomplete; instead of just "q1" it should say something like "process q1" or "q1.process()".