Sunday, September 18, 2016

HackerRank Stryker Code Sprint Grind (II) - Point Filtering

Sept. 18, 2016

Problem statement:

https://www.hackerrank.com/contests/stryker-codesprint/challenges/point-filtering

Julia's C# implementation:

https://gist.github.com/jianminchen/41a5b656f3aeacde37588adef261d4a2

It was tough experience. Julia could not believe that how much time she spent time.

Here are the statistics, she tracked time spent while she wrote code; first time, she felt that it was important thing to do. More focus on the contest, come back to figure out what the issues are.

Here is the time line Julia worked on the algorithm: 
 /*
         * 11:20 start to read the question
         *       read 10+ minutes
         * Put some design notes together
         * bucket (size of b)
         * Add/ Delete/ Replenish
         * Req: maintain the size of b all the time
         *
         * Main List
         * Sort
         * remove/ first b
         * remove top1
         * not empty
         *
         * Time complexity: Sort using nlog(n)
         * Space complexity: Use Dictionary to store the points
         * Use integer to express 1.000 - 1000 instead of 1
         *
         * 2:35pm start to test the program
         * 2:59 wrong answer after 1 key is removed from bucket
         *      continue to fix the bug related to replenish the bucket
         * 3:07 passed the sample test case
         *
         * Summary:
         * Reading and design: 30 minutes
         * Coding: 1:27pm - 3:07pm
         * Testing: 30 minutes (2:35pm - 3:07pm)
         */

Summary:
1. 2 hours to read the problem, and thought about solution; while making a lunch, have a lunch
2. 90 minutes coding
3. 30 minutes testing

Score 40 (40 in total)

Actionable Items:

Big issue - Need to work on speed, time should be cut down from 3 hours to 30 minutes.

1. Study the C# submission:
No. 1: 
https://gist.github.com/jianminchen/ada496ab333e962988ca088a07deeac3

No. 2:
https://gist.github.com/jianminchen/5dc56ab8d69496c0c12e35ab5ccbeb73

No. 3:
https://gist.github.com/jianminchen/980c5626de67f33f2a39dee33eb770a8

No. 4:
https://gist.github.com/jianminchen/715754585de580142d514905c3ab4fea

No. 5:
https://gist.github.com/jianminchen/877ff5d9f0026ed007e55ef7386fd5a9

No. 6:
https://gist.github.com/jianminchen/e0a94f4f3b9432a81b51b68951647a8a

No. 7:
https://gist.github.com/jianminchen/e9ddff599b7ec3cfe53dd7d5c20f66bd

C++ implementation:
No. 8:   less than 15 minutes:
https://gist.github.com/jianminchen/61bdc567cb42b172ffc35f67a6442ff7

No. 9:   less than 15 minutes:
https://gist.github.com/jianminchen/e88c8e354af2a810fef03f64e4d228c6

No. 10:
https://gist.github.com/jianminchen/652c78955e9999e3ab5759fb9358f69e

No. 11:
https://gist.github.com/jianminchen/59fa3914b92b71dce3f707c62fdf99ab

Researcher, professor, Intel research:
https://www.hackerrank.com/kmalinau



Julia, read 30 submission using C++, full score, less than 60 minutes.

https://www.hackerrank.com/contests/stryker-codesprint/challenges/point-filtering/leaderboard

No comments:

Post a Comment