Showing posts with label week of code 35. Show all posts
Showing posts with label week of code 35. Show all posts

Monday, November 20, 2017

3D surface area - week of code 35

Nov. 20, 2017

Introduction


It is the first medium level algorithm in the week of code 35. The end time was 11 PM pacific time, I could not make it. Around 11:10 pm, only 10 minutes later, I submitted the code with a bug fix to pass a few test case. I enjoyed the problem solving, and will look into how to find the simple approach, less time consuming.

Code submission after the contest


Here is the C# code submitted after the contest, just 10 minutes after the deadline. Julia spent over  2 hours to work on the algorithm. The code passed 11 test cases, failed 14 test case, score 7.8 out of 19.


Triple recursion - week of code 35

Nov. 20, 2017

Triple recursion is the second easy algorithm in week of code 35. It only took Julia less than one hour to solve the problem.

Here is the C# code.


Sunday, November 19, 2017

Lucky purchase - week of code 35

Nov. 19, 2017

Introduction


It is the first easy algorithm in week of code 35. The problem statement is here.

The code submitted in the contest is here.

A bug 


I spent over one hour to work on the algorithm, my first two submissions could not solve test case 4 and 5. And then I went over problem statement again and again, read aloud one word a time in the problem statement and then had an idea to fix the bug issue.

If the char is not digit, then it should be ok. Only the digit char should be 4 or 7.


Saturday, November 18, 2017

Week of code 35

Nov. 18, 2017

Plan to play week of code 35 starting this Saturday. I am getting excited on the contest.

Nov. 19, 2017

6:53 PM
I only have 4 hours available for the contest, I started to work on the contest this 4 PM today. Yesterday I only spend one hour to read the advanced level algorithm.

Motivation


To work on crafting skills, I learn to work on contest at least a few hours each time. Today I will have at least 4 hours to work on coding, one of biggest achievement is to find my weakness through coding.

Statistics 


Time to work on contest from 4:00 pm - 11:00 pm. 7 hours is not enough for Julia to complete first three algorithms, she did not even have time to read hard level algorithm problem statement.

First easy algorithm, Lucky purchase, 4:25 PM - 5:37 PM, with a bug, and then spent extra 20 minutes to fix the bug.

Second easy algorithm, Triple recursion, 7:34 PM - 8:03 PM. The algorithm passed all test cases.

Third algorithm, medium level one, 3D Surface Area, 9:33 PM - 11:07 PM. I could not finish code before 11 PM. The contest ended at 11:00 PM.