Walmart interview question

Longest stack length problem from data structure