Introduction
It is time to work on the algorithm called "Extra Sweet". I tried to enjoy the problem solving but after a few hours I only scored 4 out of 30 points on this medium algorithm.
Progress report
Now it is 11:11 PM, Oct. 28, 2017. I need to move on next medium algorithm.
Follow up
Oct. 29, 2017 8:26 PM
After the contest, I did study editorial notes, and also go over some code submissions.
Here is the code I wrote in the contest, I tried to set up linked list to double link two nodes.
Nov. 1, 2017
It is hard to figure out what was wrong with my research in the contest. I did try to figure out the issue, I made 4 submissions.
Extra sweet
First submission - the issue found and then I started to work on, mix the setup of linkedlist with the calculation of extra sweet.
Second submission - set node's left neighbor to the first node with value 0.
Third submission - set line 89 - point to the next point to the dummy node nodes[n] with index value 0.
No comments:
Post a Comment