/sortOdd

Sorts in ascending order only the odd positive numbers of a vector while leaving even numbers where it found them

Primary LanguageC++

Written by Zach Mitchell, 2017

The included cpp file sorts in ascending order only the odd positive numbers of a vector while leaving even numbers where it found them.

The implementation of this program is from my own brain, however the problem/challenge itself was defined by fyvfyv on CodeWars.  Here is his/her description of the problem:
- - - - - - - - - - - - - - - - - - - - - - 

You have an array of numbers.
Your task is to sort ascending odd numbers but even numbers must be on their places.

Zero isn't an odd number and you don't need to move it. If you have an empty array, you need to return it.

Example

sortArray([5, 3, 2, 8, 1, 4]) == [1, 3, 2, 8, 5, 4]

https://www.codewars.com/kata/sort-the-odd/cpp