Is Competitive Programming secret to job at Google?

My take on myths surrounding competitive programming, applying and preparing for software engineer roles at tech giants especially FAANG companies

Aritra Sen
The Startup
8 min readJun 27, 2020

--

Photo by Christin Hume on Unsplash

Ever since I was a 10-year-old, I have been in awe of the amazing things I could see technology around me could do. It wasn’t until later in school that I came across basic programming and not until college, that I realized the hard work an individual had to put through to become a software developer, in companies like Amazon, Microsoft, Google, Facebook and others who are making groundbreaking strides in the field of science and technology every day.

Amongst all the other things that I came across in college was the definitive craze towards competitive programming. I particularly remember the Code Club Orientation I attended in my first year where I was told that if you want to get placed at companies like Google you need to excel in competitive Programming. I did end up doing competitive programming, primarily the Codechef monthly challenges regularly for around 6 months. It's now the end of my college life, and I have successfully got an offer as a Software Engineer at Google. I would like to discuss my take on Competitive Programming, the myths surrounding it, and what should be your focus while thinking about preparations for your interviews and if competitive programming is really the key to get an offer from the top FAANG companies.

Disclaimer: This isn’t an attempt to discourage people to do competitive programming. It instead is an attempt to encourage people who don’t like CP but wish to work on their problem solving skills to apply for opportunities in software developer roles in big companies and advices on how to suceed at it.

What is Competitive Programming?

The way Wikipedia describes it —

Competitive programming is a mind sport usually held over the Internet or a local network, involving participants trying to program according to provided specifications.

A lot of competitive programmers do competitive programming for attracting companies or preparing for job interviews. As a first-year student, that was how it was initially introduced to me and most of my friends — “The secret to getting into companies like Google or Facebook”. For someone who had adored these companies as a kid and the tech they made, this seemed like an immediate sell. However, it wasn’t until I had the first-hand experience in preparation for these companies, did I realize the fallacy in these ideas. I would definitely deep dive into how it isn’t the de facto solution, but first, let's dive into what competitive programming does well for a lot of people.

Why is it so attractive !!!

One thing I can’t deny from my shortlived journey of competitive programming is, nothing can replace the feeling of getting your solution accepted. Be it a Codechef long contest or a Codeforces round, the feeling is irreplaceable. I had started CP as a fresher in college and I was immediately hooked. The wide range of problems, the tricky optimizations and the adrenaline rush that came with it was enough to make it the center of my attention for those 6 months. Something that CP really helped me in was understanding the nuances of different Data structure and algorithms, how different language based optimizations could really take you a long way, and most importantly how important patience is to solve a problem. Also having someone to do CP with you, makes it a much more rewarding experience since you get to learn off each other, making it faster and more fun. Also, competition like Facebook Hackercup and Google’s Code Jam are events where familiarity with CP is a major advantage. However, this is where most good things about it end. After all competitive programming, in the end, is a sport that competes on solving tougher problems faster.

What's wrong with it, then?

I left competitive programming a couple of months after Codechef introduced its very own division system. While division system in itself wasn’t a cause of me calling quits, it sure was a trigger. The learning experience doing competitive programming is absolutely amazing for someone who is new into coding. However, most traits learned as a beginner are not exclusive to CP, but a more generic outcome of having practiced DS and Algorithm extensively in the process. This is something I realized eventually, along with how math-heavy the entire sport was turning into. After a certain degree of difficulty, the sport turns into a math-intensive field which requires deep-diving into number theory and geometry setting the bar really high. By the time, I reached this point I realized these topics not only don’t contribute to my interview preparations or software development experience but putting in extra effort into them just to maintain my ratings and performance score as a competitive programmer could really take a toll on you. While CP in itself is fun, its a very time-intensive sport, and the law of diminishing returns apply heavily to it.

But … How do I prepare for Google then?

The “You need to do Codechef to crack the Google and Facebook interview” myth has had its toll on most of us by now. I know people who despite being great problem solvers, didn’t even try to apply for roles in these companies since they weren’t avid CP devotees. Being someone who did forsake CP a long time ago and did manage to crack the interview, and I do know a lot of people who have done the same, I believe you can crack the interview without ever diving into the CP dungeon.

