Find Fair Indexes

Microsoft coding interview problem: Given two integer arrays A and B of equal length, identify all fair indexes K. An index is fair if splitting both arrays at K (into non-empty parts) makes the left sums equal and the right sums equal across A and B. A clear, array-partition interview question from Microsoft interviews.

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Input Variables
Execution Result: