Pergunta de entrevista da empresa Snapdeal

DSA question : Greatest and the second greatest element of and array and to optimize the solution, React question : Recursive components classic question.