AKUNA CAPITAL interview question

Min Max Subarray question . N People, K groups.