Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Big O question

Name: Anonymous 2012-03-25 16:29

I need to find an "efficient" algorithm for a problem and the best I could figure out is something that for each element it looks at all the other elements (n^2), but as it goes through it has to look at 1 less elements. So for 5 elements it does 5 loops+4+3+2+1. Is this still considered n^2 or is it better?

Name: Anonymous 2012-03-25 23:13

Looks like log to me.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List