|All-time Popular Problems|
|Multiply two linked lists|
|Transform to Sum Tree|
|Immediate Smaller Element|
|Longest valid Parentheses|
|Remove every k'th node|
|Sorting Elements of an Array by Frequency|
|Level order traversal|
|Reverse a Linked List in groups of given size.|
|n'th node from end of linked list|
Write a program to print all the LEADERS in the array. An element is leader if it is greater than all the elements to its right side. The rightmost element is always a leader.
The first line of input contains an integer T denoting the number of test cases. The description of T test cases follows.
The first line of each test case contains a single integer N denoting the size of array.
The second line contains N space-separated integers A1, A2, ..., AN denoting the elements of the array.
Print all the leaders.
1 <= T <= 100
1 <= N <= 100
0 <= A[i]<=100
16 17 4 3 5 2
1 2 3 4 0
17 5 2