• + 1 comment

    You can't get better than O(n^2), the goal is to print an nxn matrix where some of the elements are spaces and some are #. In order to do that you have to do at least the n^2 print statements.

    Just because you can code it in a few lines in a language like C# doesn't mean it's more efficient, that same process is going on behind the scenes.