Rosetta Problems

Semi-Ordered Permutation

https://leetcode.com/problems/semi-ordered-permutation