Follow

Translate

Monday, March 21, 2016

FINDA(INFO, LINK, START, ITEM, LOC)


1.  [List of empty?]   If START = NULL, then : Set LOC : = NULL, and Return.

2.   [Special case?]  If ITEM <  INFO[START], then : Set LOC : = NULL, and Return.

3.  Set SAVE : = START and PTR : = LINK[START].     [Initializes pointers]

4.  Repeat Steps  5 and 6 while PTR != NULL.

5.  If ITEM < INFO[PTR], then:
Set LOC : = SAVE, and Return.
[End of If structure]

6.  Set SAVE : = PTR and PTR : = LINK[PTR].    [Updates Pointers]
[End of Step 4 loop]

7.  Set LOC : = SAVE

8.  Return.
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