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'
I tried this one in CPP my code reduced from 75+ lines to 25 lines.