TAILIEUCHUNG - Ebook Data structure and algorithms in C++ (2nd edition): Part 2

(BQ) This C++ version retains the same pedagogical approach and general structure as the Java version so schools that teach data structures in both C++ and Java can share the same core syllabus. The unparalleled author team incorporates the object-oriented design paradigm using C++ as the implementation language, while also providing intuition and analysis of fundamental algorithms. | Mul iw y Tr CS At the beginning of the preceding chapter a genera definition of a tree was given but the thrust of that chapter was binary trees in particular binary search trees. A tree was defined as either an empty structure or a structure whose children are disjoint trees ip . . . tk. According to this definition each node of this kind of tree can have more than two children. This tree is called a multiway tree of order m or an m-way tree. In a more useful version of a multiway tree an order is imposed on the keys residing in each node. A multiway search tree of order m or an m-way search tree is a multiway tree in which 1. Each node has m children and m - 1 keys. 2. The keys in each node are in ascending order. 3. The keys in the first i children are smaller than the ith key. 4. The keys in the last m - i children are larger than the th key. The m-way search trees play the same role among m-way trees that binary search trees play among binary trees and they are used for the same purpose fast information retrieval and update. The problems they cause are similar. The tree in Figure is a 4-way tree in which accessing the keys can require a different number of tests for different keys The number 35 can be found in the second node tested and 55 is in the fifth node checked. The tree therefore suffers from a known malaise It is unbalanced. This problem is of particular importance if we want to use trees to process data on secondary storage such as disks or tapes where each access is costly. Constructing such trees requires a more careful approach. 302 Section The Family of B-Trees E 303 Figure A 4-way tree. E The Family of B-Trees The basic unit of I O operations associated with a disk is a block. When information is read from a disk the entire block containing this information is read into memory and when information is stored on a disk an entire block is written to the disk. Each time information is requested from a disk this information has to be

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.