WorldQuant interview question

a few leetcode style questions