| title | cnt no of elements in the linkedlist |
|---|---|
| date | 2026-02-21 |
| excerpt | ``` |
| tags | [blog,quick-post] |
| privacy | public |
Node* temp3 = head;
int cnt=0;
while(temp3 != nullptr){
cnt++;
temp3 = temp3 -> next;
}
cout<<cnt<<endl;
// return 0;