Showing posts with label jigsaw problem. Show all posts
Showing posts with label jigsaw problem. Show all posts

Thursday, July 5, 2018

Group discussion

July 5, 2018

Introduction


It is very pleasant to see myself to involve a small group and then we  had good discussion about algorithm together this Tuesday from 8:30 PM to 10:00 PM. This past Tuesday 8:30 PM, we had three people taking turn to discuss one algorithm a time. I had chance to give out an algorithm Jigsaw algorithm and lead the discussion with other two.

Discussion 


I always think about one algorithm last two weeks. I need more challenging thing to do. Last long weekend I worked on seven hard level algorithms. But I still thought about same algorithm again and again. My brain is working this way. So amazing! I better do not waste my energy on the same algorithm. 

Here is the discussion transcript. 

I also like to continue to search and find some interesting to read related to how to design API. 


Actionable Item


It is time for me to do some study about how a person can develop strong interest on algorithm problem solving. 

I used to read mathematics for computer science book. I found that it is very interesting to read. 

How to motivate myself to write 100 lines of code everyday?

July 5, 2018

Introduction


I spent over one hour to write a hard level algorithm called Maximum gap today. I noticed that it is too slow compared to those algorithms I wrote more than 20 times, for example, I can write Sudoku Solver in less than 30 minutes, and I even can remember how many variables I need and how many statements I need to write down, less than 40 lines of code.

I think that I need to train myself to write 100 lines of code against Leetcode online judge every day. There are 128 lines of code for the algorithm Maximum gap including empty line.

If I can write 100 lines of code, and also use Leetcode online judge to train myself to think more carefully about edge cases, I also learn to implement the idea. As a programmer, the most important part is to be able to write perfectly working code in limited time.

Leetcode algorithms


I only submitted Leetcode through online judge for 97 algorithms since 2015. I cannot compete with people with more than 500 algorithm submissions.

Actionable Items


I always think about how to solve jigsaw algorithm recently. One thing I like to do is to ask myself before I write code, can I make my idea more advanced in terms of time complexity, can I scale the problem to millions of row, do I have time out issue or run-out-of-space concern?


Wednesday, June 20, 2018

Time to get back on Hackerrank contest

June 20, 2018

Introduction


It is time for me to work on hard level algorithms on hackerrank. I can choose some algorithms I worked on the contest before. I like to get motivated and understand how difficult the algorithm can be in terms of scaling.

I spent half hour to write an algorithm and I just could not believe that I love the algorithm and it can be so easy.

One algorithm a day


This is my algorithm for the day. I wrote some code to figure out how to design API based on given classes and one API.

Here is the transcript. Let us call the algorithm sorting problem in two dimension array.