Minimum replacements with 0 to sort the array
Given an array A[] of N integers, the task is to find the minimum number of operations to sort the array in non-decreasing order, by choosing an integer X and replacing all the occurrences of X in the array with 0. Examples: Input: N = 5, A[] = {2, 2, 1, 1, 3}Output: 1Explanation: We choose X = 2 an