This teaches the crucial technique of handling duplicates in backtracking — sort first, then skip consecutive equal elements at the same recursion level.
Enable JavaScript for the full StreamPrep guide.