TAILIEUCHUNG - Data Structures and Algorithms: Maps and Dictionaries

Data Structures and Algorithms: Maps and Dictionaries presents Maps & Dictionaries, The Map ADT, Dictionary ADT, Implement Dictionary ADT, Hash Tables, Hash Functions and Hash Tables, Hash Codes, Compression Functions. | Maps and Dictionaries Data structures and Algorithms Acknowledgement: These slides are adapted from slides provided with Data Structures and Algorithms in C++ Goodrich, Tamassia and Mount (Wiley, 2004) Outline Maps () Hash tables () Dictionaries () Maps and Dictionaries 2 Maps & Dictionaries Map ADT and Dictionary ADT: model a searchable collection of key-value entries main operations are searching, inserting, and deleting entries Map: multiple entries with the same key are not allowed Map applications: Dictionary: multiple entries with the same key are allowed Dictionary applications: address book student-record database word-definition pairs credit card authorizations DNS mapping of host names (., ) to internet IP addresses (., ) Maps and Dictionaries 3 Maps Maps and Dictionaries 4 The Map ADT Map ADT methods: get(k): if the map M has an entry with key k, return its associated value; else, return null put(k, v): insert entry (k, v) into the map M; if key k is not already in M, then return null; else, return old value associated with k remove(k): if the map M has an entry with key k, remove it from M and return its associated value; else, return null size(), isEmpty() keys(): return an iterator of the keys in M values(): return an iterator of the values in M Maps and .

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.