Is Leetcode a good measure to test coding skills?

Developers who stick exclusively to Leetcode are in danger of building a tunnel vision attitude.
Listen to this story

An active and engaging community, Leetcode includes a range of programming languages and data structures. With time, the developer community has adopted Leetcode as an unofficial standard for testing coding skills. In theory, Leetcode is a comprehensive and harmless platform. Coders who are desperate to crack interviews with tech companies have succumbed to the ‘Leetcode grind.’ Several online forums on Reddit have reiterated the idea that dedicating all their time to sweating it out on Leetcode problems would be their route to exceed at the technical interview rounds in Big Tech companies like Google, Apple or Facebook. The overarching importance given to Leetcode has become an obsession among coders. In recent years, an increasing number of job seekers among developers have complained about the now mindless Leetcode grind. Coders have lengthy discussions on Y Combinator message forums about having spent years practising code only using Leetcode to no avail. 

Examples of Leetcode problems to solve for interview, Source: Medium

Limited use

Good engineers have qualities like a meticulous work ethic, writing code that is clean and legible, adhering strictly to their deadlines and spending a big chunk of their time designing before writing any code. Many programmers usually prepare first by setting up a linter in their code before they write any code. Lint is a tool that automatically checks source code for any programming or stylistic errors.

AIM Daily XO

Join our editors every weekday evening as they steer you through the most significant news of the day, introduce you to fresh perspectives, and provide unexpected moments of joy
Your newsletter subscriptions are subject to AIM Privacy Policy and Terms and Conditions.

The usage of Leetcode extends only to the technical round. Leetcode exercises, answers to which involve math tricks and obscure solutions, are few in number. Companies are moving toward tests that have more practical applications rather than solutions that can be memorised. Technical interview rounds are now leaning more towards pair programming tests on platforms like Coderpad. Paired programming is more apt considering it is an opportunity for the organisation to test the coder’s communication skills, teamwork and leadership qualities. Bug fixing tests that are more relevant for companies or resolving hypothetical situations where the interviewee has to explain how they would design a REST API or an API that suits the REST architectural style are better suited.

One of the major arguments made against Leetcode is that recruitment is a far more complex process and incorporates much more than coding skills. Soft skills have gained much more importance in the tech industry. Applicants need to have good communication skills to convey their ideas and expectations clearly. 

Download our Mobile App

Developers themselves now have started pointing out the missteps that companies make while interviewing coders. Many of them have clarified that Leetcode has simply become the most popularised method to understand if a candidate is worth interviewing. It only serves as a basic aptitude test. Developers who stick exclusively to Leetcode are in danger of building a tunnel vision attitude. 

No practical application

Experienced developers also suggest applicants take up other alternatives to sharpen their skills, other than artificially created puzzles like Leetcode. Developers must build passion projects like a website or an app which helps them undergo the entire process of development. The strength and uniqueness of a resume are also measured by the projects and internships that the applicant has undertaken. Personal projects are a much better way to showcase creativity and problem-solving skills. Internships are valued more because of how much closer they are to real-world programming. Coders have also suggested shifting to using other underrated resources like HackAttic challenges as compared to Leetcode. 

HackAttic is an underrated alternative to Leetcode

Coders have debated that Leetcode is useful for them to get used to data structures and algorithms initially and can even improve the applicant’s problem-solving skills. But even then, it doesn’t completely encapsulate the programming aptitude of an applicant. This is similar to how SATs are the standardised test for college entrance exams in the US which eventually only indicates how well the student performed at the SATs and are hardly indicative of their overall intelligence. 

Premature code optimisation 

Developers have also discussed how Leetcode often tends to push them to optimise their code prematurely. This can potentially lead to an “analysis paralysis” where problems which could have been solved are optimised right away. During problem-solving within the organisations, brute force solutions are more than enough. The brute force approach to coding is to look at all possible solutions before fixating upon a specific solution to a problem. On the contrary, it may look more appealing to curtail the tedious process by simply eliminating most solutions by using clever algorithms. However, developers with experience suggest that the focus on moving the logic from “O(N) to O(log n)” for optimisation is not very realistic. In reality, brute force solutions are the ones that make an actual dent in the performance of an algorithm. Solutions like ZigZag Conversion and Merge k Sorted Lists are better examples of this type of problem. 

Right approach necessary

Besides taking these factors into consideration to have a healthy sense of dependence on the platform, coders often fail interviews despite having practised using Leetcode for a long time. It is advisable not to filter problems by subject because it is necessary for applicants to habituate themselves to all kinds of problems. Sticking to a single kind of problem like string manipulation or sorting algorithms will mean the coder is making the test easier for themselves. 

Developers should also not treat Leetcode as a contest to boast how much faster their solution is, as these percentages aren’t an applicable factor. A different approach to the same problem will have a different pace and show a different metric. 

Sign up for The Deep Learning Podcast

by Vijayalakshmi Anandan

The Deep Learning Curve is a technology-based podcast hosted by Vijayalakshmi Anandan - Video Presenter and Podcaster at Analytics India Magazine. This podcast is the narrator's journey of curiosity and discovery in the world of technology.

Poulomi Chatterjee
Poulomi is a Technology Journalist with Analytics India Magazine. Her fascination with tech and eagerness to dive into new areas led her to the dynamic world of AI and data analytics.

Our Upcoming Events

24th Mar, 2023 | Webinar
Women-in-Tech: Are you ready for the Techade

27-28th Apr, 2023 I Bangalore
Data Engineering Summit (DES) 2023

23 Jun, 2023 | Bangalore
MachineCon India 2023 [AI100 Awards]

21 Jul, 2023 | New York
MachineCon USA 2023 [AI100 Awards]

3 Ways to Join our Community

Telegram group

Discover special offers, top stories, upcoming events, and more.

Discord Server

Stay Connected with a larger ecosystem of data science and ML Professionals

Subscribe to our Daily newsletter

Get our daily awesome stories & videos in your inbox

Council Post: From Promise to Peril: The Pros and Cons of Generative AI

Most people associate ‘Generative AI’ with some type of end-of-the-world scenario. In actuality, generative AI exists to facilitate your work rather than to replace it. Its applications are showing up more frequently in daily life. There is probably a method to incorporate generative AI into your work, regardless of whether you operate as a marketer, programmer, designer, or business owner.

Meet the Tech Fanatic, Deedy

Debarghya Das or Deedy is the founding engineer of internal enterprise search space Glean, a company that strives to solve workplace search queries