https://alexandstuff.com/posts/leetcode-1920-build-array-from-permutation/
LeetCode 1920. Build Array from Permutation