Computer Science, asked by shrey2892, 10 months ago

Algorithm to search for a given element in singly linked list

Answers

Answered by OnlyStudy21
0

Answer:

❤Searching in singly linked list ❤

• Step 1: SET PTR = HEAD.

• Step 2: Set 1 = 0.

• Step 3: IF PTR = NULL.

• Step 4: REPEAT STEP 5 TO 7 UNTIL PTR != NULL.

• Step 5: if ptr ▶ data = item.

• Step 6: I = I + 1.

• Step 7: PTR = PTR ▶NEXT.

• Step 8: EXIT.

Hope It's Help You

Similar questions