Saturday, December 8, 2018

weekly contest 114

Dec. 8, 2018

Introduction


It is my most favorite weekly contest. I play again but I did not perform very well, I like to write a blog to document my experience.

My performance


I took the weekly contest just after two hours code screen. So I was kind of tired.

First algorithm - I solved without any problem.

Second algorithm - I misunderstood the problem requirement, I thought about two set of numbers in the array, with same number of elements, but sum of one set is the double value of the another one. It is so tough to solve the problem, x1 + x2 +... + xn = sum, how many options?

Third algorithm - I wrote the solution but I failed the test case; so I learned that delete elements will affect the lexicographic order, I need to start from index = 0 position of char in the array again. I changed the idea but I came cross another bug, much more difficult to solve.



Actionable Item


I need to learn that the algorithm should be easy to solve and write. Make sure that I read word by word, write down the keywords and then argue with myself if the problem is too tough to solve. I should try to read the problem statement and understand again.


No comments:

Post a Comment