Created
January 28, 2022 06:51
-
-
Save jollyjoester/7f64049bdaa6eb0611b29a0115469986 to your computer and use it in GitHub Desktop.
What is the 100th word in the permutation of "GAKKOU" in Swift
This file contains hidden or 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 Algorithms | |
let word = ("GAKKOU".permutations().uniqued().map { String($0) }.sorted(by: <)[99]) | |
print(word) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Algorithms
を使わないで実装してみました!