Feb. 21, 2016
Sign up for another test:
Juniper coding challenge
https://www.hackerrank.com/juniper-codesprint
Work on 4 questions:
https://www.hackerrank.com/contests/juniper-codesprint/challenges/leonardo-and-substring
The blog documented her experience:
http://juliachencoding.blogspot.ca/2016/02/code-challenge-count-of-substring.html
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.
Showing posts with label HackRank. Show all posts
Showing posts with label HackRank. Show all posts
Sunday, February 21, 2016
HackerRank - New School - Algorithm: Fix the cycles
Feb. 21, 2016
Another 2 hours on hackerRank:
Fix the cycles:
Problem Statement:
https://github.com/jianminchen/HackRank/blob/master/fixTheCycles/fix-the-cycles-English.jpg
Solution:
There are 4 cycles which share same edge: D->A, so if set D->A big enough then any cycle can be positive.
4 cycles:
A B C D A
A C D A
A B D A
A C D A
Simple solution.
30 minutes to read - take too long!
10 minutes to write code,
https://github.com/jianminchen/HackRank/blob/master/fixTheCycles/FixCycles.cs
Short term target of training on hackerRank:
Easy question,
reading time: 10 minutes,
code time: 10 minutes.
Know how to fix bugs, make more points
Another 2 hours on hackerRank:
Fix the cycles:
Problem Statement:
https://github.com/jianminchen/HackRank/blob/master/fixTheCycles/fix-the-cycles-English.jpg
Solution:
There are 4 cycles which share same edge: D->A, so if set D->A big enough then any cycle can be positive.
4 cycles:
A B C D A
A C D A
A B D A
A C D A
Simple solution.
30 minutes to read - take too long!
10 minutes to write code,
https://github.com/jianminchen/HackRank/blob/master/fixTheCycles/FixCycles.cs
Short term target of training on hackerRank:
Easy question,
reading time: 10 minutes,
code time: 10 minutes.
Know how to fix bugs, make more points
New School - HackerRank - algorithm: Beautiful Pairs
February 21, 2016
HackerRank is Julia's new school - her new lover. But problem statement is too long to read, and the test cases are not very clear.
Julia starts a new journey with HackerRank, she likes the algorithm problem solving. She spent 2 hours on Sunday morning to work on an easy problem in a "101 Hack Feb 2016".
Here is the question:
Beautiful pairs
Problem Statement
Here is her answer with a bug - failed 2 of 6 test cases:
Performance review:
40 minutes - calm down, read problem statement - she has to understand the problem first.
Failed 2 cases - that is the value of HackerRank - good practice.
Lesson learned:
20 minutes coding,
20 minutes bug fix: Array size: 1000->1001 to remove run time error,
the score: from 3.8 to 15.80.
Wrong answer for 2 test cases.
Here is the perfect version - fixed the bug.
Conclusion:
Each school is different, HackerRank is cool! Julia, just be humble. Make mistakes, always work on easy question, work on the first one in next 5-10 practice. One question a time.
Julia, you have to go through hackerRank contests, go through training - the article detailed on this:
https://code.google.com/codejam/contests.html
https://code.google.com/codejam/contest/6224486/dashboard#s=a&a=0
Be a better programmer to grow in your current job -
http://blog.hackerrank.com/3-ways-crush-technical-interview/
http://dandreamsofcoding.com/2014/03/18/dissecting-an-interview-question/
http://dandreamsofcoding.com/2015/01/09/dissecting-an-interview-question-math-is-hard/
http://dandreamsofcoding.com/2014/08/01/dissecting-an-interview-question-reconstructing-a-tree/
HackerRank is Julia's new school - her new lover. But problem statement is too long to read, and the test cases are not very clear.
Julia starts a new journey with HackerRank, she likes the algorithm problem solving. She spent 2 hours on Sunday morning to work on an easy problem in a "101 Hack Feb 2016".
Here is the question:
Beautiful pairs
Problem Statement
Here is her answer with a bug - failed 2 of 6 test cases:
Performance review:
40 minutes - calm down, read problem statement - she has to understand the problem first.
Failed 2 cases - that is the value of HackerRank - good practice.
Lesson learned:
20 minutes coding,
20 minutes bug fix: Array size: 1000->1001 to remove run time error,
the score: from 3.8 to 15.80.
Wrong answer for 2 test cases.
Here is the perfect version - fixed the bug.
Conclusion:
Each school is different, HackerRank is cool! Julia, just be humble. Make mistakes, always work on easy question, work on the first one in next 5-10 practice. One question a time.
Julia, you have to go through hackerRank contests, go through training - the article detailed on this:
- You’ll learn how to critically analyze your work. Because you don’t get credit for solving a problem until the code you write can generate the correct results for a large input set (and you don’t know what that input set looks like), you’re forced to think about things such as time complexity, memory usage, and nasty corner cases. Importantly, most of this work happens outside the context of a debugger. Debuggers are invaluable tools for figuring out why a given piece of code is buggy, but it’s better if you can write bug-free code in the first place. In an interview situation, candidates who can’t statically analyze their code generally have trouble showing their solution is correct (or figuring out why it’s not).
https://code.google.com/codejam/contests.html
https://code.google.com/codejam/contest/6224486/dashboard#s=a&a=0
Be a better programmer to grow in your current job -
http://blog.hackerrank.com/3-ways-crush-technical-interview/
http://dandreamsofcoding.com/2014/03/18/dissecting-an-interview-question/
http://dandreamsofcoding.com/2015/01/09/dissecting-an-interview-question-math-is-hard/
http://dandreamsofcoding.com/2014/08/01/dissecting-an-interview-question-reconstructing-a-tree/
Subscribe to:
Posts (Atom)