Pregunta de entrevista de HCLTech

General Java Questions. An algorithm solving question. Probably, they want to check basic coding.