These are solutions for some puzzles/exercises from hackerrank / leetcode / codingame.
Please, solve them before reding solution.
Using solution after you wrote your own can give you ideas.
Using solution before you solve it makes your brain lazy.
It contains solutions. Don't read it if you want to solve tasks without help
Here are solutions for tasks that were complex for me to solve in HackerRank editor.
Made with Haskell.
Pretty simple but funny:
https://www.hackerrank.com/challenges/brainf-k-interpreter-fp
https://github.com/DKurilo/hackerrank/tree/master/brainf-k-interpreter-fp
It's great thing to understand how inferance works:
https://www.hackerrank.com/challenges/infer/problem
https://github.com/DKurilo/hackerrank/tree/master/infer
Prolog-like language implementation. It's great to be able to understand how Functional Dependencies work in Haskell.
https://www.hackerrank.com/challenges/elementary-watson/problem
https://github.com/DKurilo/hackerrank/tree/master/elementary-watson
https://gist.github.com/DKurilo/0a5024aafae32a5ff8e5b3384d0a615c
https://gist.github.com/DKurilo/f4b8e96a9e98b79bbc359fc87650d6da
Sometimes I'm playing in this game with my son. Without cheating. But now I know how to cheat in this game.
https://www.hackerrank.com/challenges/bitter-chocolate/problem
https://github.com/DKurilo/hackerrank/tree/master/bitter-chocolate
One more task that make your knowledge more structured.
https://www.hackerrank.com/challenges/down-with-abstractions/problem
https://github.com/DKurilo/hackerrank/tree/master/down-with-abstractions
Great explanation and theory, perfect idea.. But broken result estimation. Still worth to solve.
https://www.hackerrank.com/challenges/convolutional-coding/problem
https://github.com/DKurilo/hackerrank/tree/master/convolutional-coding
-- to compile with profiler:
-- ghc -prof -fprof-auto -rtsopts ./solution.hs
-- to run with profiler:
-- ./solution +RTS -p < in3
-- profile in solution.prof