1. Trang chủ
  2. » Tất cả

Đề thi cấu trúc dữ liệu và giải thuật dsa ch4 lists

31 4 0
Tài liệu đã được kiểm tra trùng lặp

Đ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

Tiêu đề Lists
Tác giả Dr. Nguyen Ho Man Rang
Trường học University of Technology, VNU-HCM
Chuyên ngành Computer Science and Engineering
Thể loại Tài liệu
Định dạng
Số trang 31
Dung lượng 519,58 KB

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

Nội dung

Lists Dr Nguyen Ho Man Rang Linear list concepts Array implementation Singly linked list Other linked lists Comparison of implementations of list 4 1 Chapter 4 Lists Data Structures and Algorithms Dr[.]

Trang 1

Dr Nguyen HoMan Rang

Linear list conceptsArray

implementationSingly linked listOther linked listsComparison ofimplementations oflist

Chapter 4

Lists

Data Structures and Algorithms

Dr Nguyen Ho Man Rang Faculty of Computer Science and Engineering

University of Technology, VNU-HCM

Trang 2

Dr Nguyen HoMan Rang

Linear list conceptsArray

implementationSingly linked listOther linked listsComparison ofimplementations oflist

Outcomes

• L.O.2.1 - Depict the following concepts: (a) array list

and linked list, including single link and double links,

and multiple links.

• L.O.2.2 - Describe storage structures by using

pseudocode for: (a) array list and linked list, including

single link and double links, and multiple links.

• L.O.2.3 - List necessary methods supplied for list and

describe them using pseudocode.

• L.O.2.4 - Implement list using C/C++.

Trang 3

Dr Nguyen HoMan Rang

Linear list conceptsArray

implementationSingly linked listOther linked listsComparison ofimplementations oflist

Outcomes

• L.O.2.5 - Use list for problems in real-life, and choose

an appropriate implementation type (array vs link).

• L.O.2.6 - Analyze the complexity and develop

experiment (program) to evaluate the efficiency of

methods supplied for list.

• L.O.8.4 - Develop recursive implementations for

methods supplied for the following structures: list.

• L.O.1.2 - Analyze algorithms and use Big-O notation to

characterize the computational complexity of algorithms

composed by using the following control structures:

sequence, branching, and iteration (not recursion).

Trang 4

Dr Nguyen HoMan Rang

Linear list conceptsArray

implementationSingly linked listOther linked listsComparison ofimplementations oflist

Contents

1 Linear list concepts

3 Singly linked list

4 Other linked lists

5 Comparison of implementations of list

Trang 5

Dr Nguyen HoMan Rang

Linear list conceptsArray

implementationSingly linked listOther linked listsComparison ofimplementations oflist

Linear list concepts

Trang 6

Dr Nguyen HoMan Rang

Linear list conceptsArray

implementationSingly linked listOther linked listsComparison ofimplementations oflist

Linear list concepts

Definition

A linear list is a finite, ordered sequence of

data items known as elements "Ordered" in

this definition means that each element has a

position in the list.

Trang 7

Dr Nguyen HoMan Rang

Linear list conceptsArray

implementationSingly linked listOther linked listsComparison ofimplementations oflist

Linear list concepts

Trang 8

Dr Nguyen HoMan Rang

Linear list conceptsArray

implementationSingly linked listOther linked listsComparison ofimplementations oflist

Linear list concepts

General list:

used on the list.

Trang 9

Dr Nguyen HoMan Rang

Linear list conceptsArray

implementationSingly linked listOther linked listsComparison ofimplementations oflist

Linear list concepts

Restricted list:

list.

ends of the list.

Trang 10

Dr Nguyen HoMan Rang

Linear list conceptsArray

implementationSingly linked listOther linked listsComparison ofimplementations oflist

Trang 11

Dr Nguyen HoMan Rang

Linear list conceptsArray

implementationSingly linked listOther linked listsComparison ofimplementations oflist

operation on each element.

Trang 12

Dr Nguyen HoMan Rang

Linear list conceptsArray

implementationSingly linked listOther linked listsComparison ofimplementations oflist

List ADT

Extended operations:

