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. And the rightmost element is always a leader. Input Format Read the size of array Read the array elements. Constraints 1<=n<=100 -1000<=a[I]<=1000 Output Format Print all the LEADERS in the array Sample Input 0 6 6 7 4 3 5 2 Sample Output 0 2 5 7 Sample Input 1 6 16 17 4 3 5 2 Sample Output 1 2 5 17
Answers
Answered by
0
Explanation:
atsah her to be a great day of the same time
Similar questions