Solutions to HackerRank problems
This repository contains solutions to HackerRank problems, available at http://www.hackerrank.com. These solutions are provided "as is". I give no guarantees that they will work as expected. Please refrain from using my solutions in the site.
You can compile all the problems by issuing the following command:
$ make
If you want to compile only a specific problem, issue the following command,
replacing <problem_id> with the id of the problem you want to compile (see
section "Problems Solved" for the list of possible ids):
$ make <problem_id>
Running a compiled problem is just a matter of executing a command similar to
the next one, replacing candies with the id of the desired problem:
$ ./candies
The following is a possibly innacurate list of the problems solved:
- Insertion Sort - Part 1 (
insertionsort1) - Insertion Sort - Part 2 (
insertionsort2) - Running Time of Algorithms (
runningtime) - QuickSort1 - Partition (
quicksort1) - QuickSort (
quicksort2)
- Pairs (
pairs) - Coin on the Table (
coin-on-the-table) - Median (
median) - Flowers (
flowers)
- Candies (
candies) - Lego Blocks (
lego-blocks) - Stock Maximize (
stock-maximize)
- Grid Walking (
grid-walking)
- XOR key (
xor-key)
- Oobleck Boxes (
oobleck-boxes) - Largest Sum Less Than M (
largest-sum-m)
- Walking on Grids (
walking-on-grids)
- Ice Cream Parlor (
icecream-parlor.cpp) - Alien Languages (
alien-languages.cpp) - Nice Clique (
nice-clique.cpp)
- Common Child (
common-child) - Mr K Marsh (
mr-k-marsh) - Similar Pair (
similar-pair)
- Restaurant (
restaurant) - Equal (
equal) - Cut Tree (
cut-tree)