Midpoint Markets Interview Question

The technical interview (2nd) was a leetcode medium.