1. Trang chủ
  2. » Công Nghệ Thông Tin

Data structure english lesson

24 274 1

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 24
Dung lượng 548,5 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Understand arrays and their usefulness.Understand records and the difference between an array and a record.. Understand the concept of a linked list and the difference between an array a

Trang 1

Data Structures

Trang 2

Understand arrays and their usefulness.

Understand records and the difference between an array and

a record

Understand the concept of a linked list and the difference

between an array and a linked list

After reading this chapter, the reader should

be able to:

Understand when to use an array and when to use a linked-list

Trang 3

 organizing related pieces of data

 allowing different operations to be performed on the data

 The basic types of data structures include:

Trang 4

A RRA Y S 11.1

Trang 5

 Array

a fixed-size, sequenced collection of

elements of the same data type.

 The subscripts indicate the ordinal number

of the element counting from the

beginning of the array.

Trang 6

Figure 11-1 Twenty individual variables

Trang 7

Figure 11-2 Processing individual variables

Trang 8

Figure 11-3 Arrays with subscripts and indexes

Trang 9

Figure 11-4 Processing an array

Trang 10

Figure 11-5

Frequency array

 Show the number of elements with the same value found in a series of numbers.

Trang 11

Figure 11-6 Histogram

 A pictorial representation of a frequency array

Trang 12

Figure 11-7- Part I Two-dimensional array

Trang 13

Figure 11-8 Memory layout

Trang 14

RECORDS 11.2

Trang 15

 Array: all elements – same type

 Record: elements – same or different types

Trang 16

Figure 11-9 Records

Trang 17

The elements in a

same or different or different types

But all elements

in the record must be related

Note:

Trang 18

LINK ED LISTS 11.3

Trang 19

Linked list

 Linked list

an ordered collection of data in which each element

contains the location of the next element

 Each element contains two parts: data and link

 The link contains a pointer (an address) that identifies the next element in the list

 Singly linked list

 The link in the last element contains a null pointer,

indicating the end of the list

Trang 20

Figure 11-10 Linked lists

Trang 21

Figure 11-11 Node

 Nodes : the elements in a linked list

 The nodes in a linked list are called self-referential

records

 Each instance of the record contains a pointer to another instance of the same structural type

Trang 22

Figure 11-12 Inserting

a node

Trang 23

Figure 11-13

Deleting a node

Trang 24

Figure 11-14 Traversing a list

Ngày đăng: 24/10/2014, 01:17

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

  • Đang cập nhật ...

TÀI LIỆU LIÊN QUAN