Thursday, February 1, 2018

Leetcode 726: Number of Atoms (III)

Feb. 12, 2018

Introduction


It takes at least 10 times to learn a hard algorithm on Leetcode 726. One thing I did is to study one of C# solution on discussion panel, and review the C# code and try to make it better.

Iterative solution


Here is the C# code I spent over 30 minutes to rewrite. I will continue to review the C# code. The practice is very helpful for me to understand the algorithm.




No comments:

Post a Comment