Milly is playing with an array A of size N. She is trying to find those non-empty subarrays (sequence of consecutive elements) whose maximum and minimum values are identical. Milly got confused while counting. Your task is to help her in this problem.
Test case 1:
Special subarrays for the given sample case include :- [1], [1], [3], [1, 1].