I had a really hard time with Stack Overflows (I even tried my company's computer to see if it would be better). I even looked at pixel plotting libraries for Node.js.
It took me 1 hour to realize that I would not need to print the whole matrix - but I could just keep processing it until I got it to the smallest height, and then I print it.
However I would only know I got to the smallest height after I'm no longer on the smallest height and then I need to tick the clock just once backwards to get back to the smallest height and print it.
Javascript solution
I had a really hard time with Stack Overflows (I even tried my company's computer to see if it would be better). I even looked at pixel plotting libraries for Node.js.
It took me 1 hour to realize that I would not need to print the whole matrix - but I could just keep processing it until I got it to the smallest height, and then I print it.
However I would only know I got to the smallest height after I'm no longer on the smallest height and then I need to tick the clock just once backwards to get back to the smallest height and print it.
reader.js
10.js