Skip to main content
5 events
when toggle format what by license comment
Mar 1, 2015 at 22:30 vote accept user29291
Mar 1, 2015 at 22:29 comment added user29291 Thank you. I mistyped in my previous comment, should be 125 instead of 75.
Mar 1, 2015 at 22:22 comment added Yuval Filmus Make sure that you understand the concept of running time. If a line is run $s$ times then the running time is at least $s$.
Mar 1, 2015 at 22:20 comment added user29291 So, I ran the program and input 5, and the value of sum was 5^3 = 75. Does this mean it is O(n^3) ? Still not convinced.
Mar 1, 2015 at 22:12 history answered Yuval Filmus CC BY-SA 3.0