You are viewing a single comment's thread. Return to all comments →
No problem! I give you best solution. In python the third.
p = 0 def mergeLists(head1, head2): global p r, q, p = 0, p, sys.stdin.tell() sys.stdin.seek(q) a = sys.stdin.read(p-q).split() print(a) q or a.pop(r) while r < len(a): r += int(a.pop(r)) a.sort(key=lambda v: (len(v), v)) fptr.write(' '.join(map(str, a)))
Seems like cookies are disabled on this browser, please enable them to open this website
Merge two sorted linked lists
You are viewing a single comment's thread. Return to all comments →
No problem! I give you best solution. In python the third.