April 9, 2016
Spend one hour (4:00pm - 5pm) on this C++ solution, talk about the code and implementation:
C++ solution
Julia needs to figure out the design:
For test case:
1
((ab)|(ab)) 2
The design is to construct a graph, NFA, and then, convert it to DFA, and the count how many ways.
It is hard to teach yourself through HackerRank a solution; so, Julia likes to catch up by some reading. Searching the web ...
Read some blogs to get some help:
1. Not very useful
2. Try to read it in 10 minutes
ucsd.edu lecture notes - homework solution
3. Another reading:
30 minutes reading - excellent content!
Julia learns better after she invested 8 hours to try to understand a problem, by playing with hackerRank.
princeton.edu lecture notes - regular expressions
Julia, try to memorize content on the above slides.
Learn quickly from lecture notes, a diagram for NFA:
((ab)|(ba)) 2
From January 2015, she started to practice leetcode questions; she trains herself to stay focus, develops "muscle" memory when she practices those questions one by one. 2015年初, Julia开始参与做Leetcode, 开通自己第一个博客. 刷Leet code的题目, 她看了很多的代码, 每个人那学一点, 也开通Github, 发表自己的代码, 尝试写自己的一些体会. She learns from her favorite sports – tennis, 10,000 serves practice builds up good memory for a great serve. Just keep going. Hard work beats talent when talent fails to work hard.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment