FastCode AI interview question

Next greater element stack question