Open your mind ~~~

Source: Internet
Author: User
Yesterday, I promised to help others write a Huffman compression job. According to the data structure book, I used a typical Huffman tree with * lchild, * rchild binary tree structure to represent the generated Huffman tree, then we will get the Huffman code out, and we will be depressed. No matter recursive or non-recursive traversal, we will not be able to record the node hierarchy well. Today, I have read some other people's discussions online. This tree can be placed in an array or a linked list. Each node has a * parent, to find the encoding of a character, search for its node in the linear structure, and retrieve the node layer by layer ..

The brain does not need to rust out. This tree is often used when it is a sophomore. There are books that need to be thoroughly understood. If it is not used up, it will be fixed-thinking, in addition to taking exams, teaching materials are also used to give people the opposite picture ~

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.