Hello all,
I have read the editorial and implemented the same. My code fails in some hidden test case. If any of you could provide some insight as to what I am doing wrong I would be grateful.
My submission: 71058284
I am extremely sorry if I am asking something that is fairly obvious. Thank you for your time.
You didn't read the editorial correctly
You are supposed to consider only numbers adjacent to -1 (since they are the ones that your choice of k affects) and NOT every number that is not -1.
Nice awareness by the way :)