Let’s LeetCode with Fun
Tags: beginners, leetcode, algorithms, firstyearincode
Published: 2019-11-10 12:07:43

The post [Let’s LeetCode with Fun](https://www.coderscat.com/lets-leetcode-with-fun) appeared first on [CodersCat](https://www.coderscat.com).


In the recent 4~5 years, [LeetCode](https://leetcode.com/) is becoming more and more popular, especially in the interviewing of Big-N technology companies. Many job seekers take a lot of time on LeetCode to nail the interview.

![2019_11_08_lets-leetcode-with-joy.org_20191110_195838.png](https://www.coderscat.com/wp-content/uploads/2019/11/2019_11_08_lets-leetcode-with-joy.org_20191110_195838.png)



There are debates about the LeetCode style interviewing, someone says it’s a bad style, it makes the interviewing becomes a type of programming contest.

I think there are both good and bad parts of LeetCode, and we should treat it in an enjoyable way.

## Why Big-N use LeetCode in interviewing

Let’s be clear, even today there still a big demand for the positions of software engineers in the job market.

But the Big-N companies like Facebook/Amazon/Google/Microsoft get too many qualified applicants than they have available positions.

In the U.S. every year, Google gets more than [2 million job applications](http://theladders.com/career-advice/2-million-job-candidates-google) every year.

Yes, more than 2 million!

![read code cd](https://www.coderscat.com/wp-content/uploads/2019/11/2019_11_08_lets-leetcode-with-joy.org_20191109_190545.png)



And only 1 in 130 Google applicants gets an offer, per Forbes. More and more students in colleges go to get a Bachelor’s degree in CS. This means, to get an offer, candidates will face very fierce competition.

From the interviewer’s side, how to pick the right applicants from so many candidates?

Interview a software engineer is very hard, there is not such a unified and optimal way for it. Different companies have different styles.

LeetCode is the best way for this? Of course not, but let’s say it is a concise, simple and direct way. Why?

1. The question and results are clear.

   ```
   (a) The candidate can code to solve the problem 
   (b) The candidate solve it, with some bits of help
   (c) The candidate can not solve it, even with tips
   ```

   There are some other factors such as whether the candidate uses an optimized solution, how the candidate reacts to difficulties, how about the communications.

   Anyway, it will be a very clear result. If a candidate could solve an easy level question, then try a medium or harder one, this kind of investigation has a good distinction.

   This will make fewer differences from different interviewers.

2. To some extent, LeetCode can test a candidate’s programming ability and basic knowledge of computer science.

   If someone sucks at data structures and algorithms, he can not solve the question in such as short time(usually 15 minutes).

![leetcode cd](https://www.coderscat.com/wp-content/uploads/2019/11/2019_11_08_lets-leetcode-with-joy.org_20191109_192615.png)



On the other side, even a candidate passes all the questions asked in an interviewing does not mean he must be a good programmer. Usually, some other categories of questions will be prompted, such as system design, or questions related to a specific domain, even some stupid brain teasers.

## LeetCode Is Just a Game

LeetCode is a game, in a normal case, if you put more time and energy in it, you will do better. There are currently above 1000 questions in LeetCode, solving all of them will cost much of time.

Except for interviewing, if you don’t like to solve this kind of problem, it’s not a big deal, just ignore it. The required skills of a great programmer are much broader.

Practice through LeetCode is like practicing shooting in basketball.

Some boys are shooting accurately at a fixed position, but they can’t beat a professional player on the basketball court.

Suck at solving LeetCode ***\*does not\**** mean you are a bad programmer, the value of a programmer is proved by his work.

Creating some software, tools, and service used by massive people, solving the actual problem in the real world, this is a success for a programmer.

![2019_11_08_lets-leetcode-with-joy.org_20191109_175947.png](https://www.coderscat.com/wp-content/uploads/2019/11/2019_11_08_lets-leetcode-with-joy.org_20191109_175947.png)



## The Good parts of LeetCode

Even I listed many bad parts of LeetCode, but I have fun with it.

In my college years, I practiced coding with ACM contest problems, even I have not participated in ACM/ICPC contests.

After solving 500+ problems, I was more confident and proficient in programming and had no fear of data structures and algorithms.

The programming challenges from online judges are suitable exercises for beginners and intermediate or any programmer who want more proficient at data structures and algorithms.

The reason is *focus*, close to the principle of deliberate practice.

![2019_11_08_lets-leetcode-with-joy.org_20191109_185507.png](https://www.coderscat.com/wp-content/uploads/2019/11/2019_11_08_lets-leetcode-with-joy.org_20191109_185507.png)



We understand the problem, design an algorithm, write the code and test it, given some inputs, verify the answer, optimize it if necessary.

This is a very ideal way for programming involved algorithms, no cumbersome details in real-world programming.

This are the good parts of LeetCode.

If you want to practice other domains, like mathematics, functional programming, and artificial intelligence, have a try of [HackerRank](https://www.hackerrank.com/).

## How to LeetCode with Fun

Try to treat it as a hobby.

I am currently solving [LeetCode in a relax way](https://www.coderscat.com/leetcode), in my spare time. It’s like a snack after dinner.

There are many kinds of categories of problem, focus on one category will save time.

Comparing the different implementations of different languages also brings some fun, since I am also interested in programming languages.

For those who are preparing for the interview, my advice is:
**don’t push yourself too hard on this, try to enjoy it.**