# Leetcode 99 - Recover BST

Note:

• Inorder traversal of BST is a sorted array.
• Find the two elements that are bigger than their next.
• Swap their vals.

Question:

You are given the root of a binary search tree (BST), where the values of exactly two nodes of the tree were swapped by mistake. Recover the tree without changing its structure.

Example:

Code: