文档介绍:Chapter 11 Data Structures Understand Understand arrays arrays and their usefulness. and their usefulness. Understand Understand records records and the difference between an array and and the difference between an array and a record. a record. Understand the concept of a Understand the concept of a linked list linked list and the difference and the difference between an array and a linked list. between an array and a linked list. After reading this chapter, the reader should After reading this chapter, the reader should be able to: be able to: O O BJECTIVES BJECTIVES Understand when to use an array and when to use a linked-list. Understand when to use an array and when to use a linked-list. ?? Data Structure Data Structure uses a collection of ralated uses a collection of ralated variables that can be accessed individually or as variables that can be accessed individually or as a whole. a whole. Array Array Record Record Linked List Linked List Linear List Linear List Stack Stack Queue Queue Tree Tree Graph Graph ARRAYS ARRAYS ARRAYS Twenty individual variables Processing individual variables Problem: using 20 varialbes. Problem: using 20 varialbes. Arrays with subscripts and indexes Resolution: using array. Resolution: using array. A A array array is fixed-size,sequenced collection of elements of the is fixed-size,sequenced collection of elements of the same data type same data type . . Figure 11-4 Processing an array Figure 11-5 Frequency array Figure 11-6 Histogram Figure 11-7- Part I Two-dimensional array