Write an algorithm for traversal in a linear array
Answers
Traversing Algorithm in Linear Array
Traversing Algorithm in Linear ArrayStep 1 : [Initialization] Set I = LB.
Traversing Algorithm in Linear ArrayStep 1 : [Initialization] Set I = LB.Step 2 : Repeat Step 3 and Step 4 while I < = UB.
Traversing Algorithm in Linear ArrayStep 1 : [Initialization] Set I = LB.Step 2 : Repeat Step 3 and Step 4 while I < = UB.step 3 : [ processing ] Process the A[I] element.
Traversing Algorithm in Linear ArrayStep 1 : [Initialization] Set I = LB.Step 2 : Repeat Step 3 and Step 4 while I < = UB.step 3 : [ processing ] Process the A[I] element.Step 4 : [ Increment the counter ] I = I + 1.
Traversing Algorithm in Linear ArrayStep 1 : [Initialization] Set I = LB.Step 2 : Repeat Step 3 and Step 4 while I < = UB.step 3 : [ processing ] Process the A[I] element.Step 4 : [ Increment the counter ] I = I + 1.Step 5: Exit.