Separate Odd Even , Reverse Even , Merge Them


#1

Use this approach, instead of vector one. This is O(n) .