ANSI-C Source Code
(Arranged by Chapter)
Part 1: Structuring Data
Chapter 1: Variables and Pointers
Chapter 2: Arrays and Records
Chapter 3: Linked Lists
- linkList.c create/print a simple linked list
- queue.c queue of characters implement w/linked list
- stack.c stack of characters implement w/linked list
Chapter 4: Trees
- bin3ArrI.c binary tree implemented by array indexes w/ traversal
- bin3Calc.c binary tree implemented by index calc w/ traversal
- bin3ll.c binary tree implemented by linked lists w/ traversal
Chapter 5: Graphs and Sets
- graphLis.c adjacency list implementation of a graph
- graphMat.c adjacency matrix implementation of a graph
- grLisTra.c traversing an adjacency list graph
- grMatTra.c graph traversal using adjacency matrix
- llset.c implementation of sets using an ordered linked list with head node and tail node
- bitset.c implementation of sets using linear bitmap
Part 2: Building Algorithms
Chapter 6: Basic Techniques
Chapter 7: Key Concepts
Part 3: Algorithms and Data Structures in Action
Chapter 8: Searching
- searSeqA.c sequential search w/ array
- searSeqL.c sequential search w/ linked list
- searBinA.c binary search w/ array
- searBin3.c binary search using trees
- bin3.c binary search using trees with code to insert and delete nodes (extension to text)
- hash.c search using hash table
- hashll.c hashing demo w/ chaining to resolve collisions (extension to text)
- hashll.pdf explanation of hashing w/ chaining code (extension to text)
- rec.txt database text file used by search routines
Chapter 9: Sorting
- sort.c demonstrating sorting of char
Chapter 10: NP-Hard Problems
Part 4: Theory of Computing
Chapter 11: Finite State Automata
Chapter 12: Turing Machines
- tmCtrl.c change first 'B' to 'A' then stop
- turing.c Turing machine simulator
- inc.tm Turing machine controller file for incrementer
- inc.tap sample input tape for incrementer
- add1.tm Turing machine controller file for Add1
- add1.tap sample input tape for Add1
- duplicat.tm Turing machine controller file for duplicator
- duplicat.tap sample input tape for duplicator