Added search feature

This commit is contained in:
SF
2026-07-30 06:42:38 +00:00
parent 7a123d5f21
commit dc5257ce84
4 changed files with 27 additions and 0 deletions
+17
View File
@@ -24,3 +24,20 @@ void display()
temp = temp->next;
}
}
int search(int value)
{
Node *temp = head;
while (temp != NULL)
{
if (temp->data == value)
{
return 1;
}
temp = temp->next;
}
return 0;
}