Giter VIP home page Giter VIP logo

dkurilo / hackerrank Goto Github PK

View Code? Open in Web Editor NEW
7.0 4.0 4.0 41.41 MB

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

Home Page: https://www.hackerrank.com/dkurilo

Haskell 51.28% Roff 1.12% Python 0.01% Shell 0.01% C 1.10% C++ 4.15% JavaScript 2.52% TypeScript 39.80%
haskell hackerrank hackerrank-solutions codingame codingame-solutions leetcode leetcode-solutions

hackerrank's Introduction

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

hackerrank's People

Contributors

dkurilo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.