Voleon Interview Question

Average difficulty question from the hackerrank