Technical Discussion :: Programming Qs. in TR
Home > Technical Interview Q&A > Programming Qs. in TR > Discussion
3 / 14
Given an array of positive and negative integers, segregate them in linear time and constant space. The output should print all negative numbers, followed by all positive numbers.
Input: [9, -3, 5, -2, -8, -6, 1, 3]
Output: [-3, -2, -8, -6, 5, 9, 1, 3]
Answer:
No Discussion on this question yet!