ICS Breadth First Approach Introduction
ICS Breadth First Approach Introduction
SCIENCE
A Breadth-First Approach with С
John Impagliazzo
Paul Nagin
Hofstra University
Hempstead, New York
®
John Wiley & Sons
New York Chichester Brisbane Toronto Singapore
Contents
2 Problem-Solving Concepts
2.1 T h e Analytic A p p r o a c h 38
Introduction, 38
2.1.1 Problem-Solving Approaches, 38
2.1.2 The Analytic Approach, 39
2.1.3 Unsolvable Problems, 42
Exercises 2.1, 42
2.2 T h e Algorithmic A p p r o a c h 44
Introduction, 44
2.2.1 Algorithms, 44
2.2.2 Phases of Algorithmic Problem Solving, 48
2.2.3 Sequence, 48
2.2.4 Selection, 51
2.2.5 Repetition, 54
CONTENTS
7 Arrays 214
7.1 Overview of Arrays 216
Introduction, 216
7.1.1 Array Basics, 216
7.1.2 Using Arrays, 218
7.1.3 Initializing Arrays, 224
Exercises 7.1, 225
7.2 Arrays a n d Functions 227
Introduction, 227
7.2.1 Using Arrays with Functions, 227
Exercises 7.2, 238
7.3 Higher-Dimensional Arrays 240
Introduction, 240
7.3-1 Matrices, 240
7.3-2 Passing Multidimensional Arrays, 245
Exercises 7.3, 250
7.4 String Processing 251
Introduction, 251
7.4.1 Fundamentals of Strings, 251
7.4.2 String Input/Output, 252
7.4.3 Built-in String Functions, 253
7.4.4 Examples of Character and String Processing, 255
Exercises 7.4, 260
12 Databases 383
12.1 An Overview of Files a n d Databases 385
Introduction, 385
12.1.1 Records, 385
12.1.2 Files, 387
12.1.3 Databases, 394
12.1.4 Database Entities and Attributes, 395
Exercises 12.1, 397
12.2 Logical Database Models 399
Introduction, 399
12.2.1 Overview of logical Models, 399
12.2.2 The Entity-Relationship Model, 400
XX CONTENTS