Introduction
I like to write a blog to document my day with five easy level algorithms. If I can finish every algorithm in less than 15 minutes, then I only need less than 90 minutes.
It is just one and half hour. And I will be free to do anything else for the day.
True story
The first algorithm 453. Minimum Moves to Equal Array Elements, I misunderstood the problem statement, after I submitted the code, I noticed that n - 1 element should be selected every time, not 2 elements.
And I continued to work on the algorithm, I think that it is too much work to increase one for n - 1 elements, because it can not be determined easily. So I considered the case to change one element to decrease one instead.
Those two instances takes me extra time. I stopped to work on the easy level algorithm, and started again next morning.
Here is my discussion link on Leetcode.com.
Actionable Items
I need to work on algorithm problem solving every day, so I can improve my reading skills.
No comments:
Post a Comment