Pregunta de entrevista de Walmart

Longest stack length problem from data structure