avatarS. G.

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

3202

Abstract

ered one (or zero) solution to problems which can typically be solved in many different ways.</li></ol><p id="c28f">There were several programming platforms like TopCoder that were interactive and had a browser based IDE. However, these were optimized for competitive programming where the problem description itself would span multiple pages and you’d spend half the time trying to figure out the right input/output format rather than building actual algorithms.</p><p id="fc58">LeetCode recognized a need and built a platform that was interactive, was closer to how interviews were being conducted in the real world and <i>just worked</i>. LeetCode does its job remarkably well- the problem definitions are succinct, the community is thriving and discussion forums have high quality discussions.</p><p id="bba5">Fast forward to mid 2020, and I was interviewing again. The coding interviews seemed a lot different from 2016, not only because we were in the middle of a pandemic (not the focus of this article), but also because how LeetCode had evolved as a platform.</p><blockquote id="50af"><p>LeetCoding was a verb now, and the system which barely had 150 questions in 2016 had over a 1000 questions now, with weekly competitions, gamification (you can earn “LeetCoins” for solving problems) and even something which I’ve named the “cheating mode”, which is a compilation of interview questions that have been reportedly asked by the various companies.</p></blockquote><p id="666d">Here is a screenshot of questions from the platform, showing interview questions tagged by company name:</p><figure id="34ef"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*CnwgR3q2S1g90WmzVwLidQ.png"><figcaption>The platform contains 905 interview questions reportedly asked by Google</figcaption></figure><p id="f095">For companies I’ve worked at, I’ve often gone through the list of all interview questions tagged for the company and found <i>several</i> of them on the internal interview question list (Some companies try to fight this by “banning” questions that are publicly known to have been asked).</p><p id="dbc2">The consequence of the “cheating mode” is that the interview bar ends up being raised — largely because the industry is flooded with self proclaimed “Prolific LeetCoders” who have solved over 1000 questions and are hoping to get interview questions that they’ve already solved before. Here is screenshot from the Blind app (an anonymous forum for Tech Employees), where we have a self proclaimed “Prolific LeetCoder” who has solved 1059 of the 1132 questions available on LeetCode:</p><figure id="52b5"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*ZCt_RYozh1aUn45efYQnyg.png"><figcaption></figcaption></figure><figure id="3c42"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*G99nM3YvKZakFM61KFHvdQ.png"><figcaption>A self proclaimed “Prolific LeetCoder” who has solved 1059/1132 problems on the platform</figcaption></figure><p id="ab5d">I did a little thought experiment to see how long it would take me to solve 1059 questions while having a full time job. Based on my experience, it takes approximately 1–1.5 hours to attempt a so

Options

