CodeBus
www.codebus.net
Search
Sign in
Sign up
Hot Search :
Source
embeded
web
remote control
p2p
game
More...
Location :
Home
Search - Huffman code implement
Main Category
SourceCode
Documents
Books
WEB Code
Develop Tools
Other resource
Sub Category
Compress-Decompress algrithms
STL
Data structs
Algorithm
AI-NN-PR
matlab
Bio-Recognize
Crypt_Decrypt algrithms
mathematica
Maple
DataMining
Big Data
comsol
physical calculation
chemical calculation
simulation modeling
Search - Huffman code implement - List
[
Data structs
]
Trie_and_Huffman
DL : 0
功能1:使用一种树型结构来实现我们的单词计数功能——Trie树 功能2:Huffman树进行编码 程序输入: 第一行为一个正整数n,表示输入单词的总数。 接下来的n行,每行为一个单词,单词由不超过10个的小写英文字母组成。 接下来的一行为一个正整数m,表示查询的次数。 接下来的m行,每行为一个数字和一个查询,当数字为1时,查询为单词,输出该单词出现的次数(可以为0);当数字为2时,查询为Huffman编码,输出对应的单词(该Huffman编码对应的单词确定存在)。(Function 1: Use a tree structure to implement our word counting function - Trie Trees: Function 2: The Huffman tree is encoded Program entry: The first line is a positive integer n, which represents the total number of words entered. The next n lines, each line of a word, the word by no more than 10 small letters written in English letters. The next line is a positive integer m, indicating the number of queries. The next m rows, each line of a number and a query, when the number is 1, the query for the word, the output of the word appears (can be 0); when the number 2, the query for Huffman coding, the corresponding output The word (the Huffman code corresponds to the word that exists).)
Date
: 2025-12-18
Size
: 2kb
User
:
functiondy_dx
CodeBus
is one of the largest source code repositories on the Internet!
Contact us :
1999-2046
CodeBus
All Rights Reserved.