Question: 2. (20 points) Implement a function which takes an integer list as its input argument and modifios that list so that all the even integers
2. (20 points) Implement a function which takes an integer list as its input argument and modifios that list so that all the even integers come before all the odd integers. For example, if the list is [5,4,2,11,9,10,4,7,3], then after using your function, one acceptable ordering of the elements would be [4,2,10,4,5,11,9,7,3]. The exact order of the elements does not matter, so long as all of the even values appear before all of the odd values. The list might contain no even elements or no odd elements and your code should work correctly for such input cases as well
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
