|All-time Popular Problems|
|Inorder Successor in BST|
|Depth First Traversal for a Graph|
|Delete nodes having greater value on right|
|Column name from a given column number|
|Search an Element in an array|
|Diameter of Binary Tree|
|Get minimum element from stack|
|Subset Sum Problem|
|Reverse words in a given string|
|Reverse a 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