Timeline for Binary Search tree deletion optimization
Current License: CC BY-SA 3.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 12, 2016 at 11:39 | answer | added | greybeard | timeline score: 0 | |
Jan 12, 2016 at 9:32 | comment | added | greybeard |
deleteNode() looks very similar to AnkitSablok's question re. Dictionary implemented using a Binary Search Tree - is there a text book/other reference it would be of advantage for readers of both questions to know?
|
|
Jan 11, 2016 at 19:30 | comment | added | greybeard |
left.key = minNode.key; node.parent.right.right = minNode.right; is probably erroneous as well as dispensable: in effect, all three cases with node->right == minNode (minNode.parent == node ) are identical: just use the first notation. ((node->right == minNode) == (null == node->right->left) ) null == minNode->left does not mean that you need to keep minNode and minNode->right , only: in the minNode.parent != node branch, there's at least node->right , which may or may not be minNode.parent , and possibly quite a lot more, and both handlings look wrong.
|
|
Nov 27, 2015 at 15:51 | answer | added | user158037 | timeline score: 2 | |
Nov 23, 2015 at 2:08 | history | edited | dasa | CC BY-SA 3.0 |
added 5 characters in body
|
Nov 23, 2015 at 2:07 | comment | added | dasa | Yeah I wrote it by mistake. Can you have a look at my code? | |
Nov 22, 2015 at 22:36 | history | tweeted | twitter.com/StackCodeReview/status/668558628379602944 | ||
Nov 22, 2015 at 22:31 | comment | added | Eric Stein |
There is no such thing as an if "loop".
|
|
Nov 22, 2015 at 21:52 | comment | added | DrProgrammer |
These carry handling. Try to use switch statements to make it more readable.
|
|
Nov 22, 2015 at 21:20 | history | edited | dasa |
edited tags
|
|
Nov 22, 2015 at 20:57 | review | First posts | |||
Nov 22, 2015 at 21:07 | |||||
Nov 22, 2015 at 20:57 | history | asked | dasa | CC BY-SA 3.0 |