As already mentioned, the place where CP really helped me a lot was my basic understanding and hands-on practice with Data structures and Algorithms. However, CP isn’t really centered around that purpose. Resources like Hackerank and Leetcode who have a large set of important practice questions properly sorted according to difficulty and tagged according to concepts make it easier for you to map and practice topics you want to learn. In fact, these are the resources I used primarily to prepare before my Google coding interviews. Hackerrank also has a special 30 days of coding track for people who have never written a line of code before to gain proper familiarity. Moreover, since these websites are more data structure and algorithms centric with their primary target of doing better in your job interviews, you don’t particularly need to give in extra time to hunt down past interview questions for the purpose of familiarity. One counter-argument to the above narrative I have often come across is people saying, Isn’t Leetcode a competitive Programming platform as well?”. But is it? Although platforms like Leetcode and Hackerrank have things in common with CP websites, as their UI, working on your problem-solving ability, and questions requiring Time and Space Complexity Optimization using Data structure and Algorithms, that is where the similarities end. I remember reading a Quora answer which summarized it using this beautiful analogy —

Your idea is like training for running by doing cycling. Sure, it is much better than lying in bed and watching TV, and it still involving a lot of systems used for running. If you start doing it with no sports background at all, you may even see a great running improvement as a side effect. But at the same time, it is not the “right” way of training, and it is not what professional athletes are doing.

Similarly, while CP although it covers some bases for interview preparations, and LeetCode is similar to CP websites like Codechef and Codeforces in some aspects, they are fundamentally two very different things focusing on two completely different goals in terms of user experience.

OK!! that's fine but is Leetcode enough?

While Leetcode isn’t the de facto solution to cracking the coding interview, it will take you further in terms of familiarity and experience for your interviews that competitive coding interviews ever will. Investing your time equally on resources available on YouTube to get a better insight into problem-solving from channels like Back to Back SWE and Nick White will help you work on your problem-solving abilities. Also, all the time you would save not indulging in concepts like complex number theory and geometry for your Competitive Programming could be better utilized doing actual Software Development projects. You could get your hands dirty trying to get into web and/or app development — these are skills that will not only help you get better internships but also help you get hands-on experience, both of which will help build an attractive CV for applying for FAANG and other large companies.

So I don’t NEED competitive programming on my CV to apply!!!

Another big myth around CP is that adding your rating on Codechef and Codeforces makes you a gem of a choice for companies to hire. While good rating are proof of extensive experience with problem-solving, it doesn’t cover for the shortcomings in interaction during a whiteboard/paper pen-style coding interview. Questions in a real interview are more mainstream and relatively less difficult that CP challenges. The major challenge in interviews however falls down to interacting with your interviewer and explaining your thought process during an interview. Also, questions often are open-ended and are left to the interviewee to ask the correct questions for more information. This is another skill you might need to learn on your own. When it just comes to applying, while CP ratings have their own merit, internship experiences, working on self projects and accolades in events such as Hackathon are equally, if not more contributing to your CV and are considered in high regard. You could approach recruiters and employees over LinkedIn for referrals as well to apply and your LinkedIn profile is often considered a reflection of your skillset. Applying directly via the company’s career site is also an option that a lot of people prefer to do. When it comes to me, I credit my internship experience at Samsung, to why I managed to be considered for an interview with Google in the first place.

What Else Should I Work On?

An integral part of preparing for an interview is actually giving interviews. While you will get only one shot to interview for Google, giving mock interviews on services like Pramp and watching live interviews on YouTube from channels like interviewing.io is good preparation to be completely confident to be able to deal with the nerves for an actual interview. One thing that I did and absolutely recommend is to follow advice companies give to students interested in applying. While Google has an entire playlist on youtube dedicated to familiarizing aspirants to their hiring process (link here), other large tech companies often resort to blogs, youtube, and LinkedIn to make life more comfortable for aspirants. Try to take advantage of all available resources on the internet including interview experiences by current and ex-employees of these companies on forums like GeeksForGeeks and LeetCode Discuss among a few.

All the best to anyone who wants to apply for career opportunities in tech as a software engineer and had been previously demotivated by their inability to develop affinity to competitive programming. I hope this is a helpful read. :-)

--

--

Aritra Sen
The Startup

A Googler talking about things he loves — Coding, Music and Coffee :)