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.
  • HackerRank Home

    HackerRank

  • |
  • Prepare
  • Certify
  • Compete
  • Hiring developers?
  1. Prepare
  2. Tutorials
  3. 30 Days of Code
  4. Day 11: 2D Arrays
  5. Discussions

Day 11: 2D Arrays

Problem
Submissions
Leaderboard
Discussions
Editorial
Tutorial

    You are viewing a single comment's thread. Return to all comments →

  • parkercancode
    7 years ago+ 6 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.

    49|
    Permalink
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy