Showing posts with label competitive programmer's handbook. Show all posts
Showing posts with label competitive programmer's handbook. Show all posts

Tuesday, March 27, 2018

Book reading: Competitive Programmer's Handbook

March 27, 2018

Introduction


It is my 10:00 pm mock interview as an interviewer. I never expected that I will interview a senior who will prepare Google onsite in 3 weeks. So I did ask two algorithms I studied today, and then I was so surprised to learn how good the peer gave his analysis, and also I learned the algorithm from his analysis.

I was told to read the book called: Competitive programmer's handbook by Antti Laaksoen, Draft December 10, 2017.

Advice from the peer


1. read Competitive Programmer's Handbook
2. 200+ on leetcode  - top 100 question
2.1 strong at DP - don't have to solve every DP
2.2 graphs -> open that topic and solve medium and hards

3. 10 minutes to solve a question -> look up the best solution for this problem -> don't code it immediately -> wait 2-3 days at least

Being interviewer: Leetcode 253: Meeting rooms II

March 27, 2018

Introduction


It is a medium level algorithm. I spent over 30 minutes to read a few blogs related to the algorithm. I feel that it is very interesting algorithm, I like to spend more time and write the algorithm as well.

Algorithm study


It is so much fun to study the algorithm. There are a few solutions but Leetcode does not have public discussion for the algorithm. So I like to practice a few solutions.



Actionable Items


I asked the question on the mock interview on March 27, 2018 10:00 PM. The peer gave me the solution and I was told to work on line sweep algorithm. Here is the analysis.

I just could not believe that the peer worked on the algorithm before, but he has very good understanding of the algorithm.