Showing posts with label algorithm training should be science. Show all posts
Showing posts with label algorithm training should be science. Show all posts

Sunday, August 12, 2018

Training as a programmer

August 12, 2018

Introduction


There are so many ways to advance yourself to top programmer in the world. But it is not easy at the beginning, in the middle of process, maybe last 10% should be easy.

It is hard work, and a lot of coding. No recipe can replace hard working, training, coding every day, every week.

My training 


I have tried so many things last four years. I did see some progress but I still need to work on more.

Here are the list of things I worked on last few years.

1. Over 25 Hackerrank contests played; 100 algorithm problems solved or partially solved. Here is my hackerrank profile.
2. 40 algorithm questions asked on code review stackexchange.com. Here is my code review stackexchange.com web link.
3. 140 Leetcode algorithm solved up to August 12, 2018. Here is my Leetcode profile.
4. 350 mock interviews. Here is the link on my github for mock interviews.
5. 60 mock interviews as an interviewer. Here is the link on my github as an interviewer.
6. 2000 blogs about algorithm and related topics.
7. Real experience for code challenges, meetings like phone screen, onsite, mock interviews. One of blogs is here. Another one is here.


Based on my ex-coach advise in July 2018, I need to work on Leetcode easy level algorithm, work on easy level algorithms first, and then move on medium level algorithm, and then move on to hard level algorithm. I like to submit 200 algorithms on Leetcode.com first. I submitted 100 algorithm up to July 1, 2018. Let us see how long it takes me to complete second 100 algorithms, most of them are easy level Leetcode algorithms.

August 12, 2018, Leetcode solved problems:

July 21, 2018, Leetcode solved problems:


July 21 - August 12, 2018, 32 easy algorithms, 5 medium algorithms, 3 hard level algorithms.


Leetcode Tree algorithm


Here is the link to find all Leetcode tree algorithm. 91 algorithms include 27 easy, 55 medium, 9 hard algorithms.

23 solved, total 27
14 solved, total 55
2 solved, total 9.


Sunday, July 29, 2018

Leetcode 337: House robber III

July 29, 2018

Introduction


It is the medium level tree algorithm called House robber III. My learning experience covers a few areas. I chose to listen video lecture, and also I read some blogs related to the algorithm, one of blogs I read is served by grandyang.

I spent time to work on the video served by basketwangcoding, and I like to get some help from his lectures.

Plan to write C# code for House robber III.

My practice


Here is my C# code which is verified by Leetcode online judge.


New attitude


I understand that it is very important for me to submit as many algorithms as possible on Leetcode. So I slowed down everything and wrote a solution after I spent over 30 minutes to learn from video teaching from a Facebook engineer and also blog reading.

Algorithm training should be a science, I should understand the idea how to solve the problem first, and then also need to 100% follow the idea by applying my code against online judge.

What is science?


follow up on July 31, 2018
Do  not spend too much time to read the algorithm, once I understand the idea, I should move on the implementation. How quick I can write, how complete solution I can come out to cover the problem? How to find edge case, interesting subproblems through online judge.

I am training myself to be a good programmer.