Enjoy the awesomeness: https://www.hackerrank.com/domains/algorithms/
Keep pushing.
The repo is mixed up with Python 2.7.x and C++11/Java8. C++11/Java8 is to solve some problems otherwise TLE or stack overflow in Python.
Failed attempts are kept in the source code as documentation, which are annotated as TLE (Time Limit Exceeds) or MLE (Memory Limit Exceeds).
To run the code in HackerRank OJ, under if __name__ == "__main__":
, change the following:
f = open("0.in", "r")
# f = sys.stdin
to
# f = open("0.in", "r")
f = sys.stdin
If you like it, star ⭐ the repo.