Python No brainer solution


#1

def wave(self, A):
A.sort()
n=len(A)
for i in range(0,n-1,2):
A[i],A[i+1]=A[i+1],A[i]
return A