Company: Hitachi_13oct
Difficulty: medium
K Maxima Problem Description You have an array of N integers and an integer K. Print the number of contiguous subarrays whose Kth element is the maximum element in the subarray. Note: It is guaranteed that K is not greater than N. In the provided code snippet, implement the provided KMaxima(...) method to print the number of contiguous subarrays whose Kth element is the maximum element of the subarray. You can write your code in the space below the phrase 'WRITE YOUR LOGIC HERE'. There will be multiple test cases running, so the Input and Output should match exactly as provided. The base Output variable result is set to a default value of -999, which can be modified. Additionally, you can add or remove these output variables. Input Format The first line contains two integers N and K. The second line contains N integers representing the array A. Output Format The output contains a single integer denoting the number of contiguous subarrays whose Kth element is the maximum element of the