LeetCode vs HackerRank vs StrataScratch for Data Science
Categories
In this article, we put three interview preparation platforms up against each other in the battle of LeetCode vs HackerRank vs StrataScratch. Let us compare these three interview preparation platforms which are used by people working in Data Science.
The first step of getting a role in Data Science is, of course, the interview. The job search process is a long and arduous road, and if you get past the initial screening process with your resume and cover letter, not to mention the first screening call, there is still the actual interview itself. Or multiple interviews, as is almost always the case. While there are common personal and behavioral questions you can expect to be asked, the technical questions relating to your understanding of Data Science can be harder to prepare for.
LeetCode vs HackerRank vs StrataScratch: Which is Better?
A variety of educational platforms have risen to serve this need, giving users vast libraries of problems to test their coding abilities and industry knowledge, with a range of pricing models, question types, and domain focuses. As we look to get a role in Data Science, which ones best suit our needs? Let's dive into the battle of LeetCode vs HackerRank vs StrataScratch and find out.
Leetcode
Established in 2015, LeetCode describes itself as a "new way to learn," hitting the milestone of over one million users back in 2017, and boasting of a library of over two thousand questions. The most popular interview preparation platform, Leetcode also supports 14 different languages, including (most relevantly to the Data Science industry) Python and MySQL.
The most popular coding practice tool?
A quick look at LeetCode shows why it is such a popular platform. Out of the 3 platforms we will dig into in this article, Leetcode has the most fleshed-out and user-friendly UI, with a clean interface and a variety of topics to choose from and dig into. The code editor is also extremely advanced, with customizations for themes, key bindings, and font size, in addition to an analysis of memory used and required runtime for the code you write. This is on top of other minor conveniences, such as the ability to adjust the amount of space the code block takes up while keeping the question in view, as well as the ability to add custom test cases to test during your submission.
LeetCode's questions are also known to have very straightforward text introductions that go directly into the problem statements you are trying to solve, with the added convenience of links to similar questions on the platform if you have any particular areas you want to drill down on. Most of the problems also include a step-by-step write-up that explains reasoning to the solution, sometimes discussing different potential strategies to solve the challenge. Company-specific interview questions also include specific tips for how you should think about each question, and approaches to incorporate into your thought process.
The number one feature about LeetCode that users talk about is the community. With over one million users, the discussion boards with each question work as a vital resource to gaining insight into how other people solve a problem, both in how they approach the question and in what mistakes they may make. The power of such a massive user base also means a diverse input of information, and most questions you click into will have hundreds upon hundreds of comments on the discussion board. Even if the official guided solution article is behind the paywall, you can still easily dig up helpful responses in the discussion thread, or even get some feedback on your thought process and code from the wider community.
How much is behind the paywall?
While much of LeetCode can be accessed as a free user, there is also the option of getting a paid subscription, which gives you access to "interview simulations, a built-in debugger, and premium solutions and problems." This subscription comes at $35 per month, or $159 per year (saving $261).
Functionally, you can still get a fair amount of use from LeetCode even with only a free account. Even with premium solutions that are locked for free users, you can generally find good answers in the discussion boards.
However, a paid subscription does give you access to even more questions, sourced by popular companies, and even filters by the prevalence of those questions in interviews. The premium subscription also gives you little conveniences to the code block, including a debugger and autocomplete functionality, as well as miscellaneous resources such as help preparing for interviews through simulations.
What about Data Science?
Coming from a Data Science perspective, the biggest limitation about LeetCode is that the platform is focused on software developers and software engineers, and users outside of that field will not get as much value from the platform. This is reflected in the limited body of SQL questions on LeetCode, mostly under the Database and Data Steam categories. That limitation is also shown in the very direct style of LeetCode questions: while Data Science questions are complex and will often contain many assumptions that need to be spelled out, LeetCode's focus on algorithm questions makes it much easier to, despite their occasional complexity, write short, straightforward questions.
Check out our previous post on how a data scientist uses LeetCode to practice their python skills for their data science interviews.
More broadly, LeetCode questions focus primarily on answering very narrow, specific problems that might not reflect on a real-world work environment. Even with LeetCode's Data Science relevant questions on databases and algorithms, the questions focus more on syntax than on thinking broadly about situations you might have to deal with as a data scientist. Knowledge of very specific case scenarios of how one particular edge case works is much less important than the broader problem-solving needs of Data Science. However, it can still be a good exercise to brush up on your coding abilities, and help you work on your knowledge of language-specific syntax, which is a necessary part of establishing a baseline for your coding abilities.
All in all, LeetCode is a solid, well-known platform with an active user base, and can be a crucial resource for preparing for your interviews. However, it might not necessarily be the best tool for those looking at Data Science.
What else is out there? Let's move forward and find out the best alternatives to LeetCode for Data Science.
HackerRank
Another popular interview preparation platform, HackerRank boasts of a library of over 91 million challenges and a user base of 11 million developers. Founded in 2009, the platform supports 43 different languages, though not all languages are accessible in every challenge. HackerRank is also the only absolutely free platform of the three that we are comparing in this battle of LeetCode vs HackerRank vs StrataScratch.
Wait, Free?
HackerRank is 100% free to use for developers, or users trying out coding questions to prepare for interviews. Instead, HackerRank is a popular platform for companies to use in their interview process, and uses those companies as its paying customers. The customer base includes over two thousand companies, including over 25% of the Fortune 100. This means that familiarizing yourself with the HackerRank platform is an important step in the interview process, as many data science companies do use HackerRank for their technical tests.
While HackerRank does use an in-platform currency hackos, their only current use is to unlock test cases. Even these don't realistically lock you out of anything on the platform, and are pure convenience in supporting your problem-solving process to explore additional test cases, outside of the ones already provided, to further explore the challenge. Hackos are not a monetized currency, and in fact are fairly easy to earn: solving problems, participating in contests, and even just logging in multiple consecutive days. The HackerRank FAQ states that they are planning to create more avenues to earn and spend hackos in the future.
Another massively popular practice tool
Compared to LeetCode, HackerRank is much more geared towards data scientists and prospective data scientists, with a wider domain range across the industry to dig into, including machine learning, artificial intelligence, and algorithm libraries. There are also plenty of different tracks to explore to help you drill down on specific topics, such as regular expressions, data structures, and math, as well as language-specific tracks, covering Java, SQL, and Python. These tracks also have a progression of difficulty, with the earlier challenges being simpler introductory questions that get harder over time. This means HackerRank tracks can be especially useful to learn brand new topics from scratch, or just to brush up on any gaps you might have in your knowledge.
In addition to its library of challenges, HackerRank also holds a job board and certification challenges, as well as holding regular coding contests with a competitive ranked ladder. As many companies use HackerRank as a part of their interview process, in addition to familiarizing yourself with the platform, it can be a boon to your job search to develop your profile to show off your skills with the basic and intermediate certifications for different languages and domains. Even just being able to show off your HackerRank profile and competitive ranking on the contest ladders can be a valuable addition to your resume.
HackerRank's UI is slightly less developed than LeetCode's, though it still supports some degree of customization, such as support for EMACS and Vim, as well as tab space flexibility. The platform also has slightly more extensive solutions for each of its problems than LeetCode, with an Editorial tab for every problem that explains a handful of their test cases on top of the solution itself. Unlike LeetCode, HackerRank's code editor also includes autocomplete as a free feature, which is an additional convenience for non-premium users on the free platform.
Pitfalls of the HackerRank platform
Similar to LeetCode, HackerRank questions can be too similar to puzzles, a few steps removed from real-world problems you might face when doing "real work". Again, this can still help you scale up your coding abilities, setting the baseline for your skills. HackerRank's progression of difficulty in its challenges actually make this one of its main strengths, as going through a series of challenges can ensure you have a good degree of understanding of each concept or code language, in addition to helping to shore up any gaps in your knowledge. However, it is still important to recognize those limitations, where that may be a feature most useful to total beginners.
HackerRank also comes with some recurring pain points. A common critique is the occasional requirement that your answer be printed or put in string form, which can be frustrating in cases when you can derive the answer with code, but are still forced to manually type out the solution. Another common issue users have is the lengthy introduction to scenarios, where sometimes irrelevant or even nonsensical context is given to add colour to the challenge, which is an additional bit of fluff that may not add any true depth or nuance to the question. Finally, a recurring bit of criticism about HackerRank is the low quality of the questions, especially in comparison to LeetCode, with a not insignificant number of questions that are either hard to understand or are poorly written.
Find out if HackerRank coding challenges and their practice questions can help you prepare for your data science interview.
HackerRank is another solid platform that every aspiring Data Scientist should at least familiarize themself with, being closer to the realm of Data Science than LeetCode and a common platform used in the interview setting. However, it doesn't solve all of LeetCode's problems, while itself also facing a handful of different issues.
What's next?
StrataScratch
StrataScratch is an interview preparation platform specifically geared towards data science, with a library of over 1000 questions specifically pulled from data science interviews with 150 different companies and over 20 thousand community users. Founded in 2017 primarily to teach SQL at college universities, StrataScratch made its pivot to data science interview prep in 2020. The platform supports several Data Science coding languages, including Python and SQL. StrataScratch was "designed by data scientists for data scientists", and focuses on giving its users practice in applying data science concepts rather than merely on language syntax.
Designed for data scientists?
StrataScratch uses real-world questions asked by real companies in their Data Science interviews, so the top questions are all ones that have been asked to actual data science candidates. This means the question libraries can help you gain a better grasp of what concepts and fundamentals are most valued by each company, as well as get practical questions to test your data science knowledge, and at a higher level than, for example, the initial challenges given by HackerRank.
StrataScratch was specifically built for the advanced-beginner to intermediate data scientist to help grow your knowledge and advance your career. The dedicated focus on Data Science means StrataScratch covers a broad range of specific topics across the industry that you can drill down to. This includes the typical database coding with SQL and Python, and because raw technical coding ability isn't the only skill testing in interview questions, StrataScratch also covers a variety of non-coding topics, including statistics and probability, product sense, and system design.
While StrataScratch's code editor is a bit on the simple side, lacking the customization the previous two platforms have, it is unique in that the discussion tabs where users can discuss the problems are also frequented by members of the StrataScratch team, answering questions and offering feedback to your code and thought process. Unlike the direct and straightforward algorithmic questions given by LeetCode, real Data Science problems have many nuances and assumptions built into each question. The StrataScratch team works with users both on their code and with the process of building out their solutions, validating assumptions and discussing edge cases.
In addition, the platform has a unique tab of working solutions submitted by users, so you can have a look at how different people approached solving the same problem beyond just those who are active in the discussion threads. This is a great resource to explore alternative approaches to code a solution, or to optimize what was already previously written.
A look behind the paywall
While much of StrataScratch is accessible as a free user, a paid subscription also gives you access to additional questions, including a constant rotation of the most recent interview questions from specific companies such as Facebook, Amazon, and Google. This subscription comes at $29 per month or $120 per year (saving $228) or a $199 lifetime subscription.
You can functionally get a fair amount of use from StrataScratch with just a free account, with 50 questions available to all users for free. You can also still view the premium questions and try to answer them on your own, but the user discussion board, user solutions, and the official solution check are locked.
However, a paid subscription does give you access to plenty of more questions to work on, in addition to those previous locked solutions. New questions are launched every month, and premium users have access to the questions that are still in-rotation at company interviews, for the most up-to-date information on what companies perceive as important.
Access to the discussion board is possibly the most powerful premium feature, as the team is extremely active in discussing every aspect of each question with the community: beyond just the process of solving what the question explicitly asks for, the discussions also cover issues that are tangentially related to the question, how to present your thought process and findings in an interview setting, and even edge cases and potential fixes. The premium membership on StrataScratch comes with extensive support to walk users through every step of the process and help them improve.
Limitations of the StrataScratch platform
Particularly for users who are more used to the flow of LeetCode of HackerRank, the most noticeable limitation of StrataScratch is the less developed user interface. Though that may be a relatively minor pain point for most, the lack of customization and occasional clunkiness of the UI can be frustrating for users. StrataScratch also doesn't support certain features on the other more established platforms, such as contests and ladder rankings.
While some of the coding questions have fleshed out guides in the form of step-by-step articles, sometimes even including entire video walkthroughs of the solution, not all the questions in the library have that same in-depth explanation of the solution or a guide on the thought process behind solving the problem, instead including only the solution itself. Of course, like the other platforms, this can be somewhat offset by the resource of the discussion threads. Though the StrataScratch team is unique in interacting with the community on the discussion boards to work on problems, the lack of a formal guide to work by can be a struggle. The non-coding questions library has a similar issue in not having many "official" solutions, though those are being rolled out in the near future.
Though StrataScratch has all the basic qualities we want in an interview preparation platform, it is notably not as populated or as advanced as the more well-known LeetCode or HackerRank. However, it is still a powerful resource with a strong supporting team, and we are making constant improvements!
Now that we’ve covered each of the interview preparation platforms, let’s compare them side by side.
LeetCode vs HackerRank vs StrataScratch: An overview of the platforms
Now that we've covered each platform in length, let's compare them side-by-side for use by people working in Data Science. Here's a brief overview of the platforms and their respective features:
LeetCode vs HackerRank vs StrataScratch: Which is the Best Platform for Data Scientists?
As we compare the three different platforms between LeetCode, HackerRank, and StrataScratch, it's important to keep in mind that each one ultimately has a different focus and customer base. But which one suits our needs best, as data scientists and prospective data scientists?
LeetCode in particular is geared specifically towards software engineers and developers, which is a moderately different line of work than Data Science. The direct and straightforward nature of its questions, as well as the relatively small library of SQL and data problems, reflects on that divergence of purpose. Of course, it is still important to have a good understanding of what software engineers do, and you can also get good value out of LeetCode in building up your coding abilities and syntax. Ultimately, however, there is a fairly limited amount of utility that data science aspirants can get out of LeetCode.
HackerRank stands out among the three platforms as the one that would best serve absolute beginners, with its comprehensive tracks introducing different concepts and programming languages. In fact, some graduate Data Science programs even start off with the students doing the first 200 challenges of HackerRank in order to build up a solid coding foundation. HackerRank dives deeper into the Data Science realm than LeetCode, but the similar puzzle-like nature of its questions means that it will similarly be of limited use to those who already have a solid grounding with their coding abilities. That, along with recurring issues with the format and quality of their problems, leaves us still on the search for other options.
StrataScratch has a dedicated focus on the advanced-beginner to intermediate data scientist, and that, combined with the practical nature of its real-interview sourced questions, means that for data scientists and data science aspirants, StrataScratch is the best platform for you. The platform gives you practical experience beyond the theoretical framework provided in a classroom or bootcamp, alongside active support by the StrataScratch team to work through the nuances and complexities of the Data Science industry. Working through and solving these real questions from real interviews will be a vital resource to help prepare you for your actual interviews in the future!
And finally, remember that these interview preparation platforms and your raw ability to write code aren't the only parts of Data Science. There are a variety of other skills that are just as important, from the logistical side of reading other people's code and maintaining the readability of your own code, to the soft skills of collaborating with others and networking. Beyond that, there's the broader big picture, where you may be working with larger and larger problems that have to handle more and more factors than a single coding test problem. While obviously being able to answer these interview questions is vitally important, remember to keep these other factors in mind, and don't get lost working your way down the coding test rabbithole.
Good luck!