Tech Mahindra Interview Question

oops concept, Template, data structure