Skip to content

Latest commit

 

History

History
5 lines (3 loc) · 184 Bytes

README.md

File metadata and controls

5 lines (3 loc) · 184 Bytes

This problem was asked by Google.

Given the head of a singly linked list, swap every two nodes and return its head.

For example, given 1 -> 2 -> 3 -> 4, return 2 -> 1 -> 4 -> 3.