# 99. Recover Binary Search Tree ###### tags: `medium` `tree` https://leetcode.com/problems/recover-binary-search-tree/description/ ![](https://i.imgur.com/Trn5soz.png) ![](https://i.imgur.com/rogu3e1.png) 這次要復原BST 而BST在中序排序下 一定會由小到大 跟上一題的概念差不多 中序排到後 只要有數字不對的就放入first 第二次就放入secend 最後再將兩個互換 就回歸BST了 ![](https://i.imgur.com/dqaaJIf.png)