Last active
March 27, 2025 13:12
-
-
Save remilapeyre/e648dffd8d3f8e38484d9b5b4621bdd0 to your computer and use it in GitHub Desktop.
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
| # Write a function findWord that takes a list of letter combinaisons in input, and returns the | |
| # word issued from the combinaisons. There is always a unique solution. | |
| # assert findWord(["P>E", "E>R", "R>U"]) == "PERU" | |
| # assert findWord(["I>N", "A>I", "P>A", "S>P"]) == "SPAIN" | |
| # assert findWord(["U>N", "G>A", "R>Y", "H>U", "N>G", "A>R"]) == "HUNGARY" | |
| # assert findWord(["I>F", "W>I", "S>W", "F>T"]) == "SWIFT" | |
| # assert findWord(["R>T", "A>L", "P>O", "O>R", "G>A", "T>U", "U>G"]) == "PORTUGAL" | |
| # assert findWord(["W>I", "R>L", "T>Z", "Z>E", "S>W", "E>R", "L>A", "A>N", "N>D", "I>T"]) == "SWITZERLAND" | |
| # assert findWord(["O>K"]) == "OK" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment