From c3239a187d62147b2b492335d406ca6d2fd47e19 Mon Sep 17 00:00:00 2001 From: arya-coder-1 <73031641+arya-coder-1@users.noreply.github.com> Date: Sat, 17 Oct 2020 21:27:36 +0530 Subject: [PATCH] Searching In Linked List Algorithm --- Searching Linked List Algo | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Searching Linked List Algo diff --git a/Searching Linked List Algo b/Searching Linked List Algo new file mode 100644 index 0000000..6702a9d --- /dev/null +++ b/Searching Linked List Algo @@ -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