Difference between revisions of "Talk:835: Tree"
m |
|||
(7 intermediate revisions by 2 users not shown) | |||
Line 16: | Line 16: | ||
The heap doesnt look like a heap to me (or at least not a common binary heap): the root has 4 children for a start, and it is not balanced, for seconds. {{unsigned ip|108.162.250.163}} | The heap doesnt look like a heap to me (or at least not a common binary heap): the root has 4 children for a start, and it is not balanced, for seconds. {{unsigned ip|108.162.250.163}} | ||
− | As a matter of fact, there's a structure that is a combination of a tree and a heap: it's called a "Treap". | + | As a matter of fact, there's a structure that is a combination of a tree and a heap: it's called a "Treap". {{unsigned ip|162.158.89.205|19:11, 9 December 2017}} |
+ | |||
+ | argh that pun is awfully bad | ||
+ | |||
+ | also my post has nothing to do with the treap one [[User:An user who has no account yet|An user who has no account yet]] ([[User talk:An user who has no account yet|talk]]) 10:48, 6 September 2023 (UTC) | ||
+ | :I added in the relevent 'missing signature' to the Treap comment, which helps delineate that comment from what your addition is. As you may have seen with some of your pre-username contributions, it's something that passing editors do, but we'd of course prefer not to have to. And it can be left that way by accident, as well as not even knowing. But we have both {{template|unsigned ip}}, used above, and {{template|unsigned}}, for those who 'should know better'... ;) | ||
+ | :Anyway, convention is that you add a ":" to your reply if you were replying off a prior comment (or add one more ":" than was there ahead of the thing you're replying to). That nests indents. Your reply (to the comic) isn't indented, so would be assumed to be a brand new comment, not a comment-reply. If you see what I mean. | ||
+ | :(Though I know from your prior messages that you also reply (to indented replies to you) with no indenting at all. But if you take a look at how cascades of replies are shown, in a heavy and complicated discussion, you should see how it helps work out who is replying to what, a little bit.) | ||
+ | :Another advantage to ":"ed replies is that line-breaks (starting again on the next line with another ":"ed beginning) get honoured, rather than the whitespace being folded into merely a space and continuation. With the break, you get it like you see here (now I'm on the fourth distinct paragraph) without having to double-space between them in the edit text ''or'' insert actual HTML line-break tags to make it come out how you'd wish it to. | ||
+ | :But these are all little tricks and techniques that you'll pick up, I'm sure. Just thought I'd mention these things, in passing, as I was 'fixing' the original problem. I could talk to you more on your User Talk page, but the way you're using it makes me feel as if I'd be intruding on your own monologues (on top of the User namespace, which I wouldn't dream of editing). [[Special:Contributions/172.71.178.168|172.71.178.168]] 17:41, 6 September 2023 (UTC) | ||
+ | |||
+ | i'll add another section then: | ||
+ | |||
+ | :update: done (also it put it like if "this: that" instead of "this that") [[User:An user who has no account yet|An user who has no account yet]] ([[User talk:An user who has no account yet|talk]]) 23:46, 6 September 2023 (UTC) | ||
+ | |||
+ | I disagree with the text's explanation of the (Christmas) tree: The "Christmas tree" is a basic representation of a binary tree... However, there is an ornament/node on the left which has only one child node, so it can't be a binary tree. [[User:WhatDoWeDoNow|WhatDoWeDoNow]] ([[User talk:WhatDoWeDoNow|talk]]) 02:54, 7 October 2023 (UTC) |
Latest revision as of 02:54, 7 October 2023
I didn't really look too closely, but it seems to be based on Red-Black trees (Red Green in the case of Christmas): http://en.wikipedia.org/wiki/Red_black_tree
- Nope. For a Red-Black tree, all the leaves have to be the same color as the root, and no red nodes can have a red parent. The root here is a yellow star, the leaves are mixed colors, and both colors have instances of a node with a color that matches it's parent, so nether red nor green can be the "Red" for the algorithm. 108.162.221.58 (talk) (please sign your comments with ~~~~)
Then again it could just be a color scheme. 132.3.25.79 12:35, 23 April 2013 (UTC)Tyler
- I am forced to conclude, by this and the problem with the heaps, that Randall has forgotten his data structures. Putting a red-black tree on the wall would be so extremely xkcd-typical that missing it suggests having forgotten they are a thing. Singlelinelabyrinth (talk) 05:32, 25 July 2020 (UTC)
The title text doesn't really make sense - removing the root of a heap is a very common practice for a variety of applications. In fact, you almost always want to process heaps by removing the root. Ciotog (talk) 14:05, 2 March 2014 (UTC)
- It is common, ok. And, in fact, Billy WILL process the heap by removing the root. It makes however sense, since all heaps must be "refreshed" after you remove the root. While it takes small time for a computer, it can be lengthy for a human. And it would be probably better an unsorted array of presents, so Billy can open any present without effecting any effect (see Comic 326) --108.162.229.42 14:10, 17 June 2014 (UTC)
Hmmm... The heap seems sketchy. Note the second and third levels. Not a heap by C++ standards. 108.162.245.218 22:08, 18 June 2014 (UTC)
The heap doesnt look like a heap to me (or at least not a common binary heap): the root has 4 children for a start, and it is not balanced, for seconds. 108.162.250.163 (talk) (please sign your comments with ~~~~)
As a matter of fact, there's a structure that is a combination of a tree and a heap: it's called a "Treap". 162.158.89.205 (talk) 19:11, 9 December 2017 (please sign your comments with ~~~~)
argh that pun is awfully bad
also my post has nothing to do with the treap one An user who has no account yet (talk) 10:48, 6 September 2023 (UTC)
- I added in the relevent 'missing signature' to the Treap comment, which helps delineate that comment from what your addition is. As you may have seen with some of your pre-username contributions, it's something that passing editors do, but we'd of course prefer not to have to. And it can be left that way by accident, as well as not even knowing. But we have both {{unsigned ip}}, used above, and {{unsigned}}, for those who 'should know better'... ;)
- Anyway, convention is that you add a ":" to your reply if you were replying off a prior comment (or add one more ":" than was there ahead of the thing you're replying to). That nests indents. Your reply (to the comic) isn't indented, so would be assumed to be a brand new comment, not a comment-reply. If you see what I mean.
- (Though I know from your prior messages that you also reply (to indented replies to you) with no indenting at all. But if you take a look at how cascades of replies are shown, in a heavy and complicated discussion, you should see how it helps work out who is replying to what, a little bit.)
- Another advantage to ":"ed replies is that line-breaks (starting again on the next line with another ":"ed beginning) get honoured, rather than the whitespace being folded into merely a space and continuation. With the break, you get it like you see here (now I'm on the fourth distinct paragraph) without having to double-space between them in the edit text or insert actual HTML line-break tags to make it come out how you'd wish it to.
- But these are all little tricks and techniques that you'll pick up, I'm sure. Just thought I'd mention these things, in passing, as I was 'fixing' the original problem. I could talk to you more on your User Talk page, but the way you're using it makes me feel as if I'd be intruding on your own monologues (on top of the User namespace, which I wouldn't dream of editing). 172.71.178.168 17:41, 6 September 2023 (UTC)
i'll add another section then:
- update: done (also it put it like if "this: that" instead of "this that") An user who has no account yet (talk) 23:46, 6 September 2023 (UTC)
I disagree with the text's explanation of the (Christmas) tree: The "Christmas tree" is a basic representation of a binary tree... However, there is an ornament/node on the left which has only one child node, so it can't be a binary tree. WhatDoWeDoNow (talk) 02:54, 7 October 2023 (UTC)