Follow

Translate

Wednesday, March 9, 2016

Traversing Linear Arrays

Algorithm 4.1: (Traversing a Linear Array) Here LA is a linear array with lower bound LB and upper bound UB. This algorithm traverses LA applying an operation Process to each element of LA.


1. [Initialize counter.] Set K : = LB.
2. Repeat Steps 3 and 4 while K < UB.
3. [Visit Element] Apply Process to LA[K].
4.  [Increase counter] Set K : = K +1.    // K = LB + 1
  [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

0 comments:

Post a Comment