English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

4 answers

Queue is a data structure that doesnt allow you to traverse in reverse direction. You traverse only in forward direction. Hence it crawls from head to toe only.

Take following C Code:

struct Q {
int something; struct Q *next; };

here we store reference to next member only. So you cant traverse in backward direction.

But, in circular queues, you store the address of first node in last node's next pointer. There also, you traverse forward only - as you know what is next of a node -BUT not what is before a node.

2006-07-12 23:23:52 · answer #1 · answered by Indian_Male 4 · 0 0

It doesn't physically move through memory. There are pointers locating the data, which change as you manipulate the queue, but not in the way you are thinking. I think you have taken the concept of a queue a bit too literally!

2006-07-12 23:51:37 · answer #2 · answered by Anonymous · 0 0

tail

2015-04-30 22:09:24 · answer #3 · answered by JC 1 · 0 0

inspect your own memory.

2006-07-12 23:14:56 · answer #4 · answered by leadbelly 6 · 0 0

fedest.com, questions and answers