Traversal is operation of processing each element in the list - Data Structure

Q.  The operation of processing each element in the list is known as, _________.
- Published on 26 Aug 15

a. Sorting
b. Merging
c. Inserting
d. Traversal

ANSWER: Traversal
 

    Discussion

  • Nirja Shah   -Posted on 21 Nov 15
    The operation of processing each element in the list is known as traversing the link list.
    Example:
    struct node
    {
         Int data;
         struct node * link;
    } ∗ start;
    For traversing a single link list we will take a pointer tmp of type struct node and initialized with start.
    tmp=start;
    Now tmp pointer points to the first node of link list. Link list can be traversed as follows.
    while (tmp != NULL)
    {
         tmp = tmp → link;
    }

Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)