Write a function that takes in the root of a linked list, and switches every 2 nodes — the 1st and 2nd, 3rd and 4th, 5th and 6th and so on.
Write a function that takes in the root of a linked list, and switches every 2 nodes — the 1st and 2nd, 3rd and 4th, 5th and 6th and so on.Continue reading on Level Up Coding » Read More Python on Medium
#python