Intuit Interview Question

normal toplogic sort questions in leetcode.