Given an unsorted array having both negative and positive integers. The task is place all negative element at the end of array without changing the order of positive element and negative element.
Example 1:
Input :
A[] = {1, -1, 3, 2, -7, -5, 11, 6 }
Output :
1 3 2 11 6 -1 -7 -5
Example 2:
Input :
A[] = {-5, 7, -3, -4, 9, 10, -1, 11}
Output :
7 9 10 11 -5 -3 -4 -1
#KTP
/ kick-the-problem-110392081196215
Please Like, Share and Subscribe..
For more these kinds of videos ,stay tuned..
If you have doubts , put in comments box ....