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.
This is actually a legit meme. I've seen a bunch more variations on a Facebook post. After searching around, I think I found it (archive link if you prefer). I remember that there was a few more pictures but you can find more on Google Images if you're interested I guess.
Wouldn't they be nested pants? From the top, you'd see only the pants from the right image. As you traverse down the tree, each child has on it's own pair of pants that encapsulate all of its children?
Isn't that the American Dream though? For your children to have pants, and their children to have pants, and their children within their children to have pants, and so on.
If I had my copy I'd get you a picture, but I had made some creatures with branching legs with many feet... This made me want to see them again. They aren't in Sporepedia because I had upgraded my full PC three times, making me a pirate who was stealing from EA by using what I paid them for. :-(
First one. With the second one you would have to adjust your whole pants each time the tree change sizes. With the first one you just buy and sell a fraction of you pants accordingly.
Binary trees are usually drawn leaves downward, the opposite of regular trees, and they don't have a trunk.
Conclusion: If binary trees wore pants, the waistband would cover halfway down the first layer similar to the rightmost option here, but the legs would be waving in the air like a pair of bug antennae.
If you want to think that's pants-on-head retarded, then remember what we're discussing here.
Personal second preference, assuming that the binary tree is stood on its lowest-most leaves: Only pairs of leaves extending from the same parent node should have pants. That's like the leftmost option, but only the eight pairs of pants at the bottom are worn.
I'm unsure how to handle a single leaf. Maybe roll the other leg up.
Serious talk: I think it's the second one. Sure it's not as elegant as the first one, but binary trees are practical fellas, you save so much time when you wear just one pair of pants instead of O(n) of them.
If the binary tree as a whole is wearing the pants, that implies that it's a single thing, and wears a single pair of pants. That would be the second one. If each junction is wearing pants, they get their own pants, and it's the first one.
We're all assuming that the binary tree is perfectly balanced, and in doing so we're ignoring the far more common case where it isn't. In particular, the scenario on the left doesn't handle the case where a node only has one child, as there would be an ambiguous case where either the branch wears a single pant leg or if one leg is simply hanging. Therefore, only the right scenario can be correct since it properly generalizes too all possible binary trees.
Well it depends. If each node beyond the first is like a joint then #2 is probably best -- more material but less stitching needed, and easier to put on. Also better at staying warm, like mittens vs gloves, although it needs to be sealed at the bottom with individual cuffs for the last nodes to come through. But if each node is equivalent to a head, such that it needs to remain exposed to be comfortable, then #1 is the answer. #1 is also the answer if flexibility is more important than warmth. Also, women typically like a guy in better fitting pants, so #1 is good if trying to attract a mate and you don't feel shy about exposing your nodes.
it all depends on how you interpret your nodes and sub-nodes.
If you call every sub-node as a child, then the legs belongs to the parent and the first one is correct, otherwise, I would follow the 2n - 1 pants option too :)
Actually neither one because if the Human Body consists of a leg with two bones,the Femur and the condyles so since there are four there would not be 3 on each side but two.
If you were a human being with recursively-defined limbs, you'd wear recursive pants if the crotches were exposed, which I take to be nodes in a binary tree. Additionally, consider the case of hands: in some cases you may wear mittens, but generally you wear gloves in most situations because the benefit of warm. Fingered gloves also provide dexterity and for most applications of a binary tree, performance is the primary motivator. Gloves, then, are the pants of the hands. And like the pants of the hand, the pants of a binary search tree should wrap around each individual protuberance.
4.0k
u/rubyton Jul 07 '17
Second one, you can't see the pants in pants in pants, but they are there.
251
u/INTJustAFleshWound Jul 07 '17
Dogs: http://i.imgur.com/VVL1cxS.jpg
Men: http://i.imgur.com/MCdtrDa.gif
119
u/jakery2 Jul 07 '17
Either way, the balls are showing.
12
u/invalidxsyntax Jul 07 '17
Oh fuck don't let this become the new meta joke.
106
u/CptSpockCptSpock Jul 07 '17
First one
775
u/[deleted] Jul 07 '17
Wouldn't they be nested pants? From the top, you'd see only the pants from the right image. As you traverse down the tree, each child has on it's own pair of pants that encapsulate all of its children?
346
u/pekkhum Jul 07 '17
I have a sudden urge to find my copy of Spore...
2
u/__word_clouds__ Jul 08 '17
Word cloud out of all the comments.
I hope you like it
136
u/Versaiteis Jul 07 '17
Breadth-First Pants and Depth-First Pants
32
u/trout_fucker Jul 07 '17
Bring JNCOs back!!
32
u/digicow Jul 07 '17
Unknown (since we can't see inside the latter's pants). Every subtree, from just outside it, would look like the second.
8
u/spearit Jul 07 '17
First one. With the second one you would have to adjust your whole pants each time the tree change sizes. With the first one you just buy and sell a fraction of you pants accordingly.
7
u/Fornasty Jul 07 '17
Thicc
7
u/palordrolap Jul 07 '17
Conclusion: If binary trees wore pants, the waistband would cover halfway down the first layer similar to the rightmost option here, but the legs would be waving in the air like a pair of bug antennae.
If you want to think that's pants-on-head retarded, then remember what we're discussing here.
Personal second preference, assuming that the binary tree is stood on its lowest-most leaves: Only pairs of leaves extending from the same parent node should have pants. That's like the leftmost option, but only the eight pairs of pants at the bottom are worn.
I'm unsure how to handle a single leaf. Maybe roll the other leg up.
5
u/Jaystings Jul 07 '17
I would go to a rave with that second binary tree.
4
u/drharris Jul 07 '17
Doesn't matter as long as he puts them on left-side first.
21
u/foursticks Jul 07 '17
Did you just assume it's gender?
10
u/[deleted] Jul 07 '17
Kind of a normie observation from a non-programmer, but it's kind of funny. The binary tree is exactly the same as The note rhythm tree.
8
u/currently__working Jul 07 '17
Both. Underneath #2 is in fact #1
3
u/IceColdFresh Jul 07 '17
The right is how he would wear pants. The left is how he would wear shorts.
3
u/Cilph Jul 07 '17
Both.
3
u/remy_porter Jul 07 '17
Fun fact: the binary tree single-handledly kept JNCO in business since the 90s.
3
u/juantheman_ Jul 07 '17
I can't really wrap my pants around this one
3
u/KapteeniJ Jul 07 '17
Serious talk: I think it's the second one. Sure it's not as elegant as the first one, but binary trees are practical fellas, you save so much time when you wear just one pair of pants instead of O(n) of them.
3
u/[deleted] Jul 07 '17
The second one because it's probably much cheaper than buying many small pairs.
3
u/JFizDaWiz Jul 08 '17
JNCO for sure
3
u/Avander Jul 08 '17
The one on the right since binary trees were invented in the 60s
2
u/[deleted] Jul 07 '17
That depends entirely on how much of his private parts he wants to show off.
2
u/9009stinks Jul 07 '17
Skinny jeans or bell bottoms, guess it depends how old the binary tree is.
2
u/DavidFaxon Jul 07 '17
Some r/ContemporaryPhilosophy right there
2
u/DiabetesMan5000 Jul 07 '17
Woah dude! Do that with Hot pants for... scientific Research...
2
u/[deleted] Jul 07 '17
"Do you hang to the left or right, Sir?"
"Neither, my trusty tailor, I am a balanced tree"
2
u/[deleted] Jul 07 '17
Don't forget the fabled Binary Z-Cavaritrees
2
u/funkalunatic Jul 07 '17
Let's say you have a binary tree with N number of levels. How many different ways can it wear pants?
2
u/PrettyTarable Jul 07 '17
Option B, because Jinco
2
u/landmindboom Jul 07 '17
The pants are clearly white and gold.
2
u/ss0889 Jul 07 '17
did you just assume its gender?
2
u/Cley_Faye Jul 07 '17
Second option is the same for the root node.
2
u/c24w Jul 07 '17
I wouldn't expect my children to fit inside my pants/trousers.
2
u/ElloJelloMellow Jul 07 '17
Wtf does this shit even mean
2
u/R0B0_Ninja Jul 07 '17
Option A OR option B? I've browsed this subreddit long enough to know that the answer is simply "true ".
2
u/NoizeMe Jul 07 '17
The logical answer would be: Yes
2
u/[deleted] Jul 08 '17
ahh, the classic depth-first pants vs breadth-first pants problem
2
u/[deleted] Jul 08 '17
Ewwww and expose his inner nodes like that? Disgusting
2
u/[deleted] Jul 08 '17
The right one loves edm
2
u/[deleted] Jul 08 '17
Jnco
2
u/BigBrainAmWinning Jul 08 '17
Depends if you're doing white box or black box testing.
2
u/FH-7497 Jul 08 '17
Depends. Is it the 90s?
2
u/Eire_Banshee Jul 07 '17
I think it would just wear a skirt.
1
u/Tf2_man Jul 07 '17
Node values go straight to your thighs!
1
u/deaninous Jul 07 '17
It has a tendency to show off its performance. So 1 would make sense
1
u/fliparoo Jul 07 '17
Well at least glad the color of the pants is blue, and not gold.
1
u/CSS_Kuribo Jul 07 '17
It would be the one on the left
1
u/Venthe Jul 07 '17
Here's your problem. You are supposed to wrap your PANTS around it :)
1
u/APoliteFuccboi Jul 07 '17
If the binary tree as a whole is wearing the pants, that implies that it's a single thing, and wears a single pair of pants. That would be the second one. If each junction is wearing pants, they get their own pants, and it's the first one.
1
u/SkierBeard Jul 07 '17
Like this
1
u/pwr22 Jul 07 '17
Both
1
u/jewdai Jul 07 '17
it depends, which one would your balance be better?
1
u/foreveralolcat1123 Jul 07 '17
If you have multiple legs within a single sleeve, it's called a dress--so I think it'll be the left one.
1
u/TheSilverFalcon Jul 07 '17
No, no, no, the pants should be on the two path chains on the left. The two on the right are it's "arms"
1
u/lights_nugs Jul 07 '17
Thanks Grimsby
1
u/G-raybles Jul 07 '17
like this Not to be confused with like this?
1
u/sandieeeee Jul 07 '17
Second one other wise his dicks gonna flop around.
1
u/goldfishpaws Jul 07 '17
Did you guys ever stop and realise what we're arguing about?
1
u/sanburg Jul 07 '17
He's obviously wearing the pants on the right in... parallel.
1
u/LuckyDesperado7 Jul 07 '17
Well it's binary so I guess it depends on the pronoun.
1
u/SamL214 Jul 07 '17
Who says it's a he?
1
u/pessimist_stick Jul 07 '17
in 1997, on the right.
2017, on the left.
1
u/handsarefull Jul 07 '17
This is easy do guys have a third leg for their pants. No so the second one
1
u/ThirdFloorDraft Jul 07 '17
Depends on what you're looking for
1
u/personalityson Jul 07 '17
First, to comply with the definition of a binary leg
1
u/[deleted] Jul 07 '17
Off topic, do non-binary people wear pants?
1
u/[deleted] Jul 07 '17
It's a binary tree? Then yes.
1
u/[deleted] Jul 07 '17
1
u/ProlapsedPineal Jul 07 '17
Doesn't matter. The requirements say "dressed as a Chinese dragon".
1
u/Enlight1Oment Jul 07 '17
who'd want to wash 15 pairs of pants? obvious the single is better.
1
u/Gortyuty Jul 07 '17
We're all assuming that the binary tree is perfectly balanced, and in doing so we're ignoring the far more common case where it isn't. In particular, the scenario on the left doesn't handle the case where a node only has one child, as there would be an ambiguous case where either the branch wears a single pant leg or if one leg is simply hanging. Therefore, only the right scenario can be correct since it properly generalizes too all possible binary trees.
1
u/keithioapc Jul 07 '17
http://imgur.com/a/Jj2GX
1
u/Trithis2077 Jul 07 '17
umm... yes?
1
u/sensitivehack Jul 07 '17
This is the problem that JNCO jeans was trying to solve.
1
u/[deleted] Jul 07 '17
Depends on how you process the image.
Depth-first or Breadth-first?
1
u/ANUS_CONE Jul 07 '17
Yes
1
u/DOPE_AS_FUCK_COOK Jul 07 '17
Hmmm... I think they would be JNCO buyers.
1
u/M0n0poly Jul 07 '17
This entire question is contingent on how you define 'pants'
1
u/lightgiver Jul 07 '17
Yes
1
u/Got5BeesForAQuarter Jul 07 '17
I see a terrorist cell hiding in those pants and trick is going from the second picture to the first picture.
1
u/iNeedToExplain Jul 07 '17
I really don't have the mindset of a programmer, because I thought the answer would be obvious. Everyone else is talking about recursion and shit.
It has to be the one on the right. There's no way the legs would fit around all those nodes and edges at once on the left.
1
u/seanpeters1234829193 Jul 07 '17
Top ten questions science still can't answer
1
u/Potatasium Jul 07 '17
*trousers
1
u/chironomidae Jul 07 '17
Well it depends. If each node beyond the first is like a joint then #2 is probably best -- more material but less stitching needed, and easier to put on. Also better at staying warm, like mittens vs gloves, although it needs to be sealed at the bottom with individual cuffs for the last nodes to come through. But if each node is equivalent to a head, such that it needs to remain exposed to be comfortable, then #1 is the answer. #1 is also the answer if flexibility is more important than warmth. Also, women typically like a guy in better fitting pants, so #1 is good if trying to attract a mate and you don't feel shy about exposing your nodes.
1
u/wienerschnitzle Jul 07 '17
T H I C C
1
u/robbiekhan Jul 07 '17
Hipster or Slacker? That's the real question.
1
u/radditor5 Jul 07 '17
Lots of pants with less material, or one pants that uses more material .. hmm?
1
u/WuhanWTF Jul 07 '17
Idc what people say, the "if a _____ wore pants" meme is the funniest meme to have ever existed.
1
u/[deleted] Jul 07 '17
Binary you always have two possibilities. Now you can chain many together so left is right for a change.
1
u/PillowTalk420 Jul 07 '17
Neither. Only the lowest level would have pants.
1
u/thrown_away_fam Jul 07 '17
Neither. Like this -- get with the times, man!
1
u/vampyire Jul 07 '17
01001
1
u/Phileas_Fogg Jul 07 '17
/r/programmerhumour q
1
u/Crispy_socks241 Jul 07 '17
i think he would wear a skirt cause he's a crossdresser. lyke me.
1
u/[deleted] Jul 07 '17
hahah i totally get it
1
u/poopadoodles Jul 07 '17
Umm me either
1
u/twatcycle Jul 07 '17
so is a binary tree like a fractal where its just multiple iterations of the same choice, wearing pants?
1
u/jmdugan Jul 07 '17
paradoxes are true
1
u/SynkkaMetsa Jul 07 '17
Depends on what he wants to cover up on his lower half
1
u/dylanthepiguy2 Jul 07 '17
The one on the left is shorts.
Answer = !!(does shorts extend pants)
1
u/Liesmith424 Jul 07 '17
Are you running Python 2 or 3?
1
u/f0rcedinducti0n Jul 07 '17
Second one.
1
u/chpoit Jul 07 '17
DOn't worry, you only need to wrap pants around it
1
u/[deleted] Jul 07 '17
Or BSP in which case you'd only pay attention to the pants you were rendering at the time.
1
u/[deleted] Jul 07 '17
One leg should be red and the other black.
1
u/[deleted] Jul 07 '17
It depends on whether you want skinny or boot-cut.
1
u/Eddy_Moon Jul 07 '17
The JNCO ones
1
u/[deleted] Jul 07 '17
Obviously the binary tree would wear the Jnco's
1
u/CrimsonMoose Jul 07 '17
B, when you see the object you get two options, left leg or right leg. you don't know what's in either yet, but you can check.
1
u/highowl Jul 07 '17
Second one - it allows the leg room to self-balance, or "adjust it's junk" as I will now refer to this procedure.
1
u/Getoutabed Jul 08 '17
I loved that tumblr dog pants meme
1
u/explorer585545 Jul 08 '17
It depends on whether the majority of the nodes want to get laid, if so they would go with the later.
1
u/joaoprp Jul 08 '17
it all depends on how you interpret your nodes and sub-nodes.
If you call every sub-node as a child, then the legs belongs to the parent and the first one is correct, otherwise, I would follow the 2n - 1 pants option too :)
1
u/FinallyGotReddit Jul 08 '17
Jnco making a comeback.
1
u/SamtheSham5000 Jul 08 '17
Actually neither one because if the Human Body consists of a leg with two bones,the Femur and the condyles so since there are four there would not be 3 on each side but two.
1
u/Brycer17 Jul 08 '17 edited Jul 08 '17
https://imgflip.com/i/1s5ou0
Molecular and regular.
1
u/Christron Jul 08 '17
Is it path dependent?
1
u/CreganTur Jul 08 '17
It depends- are the pants a container?
1
u/PhilxBefore Jul 08 '17
Like this.
1
u/whoiscraig Jul 08 '17
Reject the Tree Binary!
1
u/wbmo Jul 08 '17
It depends on how many base cases you have
1
u/pbrettb Jul 08 '17
question is, can you imagine an in-between step?
1
u/c3534l Jul 08 '17
If you were a human being with recursively-defined limbs, you'd wear recursive pants if the crotches were exposed, which I take to be nodes in a binary tree. Additionally, consider the case of hands: in some cases you may wear mittens, but generally you wear gloves in most situations because the benefit of warm. Fingered gloves also provide dexterity and for most applications of a binary tree, performance is the primary motivator. Gloves, then, are the pants of the hands. And like the pants of the hand, the pants of a binary search tree should wrap around each individual protuberance.
1
u/DJWalnut Jul 08 '17
if it's a non-self balancing tree and you insert a sorted list into it, do you wear funny asymetrical pants or go commando?
1
u/[deleted] Jul 08 '17
Exponential bell bottoms!
1
u/Aggie_15 Jul 08 '17
It's an individual vs society question
1
u/[deleted] Jul 08 '17
Obviously the correct answer must be shown by out puting all possible btrees for a given tree
1
u/Whitemochaforvanessa Jul 08 '17
Male tree on the left. Female tree on the right.
1
u/techlover22 Jul 08 '17
Man, dat binary thick as shit ------!!!
1
u/[deleted] Jul 08 '17
Infinitely large pair of pants?
Or
Infinite pants?
1
u/msaroka Jul 08 '17
I'm going with recursive pants.
1
u/cauliny Jul 08 '17
Yes.
1
u/_lazlothegreat Jul 08 '17
I love the pants memes cuz it remains popular but stays lowkey enough to not become obnoxious
1
u/drake_chance Jul 08 '17
Do your leg hairs wear pants? Obviously the right one, inch worms.