Nov. 20, 2016
Introduction
HackerRank - woman codesprint #2 - stone division
Julia learned one algorithm a time after the contest. Every time she fails to solve an algorithm in the contest, it is her favorite learning time.
Spend 20 minutes to study Editorial Notes about the solution first.
1. Julia's C# solution followed the study:
After one hour study of the code converted in C#, Julia found out that she overcooked the solution, got too far to do the work instead of being lazy letting recursive function play the role.
First time again in a few month after she worked on linked list, she found out that she had to learn the tip again to fully take advantage of recursive function, give the confidence to allow recursive function to take care of business.
2. Let us learn the recursive again, let it do the beautiful work. And Julia take a break.
C# solution - copy the code from editorial notes: score 50 - maximum score, pass all test cases
https://gist.github.com/jianminchen/85980e8f52c701027fbf25a8f2293e96
Play with code, remove memorization, score 16/50, fail test case 11 and up
https://gist.github.com/jianminchen/de08d6a479e059b4238bec1d23ab6e12
Continue with a blog about recursion study.
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