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.
Do we really need to parse it into numbers. We can simply take Char 2D array and input each integer as a string. Then divide this string into individual characters (there are multiple ways of doing that). Comparison also works fine if we keep it to char array because ascii value of (char) '9' > '8' > '7' ...'2' > '1'
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Cavity Map
You are viewing a single comment's thread. Return to all comments →
Do we really need to parse it into numbers. We can simply take Char 2D array and input each integer as a string. Then divide this string into individual characters (there are multiple ways of doing that). Comparison also works fine if we keep it to char array because ascii value of (char) '9' > '8' > '7' ...'2' > '1'