GoLang Solution For LeetCode Problem: Couples Holding Hands
Solving Couples Holding Hands in go. Please try yourself first to solve the problem and submit your implementation to LeetCode before looking into solution.
Input: row = [0, 2, 1, 3] Output: 1 Explanation: We only need to swap the second (row) and third (row) person.
Input: row = [3, 2, 0, 1] Output: 0 Explanation: All couples are already seated side by side.
See the full details of the problem Couples Holding Hands at LeetCode
Originally posted at: @github.com/halfrost/LeetCode-Go