ION Group Interview Question

Puzzle question, DSA, OOPS and Low level system design