Fuck, you might have just nerd sniper me with this one. Now I wanna math it out and figure out if the fabric needed for an infinite binary tree of pants converge to a finite value such that you have infinite pairs of pants using a finite amount of fabric
if the layer thickness off each pair of pants is 1/2 of the previous one, you can have an infinite number of pants, without any of them being infinitesimal or 0
edit: if with and height also decrease by a factor of 2, the total volume of pant would be 1 + 2*(1/8)+4*(1/8)2 ... . since the summands are a geometric series, that would converge. you could also get away with having the thickness stay the same for all layers, but that would create an infinetly thick 70s style flare at the bottom, whithout needing an infinite amount of fabric.
Oooh this is a juicy one. I'm not going to get into the specifics of it, but I'd answer it like this during an interview:
You can think of each individual node as a parent node to two other nodes, but also as the root node of a tree itself (as in, every node that's not a leaf node).
So each node with a left and right node looks like the node on the right, but removing that pair of pants would reveal a subtree that looks like the left.
So the answer is that every single node with a left and right node looks like the right, but also looks like the left, all the way from the furthest none-leaf node to the first actual parent node.
The crux is that pants is written the same in plural and singular. So it can be either one. One set of pants on the right, or several sets of pants on the left.
Depends on how flexible it needs to be, what's the night looking like so far, got a hot date, or looking to pick someone up on the dance floor? That hoop skirt isn't going to be great when ol' BT starts breakdancing.
163
u/Piisthree May 30 '26
The right side is pants. The left side is shorts. Didn't you guys pay attention in data structures class?
57
u/SillyWitch7 May 30 '26
The second one but if you look under the pants you'll see the next level's nodes wearing pants too. Its pants all the way down
14
u/ExiledHyruleKnight May 30 '26
Right... Binary trees have two legs... they don't have unlimited knees.
6
u/merRedditor May 30 '26
That's a 1990s binary tree sporting JNCOs on the right.
6
u/lovdark May 30 '26
Open source vs black box proprietary
5
u/FrankHightower May 30 '26
Why even argue when Tchaikovsky already gave us the perfect model?
(Credit: Ballet Arizona, 2021 production, Photo by Alexander Iziliaev)
4
u/blubernator May 30 '26
Right one, the left is embarrassing you see what’s under the pants ;)
4
u/_PaulM May 30 '26
Oooh this is a juicy one. I'm not going to get into the specifics of it, but I'd answer it like this during an interview:
You can think of each individual node as a parent node to two other nodes, but also as the root node of a tree itself (as in, every node that's not a leaf node).
So each node with a left and right node looks like the node on the right, but removing that pair of pants would reveal a subtree that looks like the left.
So the answer is that every single node with a left and right node looks like the right, but also looks like the left, all the way from the furthest none-leaf node to the first actual parent node.
3
u/Fun_Discipline_811 May 30 '26
The second
3
u/Lou_Papas May 30 '26
Unfortunately only the left one can be right. Please hire me.
3
u/Dave5876 May 30 '26
2
u/mbcarbone May 30 '26
Oliver Tree. 🙃
2
u/HTML-Wizard May 30 '26
right one- because its way more convenient. Imagine the binary tree have to align all those tiny pants.. would take ages!!
2
u/Drew_of_all_trades May 30 '26
This looks more like a gloves v mittens decision
2
u/Technologenesis May 30 '26
depth first search vs breadth first search be like
2
u/LordAmir5 May 31 '26
What about unbalanced trees?
2
u/Ander292 May 31 '26
Ngl serious question
1
u/Comfortable-Day-8440 May 30 '26
Definitely like this
1
u/Gigibesi May 30 '26
where the fk did that come from
1
u/mrheseeks May 30 '26
Considering the structure is abstract and not all legs are populated the later makes more sense to me.
1
u/TopChapter3407 May 31 '26
The crux is that pants is written the same in plural and singular. So it can be either one. One set of pants on the right, or several sets of pants on the left.
1
u/kiwibonga May 31 '26
I think for nestability it has to be little pants for each node.
1
u/HouseTraindIntrovert May 31 '26
I think it would be like this,
1
u/MattisTheProgrammer May 31 '26
they said pants PLURAL, so it's obviously the left one
1
u/neo42slab May 31 '26
They should ask back if the one on the right is just 31 kids pretending to be an adult wearing one set of large pants.
1
u/GaminIsHardnt May 31 '26
Do all your toes wear pants too? then its b. if they do, then what cursed pants are you wearing
0
u/PredictiveFrame May 31 '26
Depends on how flexible it needs to be, what's the night looking like so far, got a hot date, or looking to pick someone up on the dance floor? That hoop skirt isn't going to be great when ol' BT starts breakdancing.
0
u/temir_ra May 31 '26
right is a poncho, not pants.
and also they. not he. "binary", you know..
0
u/[deleted] May 31 '26
[deleted] — view deleted comment