(String[] args)
| 2 | class Solution |
| 3 | { |
| 4 | public static void main(String[] args) |
| 5 | { |
| 6 | Scanner sc=new Scanner(System.in); |
| 7 | int n=sc.nextInt(); |
| 8 | int arr[]=new int[n]; |
| 9 | for(int i=0;i<n;i++) |
| 10 | arr[i]=sc.nextInt(); |
| 11 | |
| 12 | int max=Integer.MIN_VALUE; |
| 13 | int count=0; |
| 14 | for(int i=0;i<n;i++) |
| 15 | { |
| 16 | if(arr[i]>max) |
| 17 | { |
| 18 | max=arr[i]; |
| 19 | count++; |
| 20 | } |
| 21 | } |
| 22 | System.out.println(count); |
| 23 | } |
| 24 | } |
nothing calls this directly
no outgoing calls
no test coverage detected