Mastering Algorithms with C中文版附带源码说明

Mastering Algorithm with C是一本非常经典和独具个性的算法书,主要是从程序员的角度,对算法领域的基本内容,通过C语言进行源码实现,其附带的源码非常详细,对初接触这个领域的程序员很有参考价值.我特地将该书源码的使用方法做了笔记,放在这样,以便日后参考.

下面是该书的封面:



1.首先从OReilly的该书官网下载相应的源码:

http://http://shop.oreilly.com/product/9781565924536.do
解压相应的软件包,只选择相应的Unix文件夹,因为我只在Ubuntu 12.04 64bit下面编译,
下面是相应的源码目录:



注意阅读该文件夹下面的README文件,我们可以大致了解该源码的目录结构说明,
include 是书中代码的头文件和接口声明文件
source  是相应的接口实现文件,和书中代码命名完全一致
example 是调用接口文件,实现相关算法功能的demo代码,主要是含有main函数和makefile文件


2.编译演示demo的方法
首先在~/.bashrc中定义环境变量ALGOWC_TOPDIR为该套源码的顶层目录,即
vim ~/.bashrc
在末尾加上
export ALGOWC_TOPDIR=/home/taoyx/program_develop/book_src_code/mawc
source ~/.bashrc
下面开始编译,拿example/bistree为例说明(其它目录的编译完全相同)

make -f bistree.mak


运行

./ex-1.exe



如果编译出错,清除刚才编译的中间文件的方法
make -f bistree.mak clean




There are many books on data structures and algorithms, including some with useful libraries of C functions. Mastering Algorithms with C offers you a unique combination of theoretical background and working code. With robust solutions for everyday programming tasks, this book avoids the abstract style of most classic data structures and algorithms texts, but still provides all of the information you need to understand the purpose and use of common programming techniques. Implementations, as well as interesting, real-world examples of each data structure and algorithm, are included. Using both a programming style and a writing style that are exceptionally clean, Kyle Loudon shows you how to use such essential data structures as lists, stacks, queues, sets, trees, heaps, priority queues, and graphs. He explains how to use algorithms for sorting, searching, numerical analysis, data compression, data encryption, common graph problems, and computational geometry. And he describes the relative efficiency of all implementations. The compression and encryption chapters not only give you working code for reasonably efficient solutions, they offer explanations of concepts in an approachable manner for people who never have had the time or expertise to study them in depth. Anyone with a basic understanding of the C language can use this book. In order to provide maintainable and extendible code, an extra level of abstraction (such as pointers to functions) is used in examples where appropriate. Understanding that these techniques may be unfamiliar to some programmers, Loudon explains them clearly in the introductory chapters. Contents include: Pointers Recursion Analysis of algorithms Data structures (lists, stacks, queues, sets, hash tables, trees, heaps, priority queues, graphs) Sorting and searching Numerical methods Data compression Data encryption Graph algorithms Geometric algorithms
《算法:C语言实现(第1-4部分)基础知识、数据结构、排序及搜索(原书第3版)》细腻讲解计算机算法的C语言实现。全书分为四部分,共16章。包括基本算法分析原理,基本数据结构、抽象数据结构、递归和树等数据结构知识,选择排序、插入排序、冒泡排序、希尔排序、快速排序方法、归并和归并排序方法、优先队列与堆排序方法、基数排序方法以及特殊用途的排序方法,并比较了各种排序方法的性能特征,在进一步讲解符号表、树等抽象数据类型的基础上,重点讨论散列方法、基数搜索以及外部搜索方法。书中提供了用C语言描述的完整算法源程序,并且配有丰富的插图和练习,还包含大量简洁的实现将理论和实践成功地相结合,这些实现均可用在真实应用上。 《算法:C语言实现(第5部分)图算法(原书第3版)》是深入论述算法的三卷本教程《算法:C语言实现》(第3版)中的第二卷——图算法。作者在这次修订中重写了许多内容,增加了数千个新练习、数百个新图表、数十个新程序,并对图表和程序做了详尽的注释说明。新版中不仅涵盖了新的主题,而且还提供了对许多经典算法的更充分的解释,包括图的性质、图搜索、有向图、最小生成树、最短路径和网。《算法:C语言实现(第5部分)图算法(原书第3版)》涵盖了足够的基本内容及较详细的图算法高级主题,既可单独用作数据结构与算法课程的教材,也可与第一卷(第1~4部分)结合使用。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值