WorldQuant Interview Question

Asked an easy HackerRank problem