answersLogoWhite

0

One.

User Avatar

Wiki User

14y ago

What else can I help you with?

Continue Learning about Engineering

How many stacks did the Titanic have?

Four stacks. The boilers used 3 of the stacks for exhaust, the fourth was used to vent Titanics' numerous kitchens and galleys.


There is a long queue at the primark store Charlie is 4th from the front and 9th from the end How many people are there in the queue?

12


How many to form a queue?

To form a queue, at least two individuals are needed, as a queue implies a sequence of people waiting for something, typically one behind the other. However, in practical terms, any number of individuals can form a queue, as it can grow indefinitely based on demand. The essential aspect is that there is a clear first and last position in the line.


Write a program in c language to reverse elements of a queue?

There are many ways to reverse the order of the elements in a queue. Provided that you have access to the implementation of the queue, it is of course easy to read the elements from the tail end rather than the front end, thus reversing the elements. However, considering the queue as a black box, and assuming the queue only allows for its characteristic operations (removal of head element, addition to tail), the best method to reverse the elements in a queue to engage a stack. You'd remove the elements from the queue (always reading the head of the queue), and push each element onto the stack. When the queue is empty, you reverse that process: pop each element from the stack until it is empty, and add each element in this order to the end of the queue. Your queue will have the exact same elements as in the beginning, but in reverse order. The exact implementation of this in C, or in any other programming language, is trivial, but the exact source code depends on the implementation of queue and stack containers. Following is pseudocode: Queue<Item> reverse (Queue<Item> queue) { Stack<Item> stack; Item item; while (queue.remove(&item)) { stack.push(item); } while(stack.pop(&item)) { queue.add(item); } return queue; }


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()".

Related Questions

How many minimum no of queues Rae needed to implement priority queue?

Two possible solutions: 1. Separated queue for every possible priority value. 2. One shared queue for every elements, sorted by priority.


How many pages does Jumping the Queue have?

Jumping the Queue has 203 pages.


How many pages does The Queue - novel - have?

The Queue - novel - has 280 pages.


How many stacks of 100 dollar bills are in 193000000?

193,000,000/100 = 1,930,000 stacks. 193,000,000/100 = 1,930,000 stacks. 193,000,000/100 = 1,930,000 stacks. 193,000,000/100 = 1,930,000 stacks.


How many stacks did the Titanic have?

Four stacks. The boilers used 3 of the stacks for exhaust, the fourth was used to vent Titanics' numerous kitchens and galleys.


How many syllables do queue have?

One


How many stacks of 100 pennies in 10000000?

There would be 100,000 stacks of 100 pennies in 10,000,000.


There is a long queue at the primark store Charlie is 4th from the front and 9th from the end How many people are there in the queue?

12


There is a long queue at the primark store Charlie is 4th from the front and 9th from the endhow many people are there in a queue?

12


How many 24 stacks of 10 would it be in all?

To determine how many 24 stacks of 10 there would be in all, multiply 24 by 10. This equals 240. Therefore, there would be a total of 240 items when you have 24 stacks of 10.


If 0.15 is a stack of paper how many stacks of paper would be equal to 6.5?

43 stacks and one third of a stack.


How many stacks of newspaper do you use a day?

none....