Question: If we have an array { 0,1,2,4,6,8} the function should swap the even ones cinsecutive ones so the output be {0,1,4,2,8,5} Create a function Swap
Create a function "Swap Even" that finds the first two consecutive even numbers and swap them
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
