AKUNA CAPITAL Interview Question

Min Max Subarray question . N People, K groups.