Thursday, 18 July 2013

Algorithm for Traversing of Array

Let LB be the lower bound and UB be the upper bound of linear array a
  1. [Initialize counter] Set I at lower bound LB
  2. Repeat for i=LB to UB
  3. [visit element] Display a[i]
  4. [End of loop]
  5. Exit

No comments:

Post a Comment