Sunday, September 18, 2016

HackerRank Stryker Code Sprint Grind (VI) - Julia and the Search Tree

Sept. 18, 2016

Problem statement:

https://www.hackerrank.com/contests/stryker-codesprint/challenges/julia-and-bst

Julia's solution using C#:

https://gist.github.com/jianminchen/4a52a1d20b60e5c6ccd9387b6fb24725

Could not believe her eye, Julia scored full score 100 out of 100 on a difficult algorithm.

Here is the timeline:

 /*
         *
         * Julia and the search tree
         * problem statement:
         * https://www.hackerrank.com/contests/stryker-codesprint/challenges/julia-and-bst
         *
         * 10:25pm - 10:47pm
         * read problem statement
         * Too many nodes in the tree
         * 1. Need to use iterative solution/ not recursive/ avoid stack overflow
         * 2. First construct the tree
         * 3. Then, maybe, add the calculation of sum
         *
         * Submit on 11:23pm
         * Score 80 out of 80
         * Cannot believe that it is difficult level!
         *
         */

  /*
         * 10:53pm - start to write code
         * 11:14pm - finish to construct the binary search tree
         *   Need to think about timout?
         *   stack overflow?
         *   what else
         *   Need to add more tasks
         */

Summary:
Total time is less than 1 hour.

1. 22 minutes to read the problem statement
2. 26 minutes to write code, 10:52pm - 11:23pm
No bug, just score 80 out of 80. Unbelievable success.



No comments:

Post a Comment