Saturday, December 22, 2018

Weekly contest 116

Dec. 22, 2018


Introduction


It is the weekly contest 116. I wrote the first two algorithms. And I like to spend a few minutes to document my experience.

weekly contest 116


Here is my performance.



Changes I made


This time I started to write the code directly on Leetcode.com. I tried to simplify the process, avoid debugging the code. I had to push myself think hard.

The first algorithm took me almost first 30 minutes to solve it. I did not read carefully about the problem statement, I solved one I practiced before; after I submitted and failed, I learned that the giving condition is different, N + 1 unique numbers, one unique number has N + 1 copy. So only one number has more than one copy.

The second algorithm I also worked on preprocessing carefully. I ran into so many issues and it took me almost 50 minutes. I need to learn how to expedite the process. I spent over 25 minutes to debug the code, and I found out that I failed so many edge cases. I submitted five times.

Good discussion about last algorithm is here. I spent over 5 minutes to look into the top player with a lot of competition experience, the leetcode profile is here.

Statistics 


Q1 1939 solved
Q2   990 solved
Q3   301 solved
Q4     40 solved

My ranking is 1045/ 2964. Starting from ranking 306, players solved only two algorithms. I plan to spend to go over those players with the score 7 as I have.

Here is the link of algorithm 962: Maximum width ramp.




No comments:

Post a Comment