Don't have Telegram yet? Try it now!
https://www.techiedelight.com/check-sequence-represents-preorder-traversal-bst/
Check if a given sequence represents preorder traversal of a BST