Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Swap Nodes by Oleg_Domokeev
def swap_nodes(a):
for i in range(len(a) // 2):
a[2*i], a[2*i+1] = a[2*i+1], a[2*i]
return a
Jan. 26, 2019