今天在复习哈夫曼树的时候,发现了一个不错的B站视频,讲解的非常清晰直观。地址传送门。有讲到了哈夫曼树的原理及哈夫曼编码解码的过程。原理讲解直接移步上述链接,就不再画蛇添足。作为巩固随手练习一道题:
给定一篇文章,统计里面的各个字符出现的频次,并构建哈夫曼树,实现哈夫曼编码和解码的过程。并且计算哈夫曼编码和定长编码的空间节省了多少?
输入的文本:
each year, the american heart association (aha), in conjunction with the centers for disease control and prevention, the national institutes of health, and other government agencies, brings together the most up-to-date statistics on heart disease, stroke, other vascular diseases, and their risk factors and presents them in its heart disease and stroke statistical update. the statistical update is a valuable resource for researchers, clinicians, healthcare policy makers, media professionals, the lay public, and many others who seek the best national data available on disease morbidity and mortality and the risks, quality of care, medical procedures and operations, and costs associated with the management of these diseases in a single document. indeed, since 1999, the statistical update has been cited more than 8700 times in the literature (including citations of all annual versions). in 2009 alone, the various statistical updates were cited 1600 times (data from isi web of science). in recent years, the statistical update has undergone some major changes with the addition of new chapters and major updates across multiple areas. for this year s edition, the statistics committee, which produces the document for the aha, updated all of the current chapters with the most recent nationally representative data and inclusion of relevant articles from the literature over the past year and added a new chapter detailing how family history and genetics play a role in cardiovascular disease (cvd) risk. also, the 2011 statistical update is a major source for monitoring both cardiovascular health and disease in the population, with a focus on progress toward achievement of the aha s 2020 impact goals. below are a few highlights from this year s update. mortality data are presented according to the underlying cause of death. any-mention mortality means that the condition was nominally selected as the underlying cause or was otherwise mentioned on the death certificate. for many deaths classified as attributable to cvd, selection of the single most likely underlying cause can be difficult when several major comorbidities are present, as is often the case in the elderly population. it is useful, therefore, to know the extent of mortality due to a given cause regardless of whether it is the underlying cause or a contributing cause (ie, its any-mention status). the number of deaths in 2007 with any mention of specific causes of death was tabulated by the nhlbi from the nchs public-use electronic files on mortality. the first set of statistics for each disease in this update includes the number of deaths for which the disease is the underlying cause. two exceptions are chapter 7 (high blood pressure) and chapter 9 (heart failure). high bp, or hypertension, increases the mortality risks of cvd and

最低0.47元/天 解锁文章
8131

被折叠的 条评论
为什么被折叠?



