Wednesday, January 31, 2018

Leetcode 726: Number of Atoms (II)

January 31, 2018

Introduction


It is so nice to watch a video of Leetcode 726: Number of Atoms. I like to spend 20 minutes to watch the video first, and then write down some notes here.


Video lesson


Here is the video to watch.


Coding blog


Here is the coding blog. I plan to study the code as well. And then I will write a C# solution based on the idea.

Here is Java solution. I will work on C# solution based on Java code.


C# code practice


I spent 90 minutes to write the C# code. Here is the code. I felt that it is like flatten dictionary, only difference is to handle close bracket to return dictionary. Every close bracket will be handled right away, which likes a leaf node in the tree.

No comments:

Post a Comment