Preface |
|
xv | |
Authors |
|
xvii | |
Chapter 1 Fundamental Concepts of Data Structure |
|
1 | (42) |
|
|
1 | (10) |
|
1.1.1 Array Element in Memory |
|
|
2 | (1) |
|
|
2 | (1) |
|
1.1.3 Retrieving and Storing Some Values from/into the Array |
|
|
3 | (8) |
|
|
11 | (11) |
|
1.2.1 Algorithm for Push Operation |
|
|
13 | (1) |
|
1.2.2 Algorithm for Pop Operation |
|
|
13 | (1) |
|
1.2.3 Algorithm for Traverse Operation |
|
|
14 | (1) |
|
1.2.4 Algorithm for Peep Operation |
|
|
14 | (1) |
|
1.2.5 Algorithm for Update Operation |
|
|
15 | (7) |
|
|
22 | (7) |
|
1.3.1 Algorithm for Insert Operation |
|
|
25 | (1) |
|
1.3.2 Algorithm for Delete Operation |
|
|
25 | (1) |
|
1.3.3 Algorithm for Traverse Operation |
|
|
26 | (1) |
|
1.3.4 Algorithm for Peep Operation |
|
|
26 | (1) |
|
1.3.5 Algorithm for Update Operation |
|
|
27 | (2) |
|
|
29 | (9) |
|
|
30 | (8) |
|
1.4.1.1 Structure of the Node of a Linked List |
|
|
30 | (8) |
|
|
38 | (5) |
|
|
41 | (2) |
Chapter 2 Concepts of Algorithms and Recurrences |
|
43 | (36) |
|
|
43 | (1) |
|
|
44 | (1) |
|
2.3 Algorithmic Notations |
|
|
45 | (10) |
|
2.3.1 Calculation for Method Calls |
|
|
54 | (1) |
|
|
55 | (4) |
|
2.4.1 Asymptotic Notations |
|
|
55 | (1) |
|
2.4.2 O - Notation (Big - Oh Notation) |
|
|
55 | (1) |
|
|
56 | (1) |
|
|
57 | (1) |
|
2.4.5 o Notation (Little-Oh Notation) |
|
|
58 | (1) |
|
2.4.6 ω - Notation (Little-Omega Notation) |
|
|
58 | (1) |
|
2.4.7 Comparison of Functions |
|
|
58 | (1) |
|
|
58 | (1) |
|
|
58 | (1) |
|
|
58 | (1) |
|
2.4.7.4 Transpose Symmetry |
|
|
58 | (1) |
|
|
59 | (1) |
|
2.5 Problems Related To Notations |
|
|
59 | (5) |
|
2.5.1 Stirling's Approximations |
|
|
61 | (3) |
|
|
64 | (13) |
|
2.6.1 Recurrence Relations |
|
|
64 | (1) |
|
2.6.2 Substitution Method |
|
|
65 | (3) |
|
|
68 | (5) |
|
|
73 | (4) |
|
|
77 | (2) |
|
|
77 | (1) |
|
|
77 | (2) |
Chapter 3 Divide-and-Conquer Techniques |
|
79 | (26) |
|
3.1 Divide-And-Conquer Approach |
|
|
79 | (1) |
|
|
79 | (3) |
|
3.2.1 Analysis of Binary Search |
|
|
81 | (1) |
|
3.2.1.1 Best-Case complexity |
|
|
82 | (1) |
|
3.2.1.2 Worst-Case complexity |
|
|
82 | (1) |
|
|
82 | (3) |
|
3.3.1 Analysis of Merge Sort |
|
|
84 | (1) |
|
|
85 | (4) |
|
3.4.1 Good Points of Quick Sort |
|
|
85 | (1) |
|
3.4.2 Bad Points of Quick Sort |
|
|
85 | (3) |
|
3.4.3 Performance of Quick Sort |
|
|
88 | (1) |
|
|
88 | (1) |
|
|
89 | (1) |
|
|
89 | (9) |
|
|
90 | (8) |
|
|
98 | (2) |
|
3.6.1 Operations for Min Priority Queue |
|
|
100 | (1) |
|
3.7 Lower Bound For Sorting |
|
|
100 | (2) |
|
|
102 | (3) |
|
|
102 | (1) |
|
|
102 | (3) |
Chapter 4 Dynamic Programming |
|
105 | (38) |
|
|
105 | (1) |
|
4.2 Developing Dynamic Programming Algorithms |
|
|
106 | (2) |
|
4.2.1 Optimal Substructure |
|
|
107 | (1) |
|
4.2.2 The Principle of Optimality |
|
|
107 | (1) |
|
4.3 Matrix Chain Multiplication |
|
|
108 | (30) |
|
|
109 | (32) |
|
4.3.1.1 How to Order Multiplications? |
|
|
109 | (29) |
|
4.4 Longest Common Subsequence Problem |
|
|
138 | (3) |
|
4.5 Divide And Conquer vs. Dynamic Programming |
|
|
141 | (1) |
|
|
141 | (2) |
|
|
141 | (1) |
|
|
141 | (2) |
Chapter 5 Greedy Algorithms |
|
143 | (32) |
|
|
143 | (2) |
|
5.1.1 Characteristics and Features of Problems Solved by Greedy Algorithms |
|
|
143 | (1) |
|
5.1.2 Basic Structure of Greedy Algorithm |
|
|
144 | (1) |
|
5.1.3 What Is Feasibility |
|
|
144 | (10) |
|
5.1.3.1 How to Prove Greedy Algorithms Optimal |
|
|
144 | (1) |
|
5.2 An Activity - Selection Problem |
|
|
145 | (6) |
|
|
151 | (3) |
|
|
154 | (10) |
|
5.4.1 Prefix-Free Code Representation |
|
|
156 | (8) |
|
5.5 Greedy Versus Dynamic Programming |
|
|
164 | (1) |
|
5.6 Data Structures For Disjoint Sets |
|
|
165 | (8) |
|
5.6.1 Application of Disjoint Set Data Structures |
|
|
166 | (2) |
|
5.6.2 Linked List Representation of Disjoint Sets |
|
|
168 | (1) |
|
5.6.3 Disjoint Set of Forests |
|
|
169 | (2) |
|
5.6.4 By Path Compression |
|
|
171 | (2) |
|
|
173 | (2) |
|
|
173 | (1) |
|
|
173 | (2) |
Chapter 6 Graph |
|
175 | (30) |
|
|
175 | (5) |
|
6.1.1 Breadth First Search |
|
|
175 | (4) |
|
|
179 | (1) |
|
|
180 | (8) |
|
6.2.1 Minimum Spanning Tree |
|
|
181 | (1) |
|
|
181 | (3) |
|
|
184 | (4) |
|
6.3 Single-Source Shortest Path |
|
|
188 | (7) |
|
6.3.1 Negative Weighted Edges |
|
|
188 | (1) |
|
6.3.2 Relaxation Technique |
|
|
188 | (1) |
|
6.3.3 Bellman-Ford Algorithm |
|
|
189 | (3) |
|
6.3.4 Dijkstra's Algorithm |
|
|
192 | (3) |
|
6.4 All Pair Shortest Path |
|
|
195 | (8) |
|
6.4.1 Floyd-Warshall's Algorithm |
|
|
196 | (7) |
|
|
203 | (2) |
|
|
203 | (1) |
|
|
204 | (1) |
Chapter 7 Approximation Algorithms |
|
205 | (18) |
|
|
205 | (1) |
|
7.2 Approximation Algorithms |
|
|
206 | (3) |
|
7.2.1 Traveling Salesman Problem |
|
|
206 | (3) |
|
7.2.1.1 Special Case of TSP |
|
|
206 | (3) |
|
|
209 | (3) |
|
7.3.1 Hamiltonian Circuit Problem |
|
|
210 | (2) |
|
7.4 N-Queen Problem/8 - Queen Problem |
|
|
212 | (3) |
|
7.5 Backtracking Algorithm |
|
|
215 | (1) |
|
|
215 | (5) |
|
|
216 | (4) |
|
|
220 | (3) |
|
|
220 | (1) |
|
|
221 | (2) |
Chapter 8 Matrix Operations, Linear Programming, Polynomial and FFT |
|
223 | (18) |
|
|
223 | (11) |
|
8.1.1 Operations with Matrix |
|
|
224 | (3) |
|
|
227 | (4) |
|
8.1.3 Application of Matrices |
|
|
231 | (1) |
|
8.1.4 Boolean Matrix Multiplication |
|
|
231 | (3) |
|
|
234 | (2) |
|
|
236 | (2) |
|
|
238 | (3) |
|
|
238 | (1) |
|
|
238 | (3) |
Chapter 9 Number Theoretic Algorithms |
|
241 | (16) |
|
9.1 Number Theoretic Algorithms |
|
|
241 | (2) |
|
9.2 Greatest Common Divisor |
|
|
243 | (2) |
|
9.3 Linear Diophantine Equations |
|
|
245 | (1) |
|
|
246 | (1) |
|
|
247 | (2) |
|
9.5.1 Single-Variable Linear Equations |
|
|
247 | (1) |
|
9.5.2 Set of Linear Equations |
|
|
248 | (1) |
|
|
249 | (2) |
|
|
251 | (1) |
|
|
251 | (4) |
|
|
255 | (2) |
|
|
255 | (1) |
|
|
255 | (2) |
Chapter 10 Programming Implementations of the Algorithms |
|
257 | (38) |
|
10.1 Program For The Longest Common Subsequences |
|
|
257 | (2) |
|
10.2 Matrix Chain Multiplication |
|
|
259 | (2) |
|
10.3 Program For Knapsack Problem |
|
|
261 | (2) |
|
10.4 Bellman-Ford Program |
|
|
263 | (4) |
|
10.5 Write A Program For Travelling Salesman Problem Using Backtracking |
|
|
267 | (2) |
|
10.6 Traveling Salesman Problem Using Branch And Bound |
|
|
269 | (2) |
|
10.7 Program For Heap Sort |
|
|
271 | (3) |
|
10.8 Program For Quick Sort |
|
|
274 | (2) |
|
10.9 Program For Merge Sort |
|
|
276 | (2) |
|
|
278 | (5) |
|
10.11 Program For Prims Algorithm |
|
|
283 | (1) |
|
10.12 Program For The Warshall Method |
|
|
284 | (1) |
|
10.13 Program For The Kruskal Method |
|
|
285 | (2) |
|
10.14 Program For Dijkstra Method |
|
|
287 | (3) |
|
10.15 BFS Using Color Code |
|
|
290 | (5) |
Index |
|
295 | |