Pergunta de entrevista da empresa Infosys

Java, oops concepts. Couple of DSA coding questions