I used AI to analyze 10,000 Leetcode Discussion Posts
The Training and Growth Strategies of World-Class Developers
In my experience, successful people are successful because they have such enormous personal problems that literally becoming the best in the world is less hard than solving them. So all the productivity and health life tips are totally missing the point….
Anna Gát, Founder of Interintellect
The best engineers in the world have only one thing in common: their obsession. They are modern-day stoics who never settle, driven by an insatiable desire to achieve more.
This article is part of Peak Performance, a newsletter where I showcase the world's top achievers and explore the science behind becoming the best version of ourselves.
This edition is about the best developers in the world.
An Unknown Platform
When I graduated with my software engineering degree, I thought the doors of the tech world would swing wide open for me, welcoming me into any company of my choosing. Yet, to my surprise, I soon discovered that the tech hiring process was completely different from what I expected.
I spent the next years working for small companies, programming boring input forms, fixing buttons, and filling Jira tickets so that my project manager wouldn't complain. It was only years later when a friend, one of those obsessed engineers, explained to me how the hiring machine works.
Thanks to her advice I discovered a world I never imagined, and I started studying and practicing like crazy for two years.
Then, one day, I received this email:
We are pleased to officially extend to you an offer of employment as a Senior Software Engineer.
Looking back, in our conversation, my friend mentioned some books on algorithms, and a website called Leetcode.
This article is a deep dive into Leetcode’s community secrets. We’ll discover patterns in hiring, how the FAANG interviews work, and some amazing stories that programmers share there.
This is exactly what I would have liked to know as a junior developer.
Inside Leetcode
For those who don't know, Leetcode is a platform to practice typical programming problems that can be seen in job interviews. The page has a discussion tab where anyone can make a post.
Here’s what the Discuss tab looks like in Leetcode.
Programmers share their experiences in software interviews, sometimes describing the exact process they had to go through.
I decided to pull posts from the last 2 years (around 10,000) to look for trends and interesting data. Here are some facts about them:
FAANG companies are mentioned in a lot of posts:
Meta: 513
Google: 457
Amazon: 398
Apple: 23
Netflix: 5
There are lots of examples of senior software engineering interviews:
SSE: 147
And here’s one of the many random/funny posts I found there:
Remitly | Senior Engineer | Phone
…He never gave me anything but basic data to test, and I came up with edge cases myself.
Didn't seem to care about the interview, I was in the middle of coding, and he all of a sudden started blasting shitty bollywood music, I was like WTF?
…
So in the same spirit of that interview…
Let's Get the Party Started.
Anatomy of a Software Interview
Senior software engineering interviews are becoming increasingly standardized across most companies, most interviews follow the pattern described here: Meta | SWE - Infra | E5 Full Loop.
This is the usual flow:
First call to discuss your experience with an HR person.
Coding Round 1 (live or take-home test)
Coding Round 2 (or revision of the test)
System Design Interview
Behavioral Interview
The years of experience are a determining factor in the expectations companies have.
Junior developers are usually focused on learning how to code, how databases work, and how to assemble everything. They often feel buried under everything they have to learn, and most of the time they are honestly… just trying to survive.
Mid-level developers need to know more advanced features of the language they are using, they need to review code, guide juniors, and have a good understanding of the framework they use.
Senior developers need to be quick to understand complex systems, have a deep understanding of the patterns of clean architecture, be capable of scaling data-intensive systems, and preferably be able to fly.
Throughout the article, I will continue to include Leetcode links as references to what I am explaining.
Coding Round
Software Engineering is difficult, I understand the frustration, but experienced programmers know the only solution is practice, patience, and commitment. As you read Leetcode's posts, it becomes obvious how the best ones focus on practicing for years, like this person describing a 4-year journey: 400 Leetcode Problems Celebration | The Awakening.
What I love about these posts is that you can see what the actual interviews look like, like in Amazon SDE II Online Assessment Toronto:
You can also get a lot of useful recommendations, I saw a pattern where several posts, like 6+ months of hard work and finally offer from Facebook, commented on the usefulness of the mock interviews.
I found many success stories have one thing in common, they stressed on quality instead of quantity and emphasized on mock interviews.
Systems Design
The Systems Design interview is a big trend now, but this is a very tricky subject for less experienced developers: most of the time in your job you’re probably going to follow the already-in-place architecture, without actually understanding it.
My solution for that is simple, a golden book called: Clean Architecture.
Leetcode posts also suggest sites like Systems Design in a Hurry, and books like Designing Data-Intensive Applications. You can also find detailed explanations in posts like System Design 100 topics to learn.
Behavioral Interview
For the behavioral interview, you can practice responding to STAR-based questions, and if you need feedback I strongly recommend using ChatGPT.
The typical questions involve telling your interviewer about a time when you needed to solve a conflict, or you had to respond to negative feedback.
Patterns and AI
It was time to deploy the heavy artillery. To uncover patterns and intriguing insights in the data I downloaded, I used several AI techniques, primarily utilizing OpenAI's tools.
I began by using the API to classify comments. However, I quickly discovered that the models were stateless, which made it impossible to analyze a sequence of posts collectively.
I’m not going to write about the technical details, but I basically got the data into my database and started querying both the OpenAI API and ChatGPT.
One interesting thing I discovered is that ChatGPT performs much better with PDFs than spreadsheets. When analyzing a spreadsheet, ChatGPT first attempts to create a Python loop to search through the file. In contrast, the PDF version is analyzed as a whole.
With the PDF version, ChatGPT created this amazing list of the most common coding challenges in the interviews:
Google Online Assessment Questions:
Min Amplitude
Ways to Split String
Maximum Time
Min Abs Difference of Server Loads
Most Booked Hotel Room
Minimum Domino Rotations For Equal Row
Time to Type a String
Maximum Level Sum of a Binary Tree
Min Number of Chairs
K Closest TPoints to Origin
Odd Even Jump
Adobe Coding Challenges:
List of Books: Implement an autocomplete function.
Movie Length: Create a function to determine the maximum screening time.
System Design Questions:
Design an autocomplete service similar to Google's search bar.
Low-level design for a flight search system.
Design a real-time publish/subscribe mechanism used in applications like Google Docs.
Algorithmic and Data Structure Questions:
Friend Circles Problem: Determine the earliest time when all persons are acquainted based on log entries.
Determine if a path in an integer tree sums up to a given integer.
Earliest Acq: Find the earliest moment when all individuals become acquainted.
Frontend Specific Questions:
Implement features or fix issues in a given code snippet dealing with front-end technologies.
Create custom hooks in React for managing asynchronous operations.
Interesting Findings
Other interesting posts include very detailed explanations of the interview process, like Meta preparation strategy | Step by step guide | E4 and plus.
Here you can see a Tesla Senior Software Engineer interview, which seems easy to solve, but makes me think it’s for them to evaluate how well you design the architecture. That’s very typical in companies that are not FAANG.
There are also specific programming guides, like the Dynamic Programming Study Guide.
A Sea of Data, An Ocean of Doubt
This was a fairly philosophical article because I know that most programmers suffer from imposter syndrome, but in the years that I have been analyzing the best performers in the world, the only thing they have in common is their persistence.
It is only when we are in really uncomfortable and extreme situations that we grow like crazy.
I was especially intrigued by one of the posts I discovered while doing this analysis.
Anonymous
Lowest point in my life
I was working on a freelance project but got fired recently for bad performance, i am a fresher and they expected me to work like a senior engineer…
I dont wanna ask money at home , please suggest me what to do, i am applying now for other jobs , in interview process with some companies, should i just take what i get or use up all my savings jus to grind and interview for another month.
I want to share my reply to that comment with you.
Hi! I'm a senior software engineer now but had a lot of points like that in my life, at some point I was almost starving.
I'm no one to give you specific advice because only you know what could be best for you, but I wanted to tell you about some things that helped me along the way:
1- Stoicism: stoicism helped me a lot through those moments, reading a book like "The Obstacle is the Way" helped me understand these moments made me stronger, and more resilient. Reading about those stories can also inspire you and help you find other solutions.
2- Faith: your brain is in emergency mode right now, you can only see dark in the future, but in some years you'll be fine and in a completely different situation, dealing with different problems. Your next job can appear out of nothing, you just need to continue pushing, strong, and healthy.
3- People: asking for help is nothing bad, people like to help, and you can return the favor in the future. Also, you could try contacting again the companies you rejected, they already know you.
I hope the best for you, you'll remember these moments in the future as the foundation that made you a strong person.
If what we need is extreme situations to improve, perhaps we can induce those situations ourselves...
Subscribe to this newsletter for more experiments, more philosophy, and more unexpected music.