Added count feature

This commit is contained in:
SF
2026-07-29 12:04:10 +00:00
parent 4d9c36b471
commit c0a432b2e7
4 changed files with 19 additions and 0 deletions
+15
View File
@@ -41,3 +41,18 @@ int search(int value)
}
return 0;
}
int count()
{
int count = 0;
Node *temp = head;
while(temp != NULL)
{
count++;
temp = temp->next;
}
return count;
}