Write a python program to move all negative numbers to beginning and positive to end with constant extra space

def move_numbers(array):
array.sort()

for i in array:
    print(i , end =" ")

return " "

array = [-1,2,3,4,-9,-6,1]
print(move_numbers(array))

1 Like

@brindhubala30

Nice going, keep the pace up.
Practice more.

2 Likes

Keep practicing @brindhubala30

1 Like

@dsedyoda thank you mam…

2 Likes

@parkar-ta-ds thank you sir…

1 Like