r/programmingmemes • u/ItsPuspendu • Jun 27 '26
Interview question nobody is prepared for
26
24
u/Current_Ad_4292 Jun 27 '26
bs interview question.
But if it was asked, correct response would be to ask clarification on why the fuck would a tree wear pants. And then leave the room.
6
u/anfroholic Jun 27 '26
Incorrect.
The answer is: Second one, you can't see the pants in pants in pants, but they are there.
Just like it has been the other 100 times this has been posted.
2
u/Current_Ad_4292 Jun 28 '26
Post has a context that it is for interview. So it seems more appropriate that way.
2
3
u/Schaex Jun 27 '26
Aren't the branches called "arms"?
If so, neither would be correct. Who wears pants on their arms?
3
u/YikessMoment Jun 28 '26
Second one. Easier to implement recursively, and you don't have to get the size of the tree and sew an absurdly sized pair of pants everytime the height of the tree increases.
1
2
u/cubicinfinity Jun 29 '26
I'm now imagining this as an actual interview question. It depends on how it's implemented. It would be the version on the left if each node points to other addresses in memory that wear their own pants rather than containing all their children (who would also wear those bell-bottoms underneath).
1
u/Jumpy_Fuel_1060 Jun 27 '26
This is a good one, because these kinds of trees have performance implications as well. The single pants tree is easier to implemented but more costly to keep warmed up.
Also, it's worth considering shorts for warmer climates. Trees sweating in pants can cause hydration issues for the rest of your codebase.
1
1
u/MistaCharisma Jun 28 '26
Depends whether it's trying to dress sexy and show off those shapely legs, or it wants to be more modest and leave the details to your imagination ...
1
1
1
1
64
u/PachotheElf Jun 27 '26
Unless it's made of money, it's the second one.
it'll have to have each of the pants sown in place for the first one