ViNiNine 2016-12-04 04:41 采纳率: 0%
浏览 1453

C++数据结构 写一个函数生成哈夫曼编码 要求如下

(1) The function prototype should be like this: void HuffmanCode(double weights[], int size);

(2) Inside the function, a variable like char **hcodes should be declared, and the space for huffman codes must be allocated dynamically using new[] operation;

(3)When building huffman tree, a minimum heap must be created by repeating the adjustDown() operation;

(4) After outputting all the huffman codes, the dynamically allocated space must be released;

  • 写回答

1条回答 默认 最新

  • devmiao 2016-12-04 06:15
    关注
    评论

报告相同问题?

悬赏问题

  • ¥15 Stata 面板数据模型选择
  • ¥20 idea运行测试代码报错问题
  • ¥15 网络监控:网络故障告警通知
  • ¥15 django项目运行报编码错误
  • ¥15 请问这个是什么意思?
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services
  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏
  • ¥15 模糊pid与pid仿真结果几乎一样
  • ¥15 java的GUI的运用