This is a question from Leetcode as below.
"Given an array of integers arr of even length n and an integer k. We want to divide the array into exactly n / 2 pairs su