Skip to content

Latest commit

Β 

History

116 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

HackerRank

Repository with the solutions of HackerRank challenges.

Summary β€’ Installation β€’ Challenges β€’ Related β€’ License β€’ Contact

"HackerRank" logo

Summary

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).

Installation

  • 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 F1 and selecting Dev 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?
  1. Open the integrated terminal of Visual Studio Code.
  2. 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?
  1. Open the integrated terminal of Visual Studio Code.
  2. 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>.

Challenges

SQL

# 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 /

Regex

# 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 /

Security

# 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 /

Software Engineer Prepare Kit

# 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 /

Related

License

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.

Contact

If you want to contact me, please see my socials medias in my GitHub profile.

Packages

Used by

Contributors

Languages