Minimize moves to segregate even and odd by swapping adjacent elements
Given an array arr[] of size N, the task is to find the minimum moves to segregate even and odd numbers by swapping two adjacent elements at a time. Example: Input: N = 7, arr = {3, 5, 2, 7, 9, 11, 12}Output: 3Explanation: Swap arr[2] and arr[3] to get arr = {3, 5, 7, 2, 9, 11, 12}.Move 2: Swap arr[