choosing the correct sorting algorithm

Apr 21, 2015 at 1:39am
Consider an array of length n containing positive and negative integers in random order.
Write C++ code that rearranges the integers so that the negative integers appear before
the positive integers. Your solution should use
• O(n2) operations
• O(n) operations

for O(n^2) I said selection sort
for O(n) I said radix sort

are these response correct?
Apr 21, 2015 at 2:01am
Topic archived. No new replies allowed.