lution and then look up/research alternative ways to solve the problem. So, solving 1059 questions would take 1059 hours. Assuming that you are trying to prepare while you have a full-time job, and that you dedicate 1.5 hours a day after work to LeetCoding, and never miss a single day, solving 1059 questions will take you a grand total of 1059 days, or approximately 2 years. 2 years?! Ok, WTF.</p><p id="1e83">Before we get into what you can do to stay competitive, let me point out that trying to solve every single problem on LeetCode with the hope that you will get a question that you’ve already solved has a few issues:</p><ol><li>It’s ethically <i>very</i> dubious. It’s like practicing for a test with leaked questions.</li><li>It just doesn’t scale. You probably don’t have that kind of time. And even if you did, it’s not the best use of your preparation time.</li><li>You’re probably <i>not</i> going to get an interview problem from that list , anyway. This is because what’s tagged is a sub-section of interview questions. And not every company asks LeetCode style questions.</li><li>Having practiced or seen an interview question might actually work against you. As the interviewers are becoming aware of the LeetCode Phenomenon, they are likely to tweak the problems to add/remove constraints which might throw you off.</li></ol><p id="09ac">Whether you love or hate LeetCode (or what the platform represents), the LeetCode Phenomenon is rampant and pervasive. A few months ago, when I screwed up the coding phone screen interview at Netflix (where I was asked a classic LeetCoding problem that I hadn’t seen before, and was able to solve, just not quickly enough), the empathetic Hiring Manager asked me to <i>brush up on my LeetCoding</i> and to take another shot at the interview in a month or so.</p><p id="46d5">Companies are taking steps to fight the issue of leaked questions:</p><ol><li>Some companies actively “ban” leaked questions.</li><li>Some companies are constantly creating new questions. At Square, for example, interviewers are asked to create their own interview questions (which are then approved by a committee to keep the bar consistent).</li><li>Then there is a set of companies that don’t ask LeetCode style problems at all (my heroes). Stripe and Shopify have a refreshing approach focused on solving problems that are a more accurate representation of the problems you’d be solving day to day (e.g. sorting a list of items based on a certain constraint). Interviews at Twitter (and certain teams at Netflix) tend to be team specific as well, and usually non LeetCode style. Lyft’s onsite consists of a laptop programming challenge which is open-book and you’re encouraged to use any public library.</li></ol><p id="85a7">All right, now what are you supposed to do to stay competitive with the Prolific LeetCoders? Surely, there is a better way than cramming 1059 problems? I cover that my follow-up article — <a href="https://chivagarg.medium.com/be-agile-not-prolific-f0f88b86aace">Be Agile, not Prolific.</a></p><p id="a97a"><a href="https://medium.com/@chivagarg">Follow me on Medium</a> to be notified whenever I publish a new article.</p></article></body>

The LeetCode Phenomenon

In the winter of 2015, I was working as a Software Engineer at Microsoft and looking for my next Software Engineering job (here’s why), albeit with little success. I remember expressing my frustration to a friend over a velvety Stout beer at a funky bar in Seattle’s Ballard neighborhood on a cold, rainy November night. I remember his words clearly:

“So, there is this platform which sort of lets you game the System”

That’s when I first heard about LeetCode- a programming platform which has now become the staple for coding interview preparation. The platform consists of interview style coding questions with an integrated, online IDE which lets you submit and verify the correctness of your solution. It also contains a stack-overflow style discussion forum which lets you post and upvote/downvote solutions to the problems.

Today, if you are interview prepping, you’re going to have to spend some late evenings practicing interview problems on LeetCode. In the words of one of my good friends and colleague:

LeetCode is the great equalizer. Whether you are interviewing for an internship, as a fresh grad just out of college, or as a seasoned Engineering Manager, you’d better be LeetCoding.

I crawled home from the bar that November evening and started practicing problems on LeetCode. Over the next few weeks I practiced several dozen problems. Practicing made a huge difference that time and I eventually landed and accepted an offer from Google in 2016.

I’d never seen anything like LeetCode before. Platforms I’d been using for interview preparation before LeetCode had been passive — with information flowing in one direction (from the author to me). There was the quintessential interview preparation book “Cracking the Coding Interview”. Then there was CareerCup/Glassdoor which had user generated content that could be perused to find commonly asked interview questions. The main shortcomings of these platforms are:

  1. They don’t really prepare you for interviews because they diverge from how real-world interviews are conducted
  2. They are less engaging (due to a lack of a community)
  3. It’s harder to internalize concepts/learning due to a lack of reflection. This is because you are offered one (or zero) solution to problems which can typically be solved in many different ways.

There were several programming platforms like TopCoder that were interactive and had a browser based IDE. However, these were optimized for competitive programming where the problem description itself would span multiple pages and you’d spend half the time trying to figure out the right input/output format rather than building actual algorithms.

LeetCode recognized a need and built a platform that was interactive, was closer to how interviews were being conducted in the real world and just worked. LeetCode does its job remarkably well- the problem definitions are succinct, the community is thriving and discussion forums have high quality discussions.

