You are viewing a single comment's thread. Return to all comments →
Just create a 2 dimensional array and check each value for the conditions, if it is at the border or less than an adjacent cell, print out the number else print out X
this is how I did it, 2 dimension array then compared in for loop against adjacent arrays, using key of current char and replaced current value with X if conditions are met. No tests took longer than .02s.
my solution is same as you describing and it is running fine on dev-c++ but here its not working.