Company: natwest
Difficulty: medium
You are playing an online game. In the game, a list of N numbers is given. The player has to arrange the numbers so that all the odd numbers of the list come after the even numbers. Write an algorithm to arrange the given list such that all the odd numbers of the list come after the even numbers. Input The first line of the input consists of an integer num , representing the size of the list (N). The second line of the input consists of N space separated integers representing the elements of the list. Output Print the rearranged list with all even numbers first followed by all odd numbers. Example 1: Input: 5 73 4 63 23 65 Output: 4 73 63 23 65 Expected Output: 4 73 63 23 65 Example 2: Input: 6 24 13 68 79 46 77 Output: 24 68 46 13 79 77 Expected Output: 24 68 46 13 79 77