From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4e1d151165b800f2,start X-Google-Attributes: gid103376,public From: Mark Subject: Huffman Encoding? Date: 1999/04/05 Message-ID: <37083AFF.AD3306A2@bellatlantic.net>#1/1 X-Deja-AN: 462762879 Content-Transfer-Encoding: 7bit X-Accept-Language: ru,en,de-AT Content-Type: text/plain; charset=us-ascii Organization: Bell Atlantic Internet Solutions Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-04-05T00:00:00+00:00 List-Id: I'm currently writing a program that produces Huffman Encoding for text input. I'm trying to determine the best data structure to utilize for sorting the character frequencies. I used a linked-list of records to store 1)character, 2)frequency, and 3) marked/unmarked. (with the linked-list sorted according to character) From here I intended to populate the binary tree, but must first sort according to frequency. I feel that there must be a cleaner alternative. Has anyone done this, and if so what did you find to be the best approach?