Pergunta de entrevista da empresa Inmar

Problem on stack , and min value in the stack without using any loop . asked in techinical round