takeUforward
next_permutation : find next lexicographically greater permutation - Tutorial