


Assume that the Indexing for the singly linked list always starts from 0.
The first line contains an Integer 'T' which denotes the number of test cases.
The first line of each test case or query contains the elements of the singly linked list separated by a single space.
The second line contains the integer value 'N'. It denotes the data to be searched in the given singly linked list.
While specifying the list elements for input, -1 indicates the end of the singly linked list and hence -1 would never be a list element.
For each test case, return the index/position of 'N' in the singly linked list. Return -1, otherwise.
Output for every test case will be printed in a separate line.
You do not need to print anything; it has already been taken care of. Just implement the given function.
1 <= T <= 10^2
0 <= M <= 10^5
Where 'M' is the size of the singly linked list.
Time Limit: 1 sec
The steps are as follows:
The steps are as follows:
Maximum Island Size in a Binary Tree
Equal Subtree Sums
Sorted Doubly Linked List to Balanced BST
Longest Substring with K-Repeating Characters
Expression Add Operators