152k views
4 votes
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

a. O(n2) operations
b. O(n) operations

1 Answer

0 votes
a=243484318731872913781675784
User Neelabh Singh
by
4.9k points