Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Array

p=int(input());soni=list(map(int,input().split()))
fuh=[x for x in soni if x<0];aki=[x for x in soni if x>=0]
while(aki or fuh):
    if fuh:print(fuh[0],end=" ");fuh=fuh[1:]
    if aki:print(aki[0],end=" ");aki=aki[1:]
Source by www.skillrack.com #
 
PREVIOUS NEXT
Tagged: #Array
ADD COMMENT
Topic
Name
3+3 =