Input format
The first line contains an integer , denoting the number of elements in the first linked list.
The next lines contain an integer each, denoting the elements of the first linked list.
The next line contains an integer , denoting the number of elements in the second linked list.
The next lines contain an integer each, denoting the elements of the second linked list.
Output Format
Compare the two linked lists and return
1 if the lists are equal. Otherwise, return
0. Do NOT print anything to stdout/console.
The output is handled by the code in the editor and it is as follows:
For each test case, in a new line, print if the two lists are equal, else print .
Sample Input
2
1
2
1
1
2
1
2
2
1
2
Sample Output
0
1
Explanation
In the first case, linked lists are: 1 -> 2 -> NULL and 1 -> NULL
In the second case, linked lists are: 1 -> 2 -> NULL and 1 -> 2 -> NULL
0 Comments