The first line of testcase contains T denoting the number of testcases. T testcases follow. Each testcase contains two lines of input. The first line contains N denoting the number of nodes of the linked list. The second line contains the elements of the linked list.
For each testcase, in a new line, print the length of the linked list.
Since this is a function problem, you don't need to take any input. Just complete the provided struct. All the other functions of the linked-list are already implemented.
1 <= T <= 100
1 <= N <= 100
1 2 3 4 5
1->2->3->4->5->NULL is the linked list formed. The length is 5
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.