Grinding Leetcode and Hackerrank

6/21/2019

Love programming? Want to get better? Or do you want to get a programming job? Then look no further than Leetcode and hackerrank. Dreaded by r/cscareerquesitons for being "stupid." With the amount of money in the field, there'll be a lot of people trying to squeeze their way in by any means necessary. The only way to get the right programmers is to ask them programming questions relevant to the job. Here's a rant from a Googler who hates interviewing people because most of them are terrible (link). Here's a rant about programmers who can't do basic control flow (link) (Leetcode).

I personally find these articles hard to believe, but I know people who have shadowed in interviews and they say otherwise.

Leetcode Profile
Hackerrank Profile

Even after programming for two years in college, I still had diffculty doing harder problems. The key is to just grind. In order to get good at anything, you need to do that thing a lot. Malcolm Gladwell estimates that 10,000 hours of practice will make you a world expert. One shouldn't be disheartened by the monumental task of grinding. The only surefire way, which has worked for me personally, is to just chip away at it slowly over a long period of time.

If you read 10 pages a day, you'll have read ~3,650 pages by the end of the year. If you solve 3 questions a week, by the end of the year, you'll have solved ~150 questions. I used to do questions on the train by paper and pen, but now I do that occasionally. For leetcode contests, I'll model the problem on a clipboard with a 4-color Bic Pen and then code something quickly. Normally, I'll solve at least 2, maybe 3 questions and that'll put me in the top 20% in these contests (link). As a final note, the problem with programming is that there are so many different specialities with their own sub-specialties. You may end up doing leetcode well but things like security or web app development terribly. So don't just train, go build something!

Here are some books recommended by Google to help you with Leetcode/Hackerrank (link). I have read a lot of this...

Here's a list of materials for System Design and scalability.
In a nutshell, a system (computer / program) needs: CPU, memory, disk, and networking. When it comes to processing requests, you want to make sure your systems (and their parts) are not overloaded. To help with the load, you can either buy better computers (vertical scaling), or spread out the load among many computers (horizontal scaling), or you can design better systems (algorithms and data structures).

  • An excellent intro book on the subject of System Design. (amazon)
  • A good primer on system design. (link)
  • A great article on the subject of scaling up. (article)
  • AWS does a great talk on scaling up to your first 10 million users (pick the latest). (youtube)

Basically my life (Steven Bradbury)