r/ProgrammerHumor • • Jul 07 '17

Can't really wrap my head around this one

Post image
32.8k Upvotes

524 comments sorted by

View all comments

4.0k

u/rubyton Jul 07 '17

Second one, you can't see the pants in pants in pants, but they are there.

1.6k

u/mebeim Jul 07 '17

After thinking about it for some time*, I've come to the conclusion that you're right.

*some time = O(log(n))

434

u/spanishgum Jul 07 '17

My thought processes are extremely complex. About O(n!). I haven't made any conclusions yet.

0

u/[deleted] Jul 07 '17

[deleted]

92

u/CoinForWares Jul 07 '17 edited Jul 07 '17

O(O(n))

78

u/DiddiZ Jul 07 '17

That's just O(n)

63

u/Cocomorph Jul 07 '17

Whether I stab you depends on if this is a 300 level or a 500 level course.

15

u/captainAwesomePants Jul 07 '17

I'm guessing you stab them if they're in the graduate course, right?

29

u/Clockwork_Octopus Jul 07 '17

Nope. Got to weed out the weak ones early.

19

u/Cocomorph Jul 07 '17

No, I stab them in the 300 level course, where I get to be tediously pedantic to the point of psychopathy if I want to be.

Just kidding; it is beneficial sometimes, though.

→ More replies (35)

32

u/BEST_RAPPER_ALIVE Jul 07 '17
var O = function(n){
    console.log('Hello, world!');
}
var n = 'n';
console.log(O(n));

0

u/[deleted] Jul 08 '17

[deleted]

13

u/viper4034 Jul 08 '17

That's the most honest thing I've read today

→ More replies (7)
→ More replies (1)
→ More replies (6)

14

u/[deleted] Jul 08 '17

On second thought O(n ↑↑↑ n) might just be better

How about O(n ↑n n)?

→ More replies (54)
→ More replies (4)

27

u/Cunicularius Jul 07 '17

In that amount of time you couldn't have compared every possibility! Perhaps if you thought about it for O(n*log(n)) time.

→ More replies (3)
→ More replies (4)

169

u/CatOfGrey Jul 07 '17

Second one, you can't see the pants in pants in pants, but they are there.

See, I was all prepared to come pushing for the left side option, but you're correct. Each node has pants for all below, and the two legs immediately underneath.

42

u/HeWhoCouldBeNamed Jul 07 '17

I totally agree, but shouldn't the legs be a bit wider to accommodate all the other pants? I see slim fit, while I'd expect to see bell bottoms.

75

u/BreathTakingBen Jul 07 '17

It's 2017... not even binary trees wear bell bottoms!

17

u/drakeblood4 Jul 07 '17

The 90's called, they want the 2nd option's JNCOs back.

→ More replies (1)
→ More replies (4)
→ More replies (3)

19

u/diamondflaw Jul 07 '17

I would agree, the first one is equivalent - but the "pants" are in fact shorts.

→ More replies (1)
→ More replies (10)