Two Sigma interview question

Mostly DSA questions on HackerRank