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 17:05

Yeah, that's still O(n2). It takes 1/2 as long as n iterations that are O(n) individually, and you ignore the constant multiple.

Name: Anonymous 2012-03-25 17:21

O(bullshit) is just shit made up by jews to enforce their style of coding

Name: Anonymous 2012-03-25 17:50

Name: Anonymous 2012-03-25 18:17

>>3
Get the fuck out , self-hating Jew, you are not wanted in here!

Name: Anonymous 2012-03-25 21:23

Big O is used to SHOWTIME

Name: Anonymous 2012-03-25 22:19

The Big O was a pretty good anime, but not the best.

Name: Anonymous 2012-03-25 23:13

Looks like log to me.

Name: Anonymous 2012-03-26 9:39

>>8
n + (n−1) + (n−2) + ... + 2 + 1 =
    (n+1) + ((n−1) + 2) + ((n−2) + 3) + ... =
    (n+1) × n÷2 =
    (n² + n)÷2

It looks nothing like log.

>>3
You're a kindergarten level programmer.

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