+ 1
Write A C++ Function To Shift The Negative Numbers To Left And The Positive Numbers To The Right Of An Array Of Numbers.
Eg: if array is -1 0 7 -7 8 -2 output should be -1 -7 -2 0 7 8
1 Answer
+ 2
you could just sort it...
this would make it
-7 -2 -1 0 7 8
but still. there are ALOT of something algorithms out there...