ShareChat interview question

Round 1: 2 DSA questions Round 2: Some basic javascript implementation