You are given an array A containing N elements and you are required to do the following: Remove every occurrence of the number X from this array Move all the remaining elements to the right by preserving the original order of the elements. Fill the empty spots on the left side with 1.
Sample Input: 2 (Test cases) 5 (Array Size) 22 1 34 22 16 (Array) 22 (Element to remove) 7 3 5 3 5 5 11 5 5 Sample output: 1 1 1 34 16 1 1 1 1 3 3 11