swordey / odd_sorting

Fourth eLearninga Embedded Challenge

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Odd Sort Challenge

This is the fourth eLearninga Embedded Challenge.

You will need to solve Dice game challenge first.

Challenge

You will need to write a function, that receives a vector of numbers. Your mission 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]

Have fun!

Built With

Next challenge: Rectangle into Squares

About

Fourth eLearninga Embedded Challenge


Languages

Language:C++ 100.0%