Fetching algorithms...
head = [1,2,3,4]
[1,4,2,3]
head = [1,2,3,4,5]
[1,5,2,4,3]
Time Complexity
Space Complexity