Created
March 1, 2022 03:39
-
-
Save joriki/9b07ea950e77458d0426040ec698a2c7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Arrays; | |
import java.util.HashSet; | |
import java.util.Set; | |
public class Question4393372 { | |
public static void main(String [] args) { | |
Set<String> combinations = new HashSet<>(); | |
for (int i = 1000;i < 3000;i++) { | |
char [] c = String.valueOf(i).toCharArray(); | |
Arrays.sort(c); | |
combinations.add(new String(c)); | |
} | |
System.out.println(combinations.size()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment