title: rearrange an input that result must have alternating sequence of odd and even numbers
body: <p>I am looking for an <strong>stable algorithm</strong> for rearranging the array to alternate even and odd numbers</p>
  <p>example:
  Input: <code>{2, 8, 9 ,10 ,14 ,17 ,21, 13, 97};</code></p>
  <p>Output: <code>9  2  17  8  21  10  13  14  97</code>
  because odd number are more than even numbers so sequencing started from first odd number 9;
  also print some error message if alternate rearrangement is not possible; e.g. if some input has too much even numbers and there are not sufficient odd numbers and vice versa;</p>