Tuesday, July 24, 2018

One week for new habit

Introduction


I like to write down if I can build a new habit to code every day, using leetcode online judge to train myself.


How many days does it take for me to build a habit to write code daily?

I find out that it is easy to write code for easy level algorithms on Leetcode.com. I like to write easy level algorithms to train myself in next two weeks. Also I like to do some small research how to build a good habit to write code daily.

One week 24 algorithms


I wrote three hard, two medium, 19 easy level algorithms in one week. I train myself in a week using those 23 algorithms.

I started from July 17 to July 24, I wrote 23 algorithms and also passed Leetcode online judge. The algorithms are

Easy level
63, 88
113, 198,
202, 203, 205, 231, 234, 277, 278, 283, 290
303, 326, 343, 349, 387,
438,

Medium level
556
648

Hard level

132
273
301

In order to pass Leetcode online judge for the above 23 algorithms, I did a lot of work and surprisingly I was so happy to write code for those algorithms. I am a happy problem solver.

Leetcode 301 Remove invalid parentheses


It is hard level algorithm. I worked on the algorithm more than 12 months ago I have to make algorithm simple as remembering one test case, how to come out the story how to solve it, for example, hard level algorithm 301. Here is my practice documented in the blog.

Leetcode 648 redudant connection



Also I learn that I spent time to write down my frustration and learning more than 6 months ago, but at that time I did not learn that it is most important to write the code for the algorithm and pass online judge.

To build a new habit to write code and run against Leetcode online judge.

No comments:

Post a Comment