Skip to content

My solutions for some HackerRank / Codingame / Leetcode exercises. Made with Haskell where it's possible. But also TypeScript and a bit of C++

Notifications You must be signed in to change notification settings

DKurilo/hackerrank

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SPOILER ALERT

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.

HackerRank solutions

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.

Selected

1. Brainfuck

Pretty simple but funny:
https://www.hackerrank.com/challenges/brainf-k-interpreter-fp
https://github.com/DKurilo/hackerrank/tree/master/brainf-k-interpreter-fp

2. Hindley-Milner Inference

It's great thing to understand how inferance works:
https://www.hackerrank.com/challenges/infer/problem
https://github.com/DKurilo/hackerrank/tree/master/infer

3. WatLog or Prolog

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

Bonus:

https://gist.github.com/DKurilo/0a5024aafae32a5ff8e5b3384d0a615c
https://gist.github.com/DKurilo/f4b8e96a9e98b79bbc359fc87650d6da

4. Bitter Chocolate

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

5. Lambda to Combinatory logic transformer

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

6. Convolutional Codes

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

Just to remember

-- to compile with profiler:
-- ghc -prof -fprof-auto -rtsopts ./solution.hs
-- to run with profiler:
-- ./solution +RTS -p < in3
-- profile in solution.prof

About

My solutions for some HackerRank / Codingame / Leetcode exercises. Made with Haskell where it's possible. But also TypeScript and a bit of C++

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published