I have a new assignment about Huffman encoding, there is part of the assignment that is not clear to me, I searched the web, but could not find an answer, I need some help to understand this part. it is as follows:

The standard algorithm states that you should use a priority queue(aka heap) to store the trees. Use a heap of tree pointers instead, it makes combining the trees much easier and more efficient, and since they are pointers you don't have to copy any tree data. this technique is called indirect storage and is used on large and/or complex data type.

What is an indirect storage, and how can I use a heap of tree pointers.. Is there any link that explain indirect storage in details.

I highly appreciate your help, thanks

If you've ever been to an old fashioned library you know that they have the books all filed on shelfs according to some plan. If you just walk into the library and start looking for the actual book it is very tedious. Howevr, if you search the card catalog, where they describe the book and give you numbers you can search for, it is much faster. The card catalogue would be considered indirect storage. They would be the equivalent of a collection of pointers to trees. They are indirect because they don't contain the actual information, just where to find the information (a Dewey Decimal number from the card catalog or a memory address from a pointer).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.