HackerRank Challenges#

In this section we attempt to document some solutions for HackerRank challenges.

The goal is to have one ore more solutions for each challenge, using one or more programming paradigms (procedural, functional, whatever) as means of practicing and learning.

Making notes and creating explanations describing the techniques, concepts and steps used in a solution is a good way of understanding things better.

The code is hosted in the Gitlab repository for this site.

About these solutions and explanations

Do not use these solutions (or others found in repositories over the web) on HackerRank. Try solving them yourself and only them see how others have done it to try to learn from them.

You don’t learn by just copying code.

TDD and Developing the Solutions#


We are using Deno to run TypeScript tests and solutions.

  • https://deno.land/manual/getting_started/installation

  • https://deno.land/manual/testing

Clone and cd into the directory where the solutions are being developed:

$ git clone git@gitlab.com:devhowto/Dev-How-To.git

$ cd Dev-How-To/src/hackerrank/typescript

Run all unit tests:

$ deno test --import-map ./import-map.json

Run unit tests for the challenge under development, for example:

$ deno test --import-map ./import-map.json \