I've included the test file if you need it, and also the feedback conversation is included at the bottom as a comment.
So it is a good solution - most of the logic looks quite similar to our reference answer, so I'm happy that you're answering this quite well :slight_smile:
What is being recommended is as follows (please ask more questions if I don't explain well):
So, where the mentor says:
what if you store
int matrixinstead of
At the top of your
Matrix.java, on line 3 you create a variable to store your
matrixAsString, which is passed in to the constructor, right? Then, every time that your
getRow method gets called you _re-_convert the matrix (line 10, for example) into the form of
int in order to return your
While this works, you shouldn't have to re-convert the matrix each time you want to get a row or column, after all it shouldn't change! So really, we could just do this once and store the output in a variable!