Repository with the solutions of HackerRank challenges.
Summary β’ Installation β’ Challenges β’ Related β’ License β’ Contact
This repository serves as a housing solutions to HackerRank challenges. HackerRank is a platform where developers can practice coding skills, prepare for interviews, and get hired by top tech companies.
This repository contains solutions in Node.js (with TypeScript), and Go (Golang).
- Clone the repository.
- Install Visual Studio Code, Docker Desktop, and Dev Containers (VSCode extension).
- Open the repository folder in Visual Studio Code.
- Reopen the project in a Dev Container, pressing
F1and selectingDev Containers: Rebuild and Reopen in Container. - Wait for the container to be built and started.
- That's it! You are ready to explore the code and run the solutions.
How can I test a Node.js solution?
- Open the integrated terminal of Visual Studio Code.
- Run the desired test with the command
bun test src/<CATEGORY>/<CHALLENGE NUMBER>/
If you want to run all Node.js tests of a category, you can use the command
bun run test:node:<CATEGORY>.
How can I test a Go (Golang) solution?
- Open the integrated terminal of Visual Studio Code.
- Run the desired test with the command
cd src/<CATEGORY>/<CHALLENGE NUMBER>/ && go test ./...
If you want to run all Go (Golang) tests of a category, you can use the command
bun run test:go:<CATEGORY>.
| # | Challenge | Difficulty | Score earned | Description |
|---|---|---|---|---|
| 01 | Revising the select query I | π’ | 10 | Show |
| 02 | Revising the select query II | π’ | 10 | Show |
| 03 | Select all | π’ | 10 | Show |
| 04 | Select by ID | π’ | 10 | Show |
| 05 | Japanese cities' attributes | π’ | 10 | Show |
| 06 | Japanese cities' names | π’ | 10 | Show |
| 07 | Weather observation station 1 | π’ | 15 | Show |
| 08 | Weather observation station 2 | π’ | 15 | Show |
| 09 | Weather observation station 3 | π’ | 10 | Show |
| 10 | Weather observation station 4 | π’ | 10 | Show |
| 11 | Weather observation station 5 | π’ | 30 | Show |
| 12 | Weather observation station 6 | π’ | 10 | Show |
| 13 | Weather Observation Station 7 | π’ | 10 | Show |
| 14 | Weather observation station 8 | π’ | 15 | Show |
| 15 | Weather observation station 9 | π’ | 10 | Show |
| 16 | Weather observation station 10 | π’ | 10 | Show |
| 17 | Weather observation station 11 | π’ | 15 | Show |
| 18 | Weather observation station 12 | π’ | 15 | Show |
| 19 | Higher than 75 marks | π’ | 15 | Show |
| 20 | Employee names | π’ | 10 | Show |
| 21 | Employee salaries | π’ | 10 | Show |
| 22 | Type of triangle | π’ | 20 | Show |
| 23 | The PADS | π | 30 | Show |
| 24 | Occupations | π | 30 | Show |
| 25 | Binary tree nodes | π | 30 | Show |
| 26 | New companies | π | 30 | Show |
| 27 | Revising aggregations - The sum function | π’ | 10 | Show |
| 28 | Revising aggregations - Averages | π’ | 10 | Show |
| 29 | Average population | π’ | 10 | Show |
| 30 | Japan population | π’ | 10 | Show |
| 31 | Population density difference | π’ | 10 | Show |
| 32 | Revising aggregations - The count function | π’ | 10 | Show |
| 33 | The blunder | π’ | 15 | Show |
| 34 | Top earners | π’ | 20 | Show |
| 35 | Weather observation station 13 | π’ | 10 | Show |
| 36 | Weather observation station 14 | π’ | 10 | Show |
| 37 | Weather observation station 15 | π’ | 15 | Show |
| 38 | Weather observation station 16 | π’ | 10 | Show |
| 39 | Weather observation station 17 | π’ | 15 | Show |
| 40 | Weather observation station 18 | π | 25 | Show |
| 41 | Weather observation station 19 | π | 30 | Show |
| 42 | Weather observation station 20 | π | 40 | Show |
| 43 | Population census | π’ | 10 | Show |
| 44 | African cities | π’ | 10 | Show |
| 45 | Average population of each continent | π’ | 10 | Show |
| 46 | The report | π | 20 | Show |
| 47 | Top competitors | π | 30 | Show |
| 48 | Ollivander's inventory | π | 30 | Show |
| 49 | Challenges | π | 30 | Show |
| 50 | Contest leaderboard | π | 30 | Show |
| 51 | SQL project planning | π | 40 | Show |
| 52 | Placements | π | 40 | Show |
| 53 | Symmetric pairs | π | 40 | Show |
| 54 | Interviews | π΄ | 50 | Show |
| 55 | 15 days of learning SQL | π΄ | 50 | Show |
| 56 | Draw the triangle 1 | π’ | 25 | Show |
| 57 | Draw the triangle 2 | π’ | 25 | Show |
| 58 | Print prime numbers | π | 40 | Show |
| Total | / | 1080 / 1080 | / |
| # | Challenge | Difficulty | Score earned | Description |
|---|---|---|---|---|
| 01 | Matching specific string | π’ | 5 | Show |
| 02 | Matching anything but a newline | π’ | 5 | Show |
| 03 | Matching digits & non-digit characters | π’ | 5 | Show |
| 04 | Matching whitespace & non-whitespace character | π’ | 5 | Show |
| 05 | Matching word & non-word character | π’ | 5 | Show |
| 06 | Matching start & end | π’ | 5 | Show |
| 07 | Matching specific characters | π’ | 10 | Show |
| 08 | Excluding specific characters | π’ | 10 | Show |
| 09 | Matching character ranges | π’ | 10 | Show |
| 10 | Matching {x} repetitions | π’ | 20 | Show |
| 11 | Matching {x, y} repetitions | π’ | 20 | Show |
| 12 | Matching zero or more repetitions | π’ | 20 | Show |
| 13 | Matching one or more repetitions | π’ | 20 | Show |
| 14 | Matching ending items | π’ | 20 | Show |
| 15 | Matching word boundaries | π’ | 20 | Show |
| 16 | Capturing & non-capturing groups | π’ | 20 | Show |
| 17 | Alternative matching | π’ | 20 | Show |
| 18 | Matching same text again & again | π’ | 20 | Show |
| 19 | Backreferences to failed groups | π’ | 20 | Show |
| 20 | Branch reset groups | π’ | 20 | Show |
| 21 | Forward references | π’ | 20 | Show |
| 22 | Positive lookahead | π’ | 20 | Show |
| 23 | Negative lookahead | π’ | 20 | Show |
| 24 | Positive lookbehind | π’ | 20 | Show |
| 25 | Negative lookbehind | π’ | 20 | Show |
| 26 | Detect HTML links | π | 10 | Show |
| 27 | Detect HTML tags | π’ | 10 | Show |
| 28 | Find a sub-word | π’ | 10 | Show |
| 29 | Alien username | π’ | 10 | Show |
| 30 | IP address validation | π’ | 10 | Show |
| 31 | Find a word | π | 15 | Show |
| 32 | Detect the email address | π | 15 | Show |
| 33 | Detect the domain name | π | 15 | Show |
| 34 | Building a smart IDE - Identifying comments | π | 20 | Show |
| 35 | Detecting valid latitude and longitude pairs | π’ | 20 | Show |
| 36 | HackerRank tweets | π’ | 15 | Show |
| 37 | Build a stack exchange scraper | π’ | 15 | Show |
| 38 | Utopian identification number | π’ | 15 | Show |
| 39 | Valid PAN format | π’ | 15 | Show |
| 40 | Find HackerRank | π’ | 15 | Show |
| 41 | Saying hi | π’ | 15 | Show |
| 42 | HackerRank language | π’ | 15 | Show |
| 43 | Building a smart IDE - Programming language detection | π’ | 30 | Show |
| 44 | Split the phone numbers | π’ | 15 | Show |
| 45 | Detect HTML attributes | π’ | 20 | Show |
| 46 | The British and American style of spelling | π’ | 15 | Show |
| 47 | UK and US (part 2) | π’ | 10 | Show |
| Total | / | 710 / 710 | / |
| # | Challenge | Difficulty | Score earned | Description |
|---|---|---|---|---|
| 01 | Functions (I) | π’ | 5 | Show |
| 02 | Functions (II) | π’ | 5 | Show |
| 03 | Bijective functions | π’ | 10 | Show |
| 04 | Function inverses | π’ | 10 | Show |
| 05 | Permutations | π’ | 10 | Show |
| 06 | Involution | π’ | 10 | Show |
| 07 | Message space and ciphertext space | π’ | 10 | Show |
| 08 | Key spaces | π’ | 10 | Show |
| 09 | Encryption scheme | π’ | 10 | Show |
| 10 | PRNG sequence guessing | π | 50 | Show |
| 11 | Keyword transposition cipher | π’ | 50 | Show |
| 12 | Basic cryptanalysis | π΄ | 50 | Show |
| Total | / | 230 / 230 | / |
| # | Challenge | Difficulty | Score earned | Description |
|---|---|---|---|---|
| 01 | Count elements greater than previous average | π’ | 50 | Show |
| 02 | Find the smallest missing positive integer | π’ | 50 | Show |
| 03 | Check palindrome by filtering non-letters | π’ | 50 | Show |
| 04 | Check for non-identical string rotation | π’ | 50 | Show |
| 05 | Target index search | π’ | 50 | Show |
| 06 | Find first occurrence | π’ | 50 | Show |
| 07 | Maximum number of non-overlapping intervals | π’ | 50 | Show |
| 08 | Validate properly nested brackets | π’ | 50 | Show |
| 09 | Min-tracking stack implementation | π’ | 50 | Show |
| 10 | One-pass removal of k-th node from end | π’ | 50 | Show |
| 11 | Count number pairs | π’ | 50 | Show |
| 12 | Remove consecutive duplicates from sorted linked list | π’ | 50 | Show |
| 13 | Generate valid angle bracket sequences | π’ | 50 | Show |
| 14 | Remove elements within K distance | π’ | 50 | Show |
| 15 | Two sum | π’ | 50 | Show |
| 16 | Check valid anagram | π’ | 50 | Show |
| 17 | Lexicographical letter combinations of phone digits | π’ | 50 | Show |
| 18 | Place N cameras without conflict on blocked grid | π’ | 50 | Show |
| 19 | Custom Fibonacci sequence | π’ | 50 | Show |
| 20 | Ways to fill slots with single or double coverage | π’ | 50 | Show |
| 21 | Count connected components in network | π’ | 50 | Show |
| 22 | Height of binary search tree | π’ | 50 | Show |
| 23 | Compare BSTs for equal values but different structure | π’ | 50 | Show |
| 24 | Detect cycle in module dependency graph | π’ | 50 | Show |
| 25 | Merge and sort intervals | π | 75 | Show |
| 31 | Next greater element with position offset | π | 75 | Show |
| 34 | Reverse even-indexed nodes and append | π | 75 | Show |
| Total | / | 1425 / 3625 | / |
- Learnings
- Solutions of the AdventJS - 2023
- Solutions of the AdventJS - 2024
- Solutions of the AdventJS - 2025
- Solutions of the Advent of TypeScript - 2023
- Solutions of the Advent of TypeScript - 2024
- Solutions of the Halloween-dev - 2025
This repository is under MIT license, if you want to see what you are allowed to do with the content of this repository, please visit choosealicense.com for more information.
If you want to contact me, please see my socials medias in my GitHub profile.