M2P Fintech interview question

max sum subarray and check prime in permutations.