Fast forward to mid 2020, and I was interviewing again. The coding interviews seemed a lot different from 2016, not only because we were in the middle of a pandemic (not the focus of this article), but also because how LeetCode had evolved as a platform.

LeetCoding was a verb now, and the system which barely had 150 questions in 2016 had over a 1000 questions now, with weekly competitions, gamification (you can earn “LeetCoins” for solving problems) and even something which I’ve named the “cheating mode”, which is a compilation of interview questions that have been reportedly asked by the various companies.

Here is a screenshot of questions from the platform, showing interview questions tagged by company name:

The platform contains 905 interview questions reportedly asked by Google

For companies I’ve worked at, I’ve often gone through the list of all interview questions tagged for the company and found several of them on the internal interview question list (Some companies try to fight this by “banning” questions that are publicly known to have been asked).

The consequence of the “cheating mode” is that the interview bar ends up being raised — largely because the industry is flooded with self proclaimed “Prolific LeetCoders” who have solved over 1000 questions and are hoping to get interview questions that they’ve already solved before. Here is screenshot from the Blind app (an anonymous forum for Tech Employees), where we have a self proclaimed “Prolific LeetCoder” who has solved 1059 of the 1132 questions available on LeetCode:

A self proclaimed “Prolific LeetCoder” who has solved 1059/1132 problems on the platform

I did a little thought experiment to see how long it would take me to solve 1059 questions while having a full time job. Based on my experience, it takes approximately 1–1.5 hours to attempt a solution and then look up/research alternative ways to solve the problem. So, solving 1059 questions would take 1059 hours. Assuming that you are trying to prepare while you have a full-time job, and that you dedicate 1.5 hours a day after work to LeetCoding, and never miss a single day, solving 1059 questions will take you a grand total of 1059 days, or approximately 2 years. 2 years?! Ok, WTF.

Before we get into what you can do to stay competitive, let me point out that trying to solve every single problem on LeetCode with the hope that you will get a question that you’ve already solved has a few issues:

  1. It’s ethically very dubious. It’s like practicing for a test with leaked questions.
  2. It just doesn’t scale. You probably don’t have that kind of time. And even if you did, it’s not the best use of your preparation time.
  3. You’re probably not going to get an interview problem from that list , anyway. This is because what’s tagged is a sub-section of interview questions. And not every company asks LeetCode style questions.
  4. Having practiced or seen an interview question might actually work against you. As the interviewers are becoming aware of the LeetCode Phenomenon, they are likely to tweak the problems to add/remove constraints which might throw you off.

Whether you love or hate LeetCode (or what the platform represents), the LeetCode Phenomenon is rampant and pervasive. A few months ago, when I screwed up the coding phone screen interview at Netflix (where I was asked a classic LeetCoding problem that I hadn’t seen before, and was able to solve, just not quickly enough), the empathetic Hiring Manager asked me to brush up on my LeetCoding and to take another shot at the interview in a month or so.

Companies are taking steps to fight the issue of leaked questions:

  1. Some companies actively “ban” leaked questions.
  2. Some companies are constantly creating new questions. At Square, for example, interviewers are asked to create their own interview questions (which are then approved by a committee to keep the bar consistent).
  3. Then there is a set of companies that don’t ask LeetCode style problems at all (my heroes). Stripe and Shopify have a refreshing approach focused on solving problems that are a more accurate representation of the problems you’d be solving day to day (e.g. sorting a list of items based on a certain constraint). Interviews at Twitter (and certain teams at Netflix) tend to be team specific as well, and usually non LeetCode style. Lyft’s onsite consists of a laptop programming challenge which is open-book and you’re encouraged to use any public library.

All right, now what are you supposed to do to stay competitive with the Prolific LeetCoders? Surely, there is a better way than cramming 1059 problems? I cover that my follow-up article — Be Agile, not Prolific.

Follow me on Medium to be notified whenever I publish a new article.

Leetcode
Interview Preparation
Interview
Software Engineering
Recommended from ReadMedium