1. 首页
  2. 行业
  3. 互联网
  4. 编程珠玑全部源代码 分享

编程珠玑全部源代码 分享

上传者: 2018-12-27 06:49:15上传 RAR文件 25.79KB 热度 77次
Code from Programming Pearls Column 1: Programs for sorting integers bitsort.c -- Sort with bit vectors. sortints.cpp -- Sort using C++ STL sets. qsortints.c -- Sort with C library qsort. bitsortgen.c -- Generate random integers for sorting. Column 2: Test and time algorithms rotate.c -- Three ways to rotate the elements of a vector. The next two program are used in a pipeline to compute all anagrams in a dictionary sign.c -- Sign each word by its letters in sorted order. squash.c -- Put each anagram class on a single line. Column 5: Scaffolding for testing and timing search functions search.c -- Linear and binary search. Column 7: Tiny experiment on C run times timemod0.c -- Edit main to time one operation. Column 8: Compute the maximum-sum subsequence in an array maxsum.c -- Time four algs: n3, n2, n log n, n. Column 9: Code tuning programs genbins.c -- Profile this, then try a special-purpose allocator. macfun.c -- Time the cost of macros and functions. The column also uses rotate.c (Column 2), search.c (Column 5) and maxsum.c (Column 8). Column 11: Test and time sorting algorithms sort.cpp -- Mostly C, but also C++ sort function. SortAnim.java -- Animate those sort functions in Java. Column 12: Generate a sorted list of random integers sortedrand.cpp -- Several algorithms for the task. Column 13: Set representations for the problem in Column 12 sets.cpp -- Several data structures for sets. genbins.c (Column 9) implements the bin data structure in C. Column 14: Heaps priqueue.cpp -- Implement and test priority queues. The column also uses sort.c (Column 11) for heapsort. Column 15: Strings wordlist.cpp -- List words in the file, using STL set. wordfreq.cpp -- List words in the file, with counts, using STL map. wordfreq.c -- Same as above, with hash table in C. longdup.c -- Find long repeated strings in input. markov.c -- Generate random text from input. markovhash.c -- Like markov.c, but with hashing. markovlet.c -- Letter-level markov text, simple algorithm. Appendix 3: Cost Models spacemod.cpp -- Space used by various records. timemod.c -- Table of times used by various C constructs. You may use this code for any purpose, as long as you leave the copyright notice and book citation attached. line. Column 5: Scaffolding for testing and timing search functions search.c -- Linear and binary search. Column 7: Tiny experiment on C run times timemod0.c -- Edit main to time one operation. Column 8: Compute the maximum-sum subsequence in an array maxsum.c -- Time four algs: n3, n2, n log n, n. Column 9: Code tuning programs genbins.c -- Profile this, then try a special-purpose allocator. macfun.c -- Time the cost of macros and functions. The column also uses rotate.c (Column 2), search.c (Column 5) and maxsum.c (Column 8). Column 11: Test and time sorting algorithms sort.cpp -- Mostly C, but also C++ sort function. SortAnim.java -- Animate those sort functions in Java. Column 12: Generate a sorted list of random integers sortedrand.cpp -- Several algorithms for the task. Column 13: Set representations for the problem in Column 12 sets.cpp -- Several data structures for sets. genbins.c (Column 9) implements the bin data structure in C. Column 14: Heaps priqueue.cpp -- Implement and test priority queues. The column also uses sort.c (Column 11) for heapsort. Column 15: Strings wordlist.cpp -- List words in the file, using STL set. wordfreq.cpp -- List words in the file, with counts, using STL map. wordfreq.c -- Same as above, with hash table in C. longdup.c -- Find long repeated strings in input. markov.c -- Generate random text from input. markovhash.c -- Like markov.c, but with hashing. markovlet.c -- Letter-level markov text, simple algorithm. Appendix 3: Cost Models spacemod.cpp -- Space used by various records. timemod.c -- Table of times used by various C constructs. You may use this code for any purpose, as long as you leave the copyright notice and book citation attached.
用户评论
码姐姐匿名网友 2018-12-27 06:49:15

代码不错,可以正常使用。

码姐姐匿名网友 2018-12-27 06:49:15

代码不错,可以调通,跟书本一样的

码姐姐匿名网友 2018-12-27 06:49:15

http://download.csdn.net/detail/Wuaner/323362 这里有老版本的书和代码 不确定这里的是不是有更新。

码姐姐匿名网友 2018-12-27 06:49:15

编程珠玑的代码段,可以调通

码姐姐匿名网友 2018-12-27 06:49:15

非常好,很有用的资料

码姐姐匿名网友 2018-12-27 06:49:15

很好的一本书,学习了

码姐姐匿名网友 2018-12-27 06:49:15

很齐全的代码,谢谢分享~~~

码姐姐匿名网友 2018-12-27 06:49:15

基本把书中问题都概括了。谢了!

码姐姐匿名网友 2018-12-27 06:49:15

感谢分享!是书中的源代码,应该就是官网的代码

码姐姐匿名网友 2018-12-27 06:49:15

传说中的一本书,希望可以拜读