We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Crosswords-101
Crosswords-101
Sort by
recency
|
20 Discussions
|
Please Login in order to post a comment
pls follow me and use this code with haskell
Such a brilliant puzzle! I like that kind. My solution with F# is not concise at all. Full text is about 100 lines. Here is the heart without I/O:
Parsing placeholders:
Finding a solution (just a consequent recoursive "trying" of each word for each next placeholder with checking letters in "joint" points):
Such a brilliant puzzle! I like that kind. My solution with F# is not concise at all. Full text is about 108 lines. Here is the heart without I/O:
Parsing placeholders:
Finding a solution (just a consequent recoursive "trying" of each word for each next placeholder with checking letters in "joint" points):
Nice problem for list-monad in Haskell
Wow I actually did it!
How my algorithm works: Try putting the word at the front of your list in the board at all possible positions. (No, actually.
i <- [0..9]; j <- [0..9]
) For each successful placement, continue with the rest of the list of words. I ended up using do notation on lists andmaybeToList
ing some information.I'm super proud of it! On the other hand, I'm really glad we don't have hacking on ... uh, on HackerRank ... unlike some other platforms, like CodeForces ... hm.
Here it is! Sorry for the
hiding
, I'm lazier than Haskell.