MaplePrimes Questions

HI all,

After long manipulations, I was able to write the first solution y1 in this form (following the method of Frobenius):

Q: Write a procedure OddEven that takes a list L of integers and returns a list of the odd-numbered entries followed by the even-numbered entries.  So, for example,
OddEven([1,3,5,7,9,11]);
should return [1,5,9,3,7,11].  (Note: unless you find a clever solution you will need a several-line procedure using proc..end proc.   You will perhaps need an if statement so that you can deal with the case where the list has an odd number of elements and where it has an even number of elements separately.)

 

 

My ideas...