Saturday, June 17, 2017

Path Matching - week of code 33

June 17, 2017

Problem statement


Research and study plan 


It is the expert level algorithm. As a hackerrank player, Julia is still learning how to solve the expert level algorithm partially. What she likes to do is to dedicate a few hours, think about ideas, study related topic, and most important is to go over related algorithms in Leetcode, topcoder, hackerearth, and read some lecture notes.

After a few hours study, Julia starts to come out some idea to solve basic sample test cases first, leave timeout and performance issues as is until she comes out the great idea to solve the issue.

1. Leetcode 44 - wildcard matching - 20 - 30 minutes research and study, documented in the blog:
wildcard matching.

2. Review string search algorithm KMP, Rabin algorithm on topcoder. Link is here.

3. Review KMP and other string search algorithm on Julia's coding blog as well. Now it is 10:11am.

4. Review "the hidden message" algorithm on hackerrank contest. The blog is here.

5. Leetcode: Graph Valid Tree - the coding blog of grandyang is here.

Time is 9:07 pm, June 17, 2017
It is hard to figure out the idea to solve the path between two nodes. Julia likes to study some good algorithm.

She googled n nodes n - 1 edges meaning - no cycle in the graph, a tree?

6. Read lecture notes about union find data structure - lecture notes by Princeton is here. Now it is 9:55 pm.

Follow up after the contest


The code submitted in the contest is here. Score 0.47 out of maximum score 100.

Plan to study the Java code written by Salmur - score 100, link is here.

Plan to study the discussion provided by one of players. Link is here.

No comments:

Post a Comment