private static List<Integer> goldenNextPermutation(final List<Integer> c) {
		// 1. finds the largest k, that c[k] < c[k+1]
		List<Integer> result = new ArrayList<Integer>(c);
		int first = getFirst(result);
		if (first == -1) { // no greater permutation
			return Collections.emptyList();
		}

		// 2. find last index toSwap, that c[k] < c[toSwap]
		int toSwap = c.size() - 1;
		while (c.get(first).compareTo(c.get(toSwap)) >= 0)
			--toSwap;

		// 3. swap elements with indexes first and last
		swap(result, first++, toSwap);

		// 4. reverse sequence from k+1 to n (inclusive)
		toSwap = c.size() - 1;
		while (first < toSwap) {
			swap(result, first++, toSwap--);
		}

		return result;
	}