Bloomberg interview question

Swap Adjacent Nodes on Leetcode