Skip to content

Latest commit

 

History

History
57 lines (47 loc) · 1.78 KB

File metadata and controls

57 lines (47 loc) · 1.78 KB

HackerRank Solutions

A collection of HackerRank problem solutions organized by programming language.

Structure

HackerRank/
├── cpp/           # C++ solutions (14)
├── python/        # Python solutions (6)
└── README.md

C++ Solutions

File Problem Category
absolute_element_sums.cpp Absolute Element Sums Arrays
bike_racers.cpp Bike Racers Graph / Matching
count_luck.cpp Count Luck Graph / DFS
cut_the_tree.cpp Cut the Tree Trees / DFS
gena_playing_hanoi.cpp Gena Playing Hanoi DP / BFS
gridland_metro.cpp Gridland Metro Intervals
hackerland_radio_transmitters.cpp Hackerland Radio Transmitters Greedy
making_candies.cpp Making Candies Greedy / Binary Search
matrix_land.cpp Matrix Land DP
maximizing_mission_points.cpp Maximizing Mission Points DP / Geometry
problem_solving.cpp Problem Solving DP
similar_pair.cpp Similar Pair Trees / BIT
task_scheduling.cpp Task Scheduling Greedy
the_longest_increasing_subsequence.cpp The Longest Increasing Subsequence DP

Python Solutions

File Problem Category
how_many_substrings.py How Many Substrings? Strings / Suffix Array
matrix_script.py Matrix Script Regex
morgan_and_a_string.py Morgan and a String Strings / Greedy
save_humanity.py Save Humanity Strings / Z-Algorithm
similar_strings.py Similar Strings Strings / Z-Algorithm
validating_postal_codes.py Validating Postal Codes Regex

Usage

C++:

cd cpp
g++ -o solution bike_racers.cpp
./solution < input.txt

Python:

cd python
python3 morgan_and_a_string.py < input.txt