HackerRank is a great place to learn, improve, play with your programming skills.
All challenges are runnable, except SQL and multiple choice question ones. They are verified with their default testcase (usually Testcase 0).
The curated challenges of Interview Preparation Kit.
Usage and tools
- Python 3.6 or 3.7 and some packages : numpy, SciPy, scikit-learn, requests, flake8, PyYAML
- CMake to build and run tests
- Modern GCC or Clang that comes with macOS or Linux. For Windows, you can use WSL, Cygwin or Visual Studio Comunity 2017
- Haskell (functional programming only)
- Java (some challenges and Java practice)
mkdir build cd build cmake .. make
cd build make extract-testcases ctest [-R filter]
It will download the challenge testcases and run solution programs.
A solution can be tested solely with
runtest.sh -t challenge-name [-n test-number] in its build subdirectory.
hrinit.pycreates a new file for a given challenge based on the HackerRank template. Default choice for language is Python 3.
runtest.shis the script used by CTest to verify the solution.
compare.pyaims to fairly compare the program output with the excepted one. It is necessary since some challenges use decimal numbers : we cannot simply use
hrtc2.pycan be used to download «purchased» testcases or to create new ones. Copy and paste the download links of input and output data.
Other (hacking) tools
hr_github.shcreates the testcases archive and sync the private repo to the public GitHub one
README.mdfiles with challenge lists (requires offline data)
hr_count.pycounts challenges and testcases - used to update toplevel
hr_offline.pydownloads challenge catalogs and more
hr_interview.pygets the playlist of Interview Preparation Kit
hr_menu.pydisplays a graphical menu to browse challenges and solve them when no Internet connection is available (requires offline data)
hr_db.pycreates a SQLite database - used to understand how data is structured (or not!)
Other online resources
- stack overflow and Mathematics Stack Exchange
- GeeksforGeeks Computer Science portal and resources
- Rosetta Code
- Compiler Explorer Run compilers interactively from your web browser and interact with the assembly (opensource).
- Ideone Online compiler and debugging tool which allows youto compile source code and execute it online in more than 60 programming languages.
- and many, many more…
Unlicense aka. Public Domain 🤘