Voleon Interview Question

A complicated leetcode style problem