I am currently debugging someone else’s code that flips the “ups” and “downs” relative to the convention I am accustomed to.
I am currently debugging someone else’s code that flips the ups and downs relative
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Down. As @Shamim mentioned, this aligns with the “depth-first” terminology.
In computer science, trees are usually drawn with the root node on top, and the leaves at the bottom (i.e. upside down). It makes little sense but I presume it’s easier than correctly estimating how much space you’ll need to draw it “the right way up”.
There’s a similar question on Quora: Why are trees in computer science generally drawn upside-down from how trees are in real life?
And the Wikipedia article seems to agree.