C & Data Structures (Electrical and Computer Engineering Series) (PAP/CDR)

C & Data Structures (Electrical and Computer Engineering Series) (PAP/CDR)

  • ただいまウェブストアではご注文を受け付けておりません。 ⇒古書を探す
  • 製本 Paperback:紙装版/ペーパーバック版/ページ数 600 p.
  • 言語 ENG
  • 商品コード 9781584503385
  • DDC分類 005.73

Full Description


Divided into three separate sections, C & Data Structures covers C programming, as well as the implementation of data structures and an analysis of advanced data structure problems. Beginning with the basic concepts of the C language (including the operators, control structures, and functions), the book progresses to show these concepts through practical application with data structures such as linked lists and trees, and concludes with the integration of C programs and advanced data structure problem-solving. The book covers a vast range of data structures and programming issues, such as syntactic and semantic aspects of C, all control statements in C, concepts of function, macro, files and pointers with examples, graphs, arrays, searching and sorting techniques, stacks and queues, files, and preprocessing. C & Data Structures provides a comprehensive guide to all the data types in C with internal implementation, while providing examples to demonstrate their behavior.

Table of Contents

Acknowledgments                                    xiii
Preface xv
Part I: C Language 1 (164)
1 Introduction to the C Language 3 (10)
The first program In C 3 (2)
Inputting the data 5 (1)
The control statement (if statement) 6 (1)
The iteration loop (for loop) 7 (2)
The do...while loop 9 (1)
The switch statement 10 (3)
2 Data Types 13 (18)
Various data types In C 14 (2)
The integer data type family 16 (2)
Overflow In char and unsigned char data 18 (1)
types
The char type 19 (2)
Octal numbers 21 (1)
Hexadecimal numbers 21 (1)
Representation of floating-point numbers 21 (4)
Type conversion 25 (1)
Forced conversion 26 (1)
Type casting 27 (4)
3 C Operators 31 (14)
Arithmetic operator 32 (2)
Relational operator 34 (1)
Logical operator 35 (2)
Ternary operator 37 (1)
Increment operator 38 (1)
Comma operator 39 (1)
Bitwise operator 40 (3)
Operator precedence 43 (2)
4 Control Structures 45 (12)
Control structures 45 (1)
The if statement 46 (1)
Scope of an if clause 47 (1)
The if-else statement 47 (1)
The if-else if statement 48 (2)
The switch statement 50 (1)
The while loop 51 (1)
The do-while loop 52 (1)
The for loop 53 (1)
The for loop with a comma operator 54 (1)
The break statement 54 (1)
The continue statement 55 (2)
5 The printf Function 57 (6)
printf 57 (1)
Placeholders 58 (5)
6 Address and Pointers 63 (4)
Address 63 (1)
Pointers 64 (3)
7 The scanf Function 67 (4)
scanf 67 (1)
The scanf placeholders 68 (3)
8 Preprocessing 71 (14)
Preprocessor 71 (1)
undef 72 (1)
ifdef 73 (2)
ifndef 75 (1)
#if 76 (1)
ifelse 77 (1)
ifelif 78 (2)
Error directive 80 (1)
#line 81 (1)
Macro 82 (1)
Macro and function 83 (2)
9 Arrays 85 (16)
Arrays 85 (1)
Address of each element in an array 86 (2)
Accessing an array using pointers 88 (1)
Manipulating arrays using pointers 89 (2)
Another case of manipulating an array 91 (2)
using pointers
Two-dimensional array 93 (2)
Three-dimensional array 95 (2)
Pointer arrays 97 (4)
10 Functions 101 (14)
Functions 101 (2)
The concept of stack 103 (1)
The sequence of execution during a 104 (2)
function call
Parameter passing 106 (1)
Call by reference 107 (1)
The concept of global variables 108 (1)
Resolving variable references 109 (2)
Syntax of function definition 111 (2)
Calling function 113 (2)
11 Storage of Variables 115 (8)
Storage 115 (2)
External references 117 (1)
Register variables 118 (2)
Scope of variables 120 (1)
Further scope of variables 121 (2)
12 Memory Allocation 123 (4)
Dynamic memory allocations 123 (4)
13 Recursion 127 (6)
Recursion 127 (1)
Stack overheads in recursion 128 (2)
Writing a recursive function 130 (3)
14 Strings 133 (4)
Strings as an array of characters 133 (1)
String definition 134 (1)
Strings as parameters 135 (2)
15 Structures 137 (8)
Structures 137 (1)
Complex structure definitions 138 (2)
Memory allocation to structure 140 (1)
Programming with structures 141 (2)
Structure pointers 143 (2)
16 Union 145 (2)
Union 145 (2)
17 Files 147 (18)
The concept of files 147 (9)
Direct access files 156 (9)
Part II: Data Structures 165 (266)
18 Arrays, Searching, and Sorting 167 (60)
Arrays 167 (3)
Application of arrays 170 (3)
Manipulations on the list implemented 173 (7)
using an array
Merging of two sorted lists 180 (4)
Transpose of a matrix 184 (5)
Finding the saddle point of a matrix 189 (3)
Implementation of heaps 192 (1)
Sorting and searching 192 (1)
Bubble sort 193 (2)
Quick sort 195 (6)
Merge sort 201 (5)
Heapsort 206 (4)
Searching techniques: linear or 210 (3)
sequential search
Binary search 213 (4)
Hashing 217 (3)
Hashing functions 220 (7)
19 Stacks and Queues 227 (36)
The concept of stacks and queues 227 (1)
Stacks 227 (8)
Applications of stacks 235 (7)
Queues 242 (1)
Implementation of queues 243 (4)
Circular queues 247 (4)
Implementation of a queue using linked 251 (5)
representation
Applications of queues 256 (7)
20 Linked Lists 263 (84)
The concept of the linked lists 263 (4)
Inserting a node by using recursive 267 (2)
programs
Sorting and reversing a linked list 269 (7)
Deleting the specified node in a singly 276 (4)
linked list
Inserting a node after the specified node 280 (4)
in a singly linked list
Inserting a new node in a sorted list 284 (5)
Counting the number of nodes of a linked 289 (2)
list
Merging of two sorted lists 291 (8)
Erasing a linked list 299 (4)
Polynomial representation 303 (5)
Representation of sparse matrices 308 (7)
Circular linked lists 315 (3)
Splitting a list with 2n nodes into two 318 (3)
separate and equal lists
Merging of two circular lists 321 (4)
Reversing the direction of links in a 325 (5)
singly linked circular list
Doubly linked lists 330 (5)
Insertion of a node in a doubly linked 335 (4)
list
Deleting a node from a doubly linked list 339 (4)
Application of doubly linked lists to 343 (4)
memory management
21 Trees 347 (40)
The concept of tree 347 (2)
Binary tree and its representation 349 (5)
Binary tree traversal 354 (3)
Binary search tree 357 (7)
Counting the number of nodes in a binary 364 (3)
search tree
Swapping of left and right subtrees of a 367 (3)
given binary tree
Searching for a target key in a binary 370 (5)
search tree
Deletion of a node from binary search tree 375 (12)
22 Graphs 387 (44)
Graphs 387 (3)
Representations of a graph 390 (3)
Computing indegree and outdegree of a 393 (3)
node of a graph using adjacency matrix
representation
Depth-first traversal 396 (3)
Breadth-first traversal 399 (4)
Connected component of a graph 403 (7)
Depth-first spanning tree and 410 (3)
breadth-first spanning tree
Minimum-cost spanning tree 413 (7)
Directed acyclic graph (DAG) 420 (11)
Part III: Advanced Problems in Data Structures 431 (266)
23 Problems In Arrays, Searching, Sorting, 433 (44)
Hashing
Problem: Calculate the value of an N x N 433 (6)
determinant
Problem: Write a program to find the 439 (2)
saddle point of a matrix, if it exists
Problem: Multiply two sparse matrices 441 (7)
Problem: Multiplication of two sparse 448 (7)
matrices (different versions)
Problem: Implement K-way sort-merge to 455 (7)
sort a file containing records
Problem: Find a plateau in a matrix 462 (4)
Problem: Implementation of a hash search 466 (4)
Problem: Implementation of rehashing 470 (7)
24 Problems in Stacks and Queues 477 (10)
Problem: Convert an infix expression to 477 (6)
prefix form
Problem: Implementation of two stacks 483 (4)
using an array
25 Problems in Linked Lists 487 (46)
Problem: Implementation of polynomials 487 (6)
using linked lists
Problem: Implementation of circular lists 493 (5)
by using arrays
Problem: Reversing links in the case of 498 (4)
circular list
Problem: Memory management using lists 502 (3)
Problem: Memory management using various 505 (8)
schemes
Problem: Garbage collection-the first 513 (7)
method
Problem: Garbage collection-the second 520 (8)
method
Problem: Compute N equivalence classes 528 (5)
26 Problems in Strings 533 (22)
Problem: Maximize a combination under 533 (5)
constraints
Problem: Maximize a combination of 538 (4)
strings-the second method
Problem: Closure of sets 542 (6)
Problem: Finding the maximum matching 548 (2)
pattern in the string
Problem: Implementation of the soundex 550 (5)
function
27 Problems in Trees 555 (62)
Problem: Write a non-recursive version of 555 (6)
preorder
Problem: Write a non-recursive version of 561 (6)
postorder
Problem: Preorder traversal of a threaded 567 (6)
binary tree
Problem: Implementation of a set using a 573 (5)
binary tree
Problem: Huffman coding 578 (6)
Problem: Implementation of a B-tree 584 (19)
Problem: Implementation of a B+ tree 603 (14)
28 Problems In Graphs 617 (50)
Problem: The dfs method for graph 617 (5)
traversal
Problem: Connected components in a graph 622 (5)
Problem: Minimum spanning tree 627 (5)
Problem: Topological sort 632 (5)
Problem: Finding the shortest path by 637 (4)
using an adjacency matrix
Problem: Finding the shortest path by 641 (7)
using an adjacency list
Problem: The m shortest path 648 (13)
Problem: The all-cost shortest path 661 (6)
29 Miscellaneous Problems 667 (30)
Problem: The two-class classification 667 (6)
problem
Problem: The N-coins problem 673 (5)
Problem: All combinations of strings 678 (2)
Problem: The 8-knights problem 680 (4)
Problem: N-queens problem 684 (3)
Problem: Mapping of N-queues in an array 687 (5)
Problem: Implementation of A* algorithm 692 (5)
Index 697