Minimum swaps so that binary search can be applied
Given an unsorted array of length n and an integer k, find the minimum swaps to get the position of k before using the binary search. Here we can swap any two numbers as many times as we want. If we cannot get the position by swapping elements, print "-1".Examples: Input : arr = {3, 10, 6, 7, 2, 5,