K Distinct Element Subarrays - Coding problem | OneNoughtOne