Trang 13

Dr Nguyen HoMan Rang

Linear list conceptsArray

implementationSingly linked listOther linked listsComparison ofimplementations oflist

Insertion

position p in the list

Trang 14

Dr Nguyen HoMan Rang

Linear list conceptsArray

implementationSingly linked listOther linked listsComparison ofimplementations oflist

Insertion

made at any position in the list (at the

beginning, in the middle, at the end).

inserted so that the ordering of the list

is maintained (searching appropriate

position is needed).

definition (FIFO or LIFO).

Trang 15

Dr Nguyen HoMan Rang

Linear list conceptsArray

implementationSingly linked listOther linked listsComparison ofimplementations oflist

Removal

position p in the list

Sorted List.

Trang 16

Dr Nguyen HoMan Rang

Linear list conceptsArray

implementationSingly linked listOther linked listsComparison ofimplementations oflist

Retrieval

position p in the list

Sorted List.

All elements remain unchanged.

Trang 17

Dr Nguyen HoMan Rang

Linear list conceptsArray

implementationSingly linked listOther linked listsComparison ofimplementations oflist

Removal, Retrieval

given data

Sorted List: Searching is needed in

order to locate the data being deleted/

retrieved.

Trang 18

Dr Nguyen HoMan Rang

Linear list conceptsArray

implementationSingly linked listOther linked listsComparison ofimplementations oflist

Success of Basic Operations

full.

the list is not empty.

Trang 19

Dr Nguyen HoMan Rang

Linear list conceptsArray

implementationSingly linked listOther linked listsComparison ofimplementations oflist

Array implementation

Trang 20

Dr Nguyen HoMan Rang

Linear list conceptsArray

implementationSingly linked listOther linked listsComparison ofimplementations oflist

Dynamically Allocated Array

Trang 21

Dr Nguyen HoMan Rang

Linear list conceptsArray

implementationSingly linked listOther linked listsComparison ofimplementations oflist

Dynamic Array: Implementation in C++

Trang 22

Dr Nguyen HoMan Rang

Linear list conceptsArray

implementationSingly linked listOther linked listsComparison ofimplementations oflist

Dynamic Array: Implementation in C++

Trang 23

Dr Nguyen HoMan Rang

Linear list conceptsArray

implementationSingly linked listOther linked listsComparison ofimplementations oflist

Dynamic Array: Implementation in C++

Trang 24

Dr Nguyen HoMan Rang

Linear list conceptsArray

implementationSingly linked listOther linked listsComparison ofimplementations oflist

Dynamic Array: Implementation in C++

Trang 25

Dr Nguyen HoMan Rang

Linear list conceptsArray

implementationSingly linked listOther linked listsComparison ofimplementations oflist

Dynamic Array: Implementation in C++

Trang 26

Dr Nguyen HoMan Rang

Linear list conceptsArray

implementationSingly linked listOther linked listsComparison ofimplementations oflist

Dynamic Array: Implementation in C++

Trang 27

Dr Nguyen HoMan Rang

Linear list conceptsArray

implementationSingly linked listOther linked listsComparison ofimplementations oflist

Dynamic Array: Implementation in C++

Trang 28

Dr Nguyen HoMan Rang

Linear list conceptsArray

implementationSingly linked listOther linked listsComparison ofimplementations oflist

Dynamic Array: Implementation in C++

Trang 29

Dr Nguyen HoMan Rang

Linear list conceptsArray

implementationSingly linked listOther linked listsComparison ofimplementations oflist

Dynamic Array: Implementation in C++

Trang 30

Dr Nguyen HoMan Rang

Linear list conceptsArray

implementationSingly linked listOther linked listsComparison ofimplementations oflist

Dynamic Array: Using

Trang 31

Dr Nguyen HoMan Rang

Linear list conceptsArray

implementationSingly linked listOther linked listsComparison ofimplementations oflist

Contiguous Implementation of List

In processing a contiguous list with n elements:

physical shifting ).

Ngày đăng: 25/03/2023, 08:39

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

TÀI LIỆU LIÊN QUAN

🧩 Sản phẩm bạn có thể quan tâm

w