Re:Show HN: I made a spaced repetition tool to master coding...
by hardlianotion on Saturday April 27, 2024 @07:34AM
(#40179173)
What is inverting a binary tree? I don't think I have ever known what that means.
[ Parent
| on HN ]
Re:Show HN: I made a spaced repetition tool to master coding...
by Mc91 on Saturday April 27, 2024 @10:21AM
(#40180175)
You can find the problem described here. It also has a link to solutions in different languages.
Re:Show HN: I made a spaced repetition tool to master coding...
by bdowling on Saturday April 27, 2024 @04:49PM
(#40183390)
So, inverting is just swapping the left and right pointers for the entire tree? Why would you ever do that? That will flip the ordering of the tree and none of your search or balancing functions will work anymore. Shut up! Don't ask questions! Uh, ok.
Re:Show HN: I made a spaced repetition tool to master coding...
by hardlianotion on Sunday April 28, 2024 @03:28AM
(#40186744)
Oh thanks - I forgot I asked this! So an efficient way to invert would be to abstract out the ordering relation and make it swappable.