Esempio n. 1
0
def sort(s):
    r = Stack()
    while not s.is_empty():
        tmp = s.pop()
        while not r.is_empty() and r.peek() > tmp:
            s.push(r.pop())
        r.push(tmp)
    return r