Given a binary search tree with 2 nodes swapped find number of pairs not following BST properties

easyLast edited: August 2, 2025