Partition Array by Odd and Even
Problem
Partition an integers array into odd number first and even number second.
Example
Given [1, 2, 3, 4]
, return [1, 3, 2, 4]
Challenge
Do it in-place.
Partition an integers array into odd number first and even number second.
Given [1, 2, 3, 4]
, return [1, 3, 2, 4]
Do it in-place.