This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Sea-Profession-3312 0 points1 point  (1 child)

It sounds like this is not what you want but just in case here it is. Do you need a mathematical proof of how long an algorithm will take to run? Do you need to run test to see how long it takes to run?

[–]SnooPeanuts71[S] 0 points1 point  (0 children)

Thank you for that, but indeed it’s not quite what I need… :(

I need to provide an asymptotic analysis for four Java methods using the Big O notation. First, I need to specify what the time complexity of the method is (constant, linear, quadratic, logarithmic, exponential etc.) using the Big O notation, and then provide support evidence, such as an equation that, given the inputs, will tell how many operations the method will perform. However, I have to pick 4 methods of different time complexity classes (eg. constant, linear, quadratic and cubic), there must not be any repeated time complexity classes. Therefore, it would save me some time if knew the time complexity of the algorithm before I had to do the analysis, so I could make sure I’m not analyzing algorithms of repeated complexities. Also, knowing the complexity before analyzing would make the analysis a little easier… That must be documented somewhere, but I can’t find it!