You are viewing a single comment's thread. Return to all comments →
passed all test cases
#!/bin/python def partition(ar): p=ar[0] eq,left,right=[],[],[] for i in ar: if i >= p: right.append(i) elif i <p: left.append(i) for t in left: print t, for k in right: print k, return "" m = input() ar = [int(i) for i in raw_input().strip().split()] partition(ar)
Seems like cookies are disabled on this browser, please enable them to open this website
Quicksort 1 - Partition
You are viewing a single comment's thread. Return to all comments →
passed all test cases