We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
For all struggling on the negative examples(#3 and #7), here is how to fix it in layman's terms. Set your variable for the highest sum to the lowest value a sum could be: -63. This makes it work because during the check if the sum of the current hourglass is greater than the current highest sum, it is failing because that negative number is lower than zero.
Day 11: 2D Arrays
You are viewing a single comment's thread. Return to all comments →
For all struggling on the negative examples(#3 and #7), here is how to fix it in layman's terms. Set your variable for the highest sum to the lowest value a sum could be: -63. This makes it work because during the check if the sum of the current hourglass is greater than the current highest sum, it is failing because that negative number is lower than zero.