Monday, 24 June 2019

Smaller Element(Location & Value) in data Array


Smaller Element in data Array

Step1: Start
Step2: Set k =1, LOC =1 & MIN = DATA [1]
Step3: Set K = K+1
Step4: if K>N, then print LOC, MIN and Exit;
Step5: if MIN> DATA[K], then Set
          LOC=K &MIN =DATA[K]
Step6: go to Loop step-3
Step7: End

1 comment: