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.
That works, but it's easier to do using string (or char array) because you can easily assign a cell to 'X' if it's a cavity, which would be a better approach (in my opinion). Moreover, comparing characters works fine as well since ascii value '9' > '8' > '7' > ...
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 →
That works, but it's easier to do using string (or char array) because you can easily assign a cell to 'X' if it's a cavity, which would be a better approach (in my opinion). Moreover, comparing characters works fine as well since ascii value '9' > '8' > '7' > ...