at school we learned that we should put the output before we swap them (before we update the tree)
@hypolithbrousse7541Ай бұрын
Maybe i missed something, but consider the stream : "aa" We first create node for 'a' increment it and his parent (root), then take the corresponding block and make sure to respect the conditions. Next, we have to treat another 'a', so we find the node 'a', and we check if it's leader of his block, but if we do so, 'a' will replace the root. There's no conditions to avoid this here. Can someone give a condition to avoid it ?
@tomhuynh82766 жыл бұрын
That's very clear and interesting live demo of adaptive huffman coding, you earned a new sub !
@ndvz86725 жыл бұрын
10:05 You didn't just swapped them. You did more than that without giving a reason and that's a bad teaching.
@lexzhang72895 жыл бұрын
Thanks for pointing out. Will improve next time.
@merajuddinsiddique13854 жыл бұрын
Yah try to illustrate the conditions while swapping uh mentioned earlier......