Tech Mahindra Interview Question

oops concept