For the last two weekends, I have been working on problems from HackerRank. HackerRank is a site where you can solve programming puzzles. The challenges require writing a program that ingests some input test cases and returns an answer.
The problems often require understanding some fundamental programming concepts (like traversing trees or choosing the correct data structure). I am hoping that over time it will make me a better programmer.
Even for problems that seem relatively easy to solve, there are often some test inputs that are designed to stress the system. For example, on one problem, I wrote a recursive function to do some work. This worked fine for the sample test cases, but they eventually failed when the data inputs got very large. In order to handle all of the test cases, I had to refactor the code away from the nice, clean, recursive version to something a bit more messier.
No comments:
Post a Comment