Minimum swap required to convert binary tree to binary search tree
Given an array arr[] which represents a Complete Binary Tree i.e., if index i is the parent, index 2*i + 1 is the left child and index 2*i + 2 is the right child. The task is to find the minimum number of swaps required to convert it into a Binary Search Tree. Examples: Input: arr[] = [5, 6, 7, 8, 9, 10, 11]Output: 3Explanation:Binary tree of the g