Follow

Translate

Monday, March 21, 2016

Traversing a Circular Header List

(Traversing a Circular Header List)  Let LIST be a circular header list in memory.  This algorithm traverses LIST, applying an operation PROCESS to each node of LIST.

1.   Set PTR : = LINK[START].   [Initializes the pointer PTR]

2.   Repeat Steps 3 and 4 while PTR != START

3.   Apply PROCESS to INFO[PTR].

4.  Set PTR : = LINK[PTR].   [PTR now points to the next node]
[End of Step 2 loop.]

5. Exit.
If You want to learn about the technology, computer science & engineering, web programming, freelancing, earning please click here :CSE SOLVE

Related Posts:

  • Deletion Algorithms Deletion Algorithms: Algorithms which delete nodes from linked lists come up in various situations. We discuss two of them here. The first one deletes the node following a given node, and the second one deletes the node wi… Read More
  • Arithmetic Expressions;Polish Notation Arithmetic Expressions;Polish Notation :  Highest : Exponentiation Next Highest : Multiplication (*) and Division(/) Lowest : Addition(+) and Subtruction(-) If You want to learn about the technology, compu… Read More
  • Inserting into a Sorted Linked List Inserting into a Sorted Linked List:   Suppose ITEm is to be inserted into a sorted linked LIST.  Then ITEM must be inserted between nodes A and B so that         … Read More
  • Evaluation of Postfix Expression Evaluation of Postfix Expression :  Algorithm :  1. Add a right parenthesis ")" at the end of P.   [This acts as a sentinel] 2. Scan P from left to right and repeat Steps 3 and 4 for each elemen… Read More
  • Two-Way Header Lists Two-Way Header Lists:   The advantages of a two-way list a circular header list may be combined into a two-way circular header list as .  The list is circular because the two end nodes point back to the head… Read More

0 comments:

Post a Comment