Zejun Lin's Blog

异国漂泊,野蛮生长

0%

Leetcode Journey

Title

This year is incredible! I believe I should be more prepared for the autumn job searching since it may become very difficult. One thing I guess I should do is to get more coding training for the interview process.

I believe it will be a long journey since currrently I only solve 65 out of 1200 problems. This is also the purpose of this post — to encourage & motivate myself by recording my journey on Leetcode — solving problems, attending weekly contests~

1. Start of the journey

It’s March 2020. Five years ago, I started to get to know C++. I still remember the first program I wrote is to find Perfect Numbers. Now I started to get myself an intensive coding training again. One thing I believe it’s good is that, although I only solve 65 problems for now, nearly half of them are medium problems.

2. Lastest Profile

LeetcodeInit

3. Milestones

I practice and solve previous problems on weekdays, then check my progress by participating in weekly contest on Saturday.


March 14 — 2008th

Though I receive many invitation mails of Leetcode contest (which is marked by me as spam…), I haven’t really participated in one yet. Tonight I decided to push myself forward.

I ended up with this:

180

I feel like the 1st & 3st question is easy but time-consuming. The second one is tricky and requires some careful thinking. I figure out one solution finally but got wrong answer twice, which increase my Finish Time as penalty. I spent the remaining 45 minutes trying to firgure out the last one but I cannot.


March 21 — 1476th

The test cases in the second one is really tricky!!! I WA four time which contributes to most of my Finish Time. I guess I got the wrong impression in the last contest that the 2nd & 3rd is easy but just time-consuming… This time I cannot think of a solution for the 3rd one… But one thing is lucky is that, the hard 4st question here is unexpectedly “easy” — I successfully did it just by brute force.

181


March 28 — 698th

The first three problems become “easy” again. I finished them in only 22 minutes! And I rank into the first 1000 the first time. However, I cannot figure out the last questions. And how can those people in the first page solved the four problems so fast!!!

182


Little break for DP

Previously, I found out that, usually, the last problems of contests are most likely about Dynamic Programming. Hence, I decided to devote lots of time in the following days to practice on DP, catergory them & try to write some posts.

When I look back, the last three weeks are really crazy. I even had 47 submissions a day in the very beginning.

w


April 04 — 736th — First Biweekly & Solve all!

I am so happy to annouce that this time I solved all the four problems. The only regret is the the ranking the ranking is the same as the last one, which I guess it’s because the problems are easies this time.

Another thing I notice is that there are less people in biweekly contest.

b23


April 04 — 996th — Failed to solve all again

You are never guaranteed to solve the 2nd & 3rd one even if you solve the last one.

And I have to say, 996, what an ironic number.

183


April 11 — 431th — First into 500!

You see, awice again! He’s really a crazy man with great talent… But I am satisfied with my progress. I solve all the four problems without any penalty and rush into first 500! God knows how can people like awice finish those so fast…

183


April 18 — 376th — But SAD!

My internship was revoked this week…. I was so upset but not depress! I turn the negative into coding TT. I got a lot of practice this week. I increase my speed of solving problems & maybe that is why I rank into 500 gain…

183


April 18 — 508th

All four again.

183


Solve 300 problems!!!

183


May 2 — 307th — New but small breakthrough

183


May 9 — 199th — First into 200!

Keep fighting while desperately seeking a new internship lol

But at least it’s a good news, I finally get into 200. Two month ago it was 2000.

183


April 25 — 747th — solve all but punished a lot

I guess I am at a stage where given enough time and ultimate trying chances, there is a not low probability that I can solve four weekly-contest-level problems. I should practice more to increasing either the thinking speed or coding speed or try to write bug-free codes…

183


June 13 — Bottleneck Encountered

This month my ranking keeps up and down in the range of 200-600, except for the last one, where I cannot solve the last one and also wrong answer on the third one one time, so my ranking decreases down to 1925

183


July 11 — Stabilized within 300

This week I almost enter top 100!!! Failed just because I forget to MOD the answer with $10^9 + 7$ and get 5 minutes penalty…

183


Solve 500 problems!!!

Another great news is that I get a summer internship offer at Baidu USA, even at this time — already summer. Maybe the progress will be slowed down due to the internship But at least I will keep participate in weekly contest

183


August — Redo hard problems from the beginning!!!

There’s a lot of work in the company these days that no much energy left to explore new algorithm topics.

Besides, I find that one bottleneck of mine is that my codes suck — when the problem becomes a little bit complex, such as some of the hard problems, my code tend to have bugs, which cost me a lot of time. I decide to redo hard problems I’ve done before, trying my best to write bug-free codes.


September 19 — 57th — Break into top 100~

I am excited to say that I was right last month, the intensive coding practice on hard problems increase my coding quality as well as coding speed — I finally rank into top 100!!!

Though there are outliers, I believe the average ranking gradually increase to around 150 !

183


October 7 — Solve half number of problems!

183