Microsoft interview question

In the first cycle I had a zoom call talking about front-end and javascript basics.(e.g == vs ===) In the second cycle I had 3 interviews back to back, one was a system design interview designing a scooter rental software. leet code style question, finding the index of the array where the left part and right part of the array have the same sum. the last one was a front-end interview implementing Promise.All

Interview Answer

Anonymous

2 Jun 2022

Store all the sums in a hash table, each sum to the index that sums to it, and then check if half of the sum is in the hash table if it does, return the index. (key = sum, value = index)