Question d’entretien chez Amazon

Problem on Monotonic Stack, and Binary Search Tree