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.
Since it's like initialized before starting to calculate hourglasses the best / simplest idea is to initialize it to the minimum integer value. In Java Integer.MIN_VALUE; in C++ climits::INT_MIN.
If your language doesn't have anything like this its an easy guess that the minimum value of a 32 bit signed integer can be used, since most languages use this as a default integer type.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
2D Array - DS
You are viewing a single comment's thread. Return to all comments →
Since it's like initialized before starting to calculate hourglasses the best / simplest idea is to initialize it to the minimum integer value. In Java Integer.MIN_VALUE; in C++ climits::INT_MIN.
If your language doesn't have anything like this its an easy guess that the minimum value of a 32 bit signed integer can be used, since most languages use this as a default integer type.