Introduction
It is a good challenging to make some progress on this colliding circles algorithm. Julia spent over 5 hours on this Sunday after church service around 1:30 pm, up to 6:54 pm she managed to make the code work using recursive solution first, and then continued to improve time efficiency. Here is the progress report on this algorithm. At the end of day, the score will go lower after all test cases are run.It is a good training to learn how to stay calm, and review the time complexity, how to lower O(n*n) calculation to O(n) calculation. Julia tried to get more training on recursive function - DFS search algorithm.
It took Julia more than 6 hours to work on coding and then the algorithm can pass second sample test case and scored 8.78 first time at 4:00 pm this Sunday afternoon. So as a programmer, Julia also liked to be nitpick at her code and then questioned her practice, and then solved test case 4.
So exciting that Julia can bring herself first time in top 10% in the hackerrank contest, she could figure out how hard it takes to get a silver medal.
It is also very good practice to warm up simple probability knowledge when coding this algorithm. Once Julia figured out the probability is important in this algorithm, she started to make points on the algorithm.
Coding is fun
Julia only has 3 hours left for the contest, she has to finish everything before 10:00 pm. Now it is 7:18 pm.
Use some bible verse to celebrate the learning of the algorithm, favorite verse from proverbs or psalms.
Follow up after the contest
April 17, 2017 9:19pm
Code submission is here, score 11.28, extra 3 hours hard work.
First submission with a score is here, score 8 after 5 hours work, score 7.82 out of 65.
No comments:
Post a Comment