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

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

31 3 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

Định dạng
Số trang 31
Dung lượng 519,58 KB

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[.]

Lists Dr Nguyen Ho Man Rang Chapter Lists Linear list concepts Data Structures and Algorithms Array implementation Singly linked list Other linked lists Dr Nguyen Ho Man Rang Faculty of Computer Science and Engineering University of Technology, VNU-HCM Comparison of implementations of list 4.1 Outcomes Lists Dr Nguyen Ho Man Rang • 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++ Linear list concepts Array implementation Singly linked list Other linked lists Comparison of implementations of list 4.2 Outcomes Lists Dr Nguyen Ho Man Rang • 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) Linear list concepts Array implementation Singly linked list Other linked lists Comparison of implementations of list 4.3 Contents Lists Dr Nguyen Ho Man Rang Linear list concepts Array implementation Linear list concepts Array implementation Singly linked list Singly linked list Other linked lists Other linked lists Comparison of implementations of list Comparison of implementations of list 4.4 Lists Dr Nguyen Ho Man Rang Linear list concepts Linear list concepts Array implementation Singly linked list Other linked lists Comparison of implementations of list 4.5 Linear list concepts Lists Dr Nguyen Ho Man Rang 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 Linear list concepts Array implementation Singly linked list Other linked lists Comparison of implementations of list 4.6 Linear list concepts Lists Dr Nguyen Ho Man Rang Linear list concepts Array implementation Singly linked list Other linked lists Comparison of implementations of list 4.7 Linear list concepts Lists Dr Nguyen Ho Man Rang General list: • No restrictions on which operation can be used on the list • No restrictions on where data can be inserted/deleted Linear list concepts Array implementation Singly linked list Other linked lists • Unsorted list: data are not arranged in particular order • Sorted list: data are arranged according to a key Comparison of implementations of list 4.8 Linear list concepts Lists Dr Nguyen Ho Man Rang Restricted list: • Only some operations can be used on the list • Data can be inserted/deleted only at the ends of the list • Queue: FIFO (First-In-First-Out) • Stack: LIFO (Last-In-First-Out) Linear list concepts Array implementation Singly linked list Other linked lists Comparison of implementations of list 4.9 List ADT Lists Dr Nguyen Ho Man Rang Definition A list of elements of type T is a finite, ordered sequence of elements of T Linear list concepts Basic concepts: • A list is empty when it contains no elements • The number of elements currently stored is called the length (size) of the list • The beginning of the list is called the head, the end of the list is called the tail Array implementation Singly linked list Other linked lists Comparison of implementations of list 4.10 Removal, Retrieval Lists Dr Nguyen Ho Man Rang • Remove/ Retrieve an element with a given data • With General Unsorted List and General Sorted List: Searching is needed in order to locate the data being deleted/ retrieved Linear list concepts Array implementation Singly linked list Other linked lists Comparison of implementations of list 4.17 Success of Basic Operations Lists Dr Nguyen Ho Man Rang • Insertion is successful when the list is not full Linear list concepts Array implementation Singly linked list • Removal, Retrieval are successful when the list is not empty Other linked lists Comparison of implementations of list 4.18 Lists Dr Nguyen Ho Man Rang Linear list concepts Array implementation Array implementation Singly linked list Other linked lists Comparison of implementations of list 4.19 Dynamically Allocated Array Lists Dr Nguyen Ho Man Rang Linear list concepts Array implementation Singly linked list Other linked lists List // Contiguous Implementation of List // number of used elements ( mandatory ) size < integer > Comparison of implementations of list // ( Dynamically Allocated Array ) data < dynamic array of < DataType > > capacity < integer > End List 4.20 ... linked list Singly linked list Other linked lists Other linked lists Comparison of implementations of list Comparison of implementations of list 4.4 Lists Dr Nguyen Ho Man Rang Linear list concepts... list concepts Lists Dr Nguyen Ho Man Rang Linear list concepts Array implementation Singly linked list Other linked lists Comparison of implementations of list 4.7 Linear list concepts Lists Dr Nguyen... Other linked lists Comparison of implementations of list 4.18 Lists Dr Nguyen Ho Man Rang Linear list concepts Array implementation Array implementation Singly linked list Other linked lists Comparison

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

w