Pergunta de entrevista da empresa Kantar

Core java was asked in depth so you must be clear with all the concepts and a coding question was given by interviewer, for which he asked to write and explain the pseudo code