Swap Nodes in Pairs LeetCode
Given a linked list, swap every two adjacent nodes and return its head.
For example,
Given 1->2->3->4, you should return the list as 2->1->4->3.
Your algorithm should use only constant space. Y
原创
2015-09-19 15:31:22 ·
154 阅读 ·
0 评论