Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions Searching Linked List Algo
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
STEPS:

1.If first=NULL then{

Print “List empty”; STOP;}

2.ptr=First; [point ptr to the 1st node]

3.while (ptr<>NULL) repeat steps 4 to 5

4.If (DATA (ptr)= ‘X’)

Then {print “item found”;

STOP

}

5.ptr=NEXT (ptr); [shift ptr to the next node]

[end of while]

6.Print “item not found”;

7.END