def verifyPreorder(self, preorder):
        left_finished = None
        stk = []
        for num in preorder:
            if left_finished and num < left_finished:
                return False

            while stk and stk[-1] < num:
                left_finished = stk.pop()

            stk.append(num)

        return True
* Draw a valid BST, and swap a pair of nodes to get an invalid BST.
dataset/ETHPy150Open algorhythms/LeetCode/255 Verify Preorder Sequence in Binary Search Tree.py/Solution.verifyPreorder