Intuit interview question

DSA Take home assignment Design question