Timeline for Programming Languages Through The Years
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 7, 2015 at 21:01 | comment | added | vero | If this was not ascii art it would be O(n) to display an N. (draw 3 lines to the screen, each line is O(n) therefore O(n) complexity). Or, you could say, rendering the N has O(N) complexity... hehe | |
Apr 6, 2015 at 20:21 | comment | added | Alex A. | @NateKerkhofs: Ahhhhh okay. I was completely missing the point. Thanks. I guess the Julia answer is O(n^2). | |
Apr 6, 2015 at 20:18 | comment | added | Nzall | @AlexA. I think what Ebermann is talking about is that you have N string concatenation operations in your print function. we both do n² string concatenations in our functions. I do them once per inner loop iteration, you do them for every println(). | |
Apr 6, 2015 at 20:07 | comment | added | Paŭlo Ebermann | @AlexA. The println() function prints a string of n characters. I think that function call needs at least time O(n) to execute. In the loop, so O(n²) for the whole program. | |
Apr 6, 2015 at 19:28 | comment | added | Nzall | @PaŭloEbermann I'm not that familiar with big O notation or how to calculate complexity, but the Julia example looks like it's not O(n²). | |
Apr 6, 2015 at 19:22 | comment | added | Paŭlo Ebermann | I don't think that you can output a n × n ASCII art in less than O(n²). | |
Apr 6, 2015 at 19:03 | history | answered | Nzall | CC BY-SA 3.0 |