• + 2 comments

    The explanation in the editorial doesn't clarify that much why this solution is better. It would be nice if you explain what a cartesian tree is, for the ones don't know about. I know, just need to google it and find it, but again, would be nice that the participants could find all the information they need to be better programmers in the site. Besides that, code is clean, but some comments would help to understand the code to less expert developers.