Template:cpp/algorithm/dsc prev permutation