dtison / HackerRank

My solutions to challenges on hackerrank.com in PHP and C++

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HackerRank

My solutions to challenges on hackerrank.com.

Most are in PHP, or C++ for speed or other reasons. Some Java might be included at times.

If it's a Functional Programming challenge, it will be either Scala or Haskell.

Pull Requests: Pull requests accepted for a valid solution in a different language or a using a different algorithm.

If you find any problem with the solutions - for any reason, feel free to open an issue.

Building the Solutions - C++ Solutions:

cd to Directory

Use ./build.sh

build.sh source:

app="${PWD##*/}"
echo "Building $app.."
g++ -std=c++11  -o $app $app.cpp

The C++ file will have the same name as the directory.

In the challenges where the whole program is built and tested, the test.sh script can be used to verify correct results for the Sample Input values.

To run basic test based on the Sample Input's for the challenge, Use ./test.sh

test.sh source:

app="${PWD##*/}"
cat input.txt | ./$app;

[input.txt is taken from the sample input given for the challenge.]

About

My solutions to challenges on hackerrank.com in PHP and C++

License:GNU General Public License v3.0


Languages

Language:C++ 86.4%Language:Shell 6.9%Language:PHP 5.7%Language:C 1.0%