TopCoder, LeetCode and HackerRank

March 8, 2016

Tried all of them, still think TopCoder is the best, technically.

I believe TopCoder has a much longer history. Not sure why my friends all suggested LeetCode. It seems that HackerRank has the best relationship with the companies.

Interview service. Mathsworks and Bloomberg uses HackerRank to do phone interview. Two people over the phone can write and see the code at the same time...Basically like an specialized version of Google Docs for coding. Also, some companies uses the online challenges provided by HackerRank to do an initial screen. LeetCode and TopCoder does not provided this kind of service, I guess.

Coding Questions. I did not use HackerRank a lot. The coding questions are grouped into categories (domains/subdomains). Most questions seems pretty easy. It is good for beginner to learn coding step by step. The questions on Leetcode are interview questions, so it is somewhat good for preparing interviews. All questions on TopCoder come from previous contests. While each contest has different level of difficulties, many questions are harder than those on the other two websites. In general, questions on TopCoder are very well defined. The inputs and variables have very clear constraints and ranges. The questions on HackerRank also have a constraints section. However, questions on LeetCode are not that well defined. Usually no constraint is given. In an interview, you can ask the interviewer, but for solving problems online, this is not good.

The Editor. HackerRank has auto-complete. Leetcode will put in the other curly bracket for a code block. TopCoder can only do need to remember the curly brackets.

Online Testing. Not sure about the test case in HackerRank as I only did simple questions. In LeetCode, the test cases are contributed by one or two people. The problem is, for some question, a test case may make your code ran out of time or memory, while the code works well on other similar questions. Actually, since there is no constraints, for any recursive algorithm, I think we can always make up a test case that cause a stack overflow, or exceed the time limit. For TopCoder, the test cases include all test cases used by different people during the contest. Because of this, the test cases are usually more "completed".