Added search feature

This commit is contained in:
SF
2026-07-29 11:55:22 +00:00
parent 9f333aa21c
commit 4d9c36b471
4 changed files with 26 additions and 0 deletions
+14
View File
@@ -27,3 +27,17 @@ 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;
}