← Questions

Permutations of a list with duplicates

0
MetaCodingLast asked Sep 2025

Return every distinct ordering of a list that may contain repeated values, with no duplicate orderings in the output. Sort first and skip a value at a position when an equal value was already tried there.

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding