Microsoft OA Fair Indexes Solution

Microsoft Online Assessment 2021 Questions and Solution

Microsoft OA Fair Indexes Solution You are given two arrays A and B consisting of N integers each. Index K is named fair if the four sums (A[0] + … + A[K-1]), (A[k] + … + A[N-1]), (B[0] + … + B[k-1]) and (B[K] + … + B[N-1]) are all equal. In other words, K is the index where the two arrays, A and B, can be split (into two non-empty arrays each) in … Read more