Data Structures and Algorithms: Priority Queues!

Data Structures and Algorithms: Priority Queues! includes Priority Queue ADT, Total Order Relations, Entry ADT, Comparator ADT, Priority Queue Sorting, Sequence-based Priority, Selection-Sort. | Data Structures and Algorithms
 Priority Queues! Outline" •  Priority Queues! •  Heaps! •  Adaptable Priority Queues! Phạm Bảo Sơn - DSA Priority Queues " Priority Queue ADT " •  A priority queue stores a collection of entries! •  Each entry is a pair
 (key, value)! •  Main methods of the Priority Queue ADT! –  insert(k, x)
 inserts an entry with key k and value x! –  removeMin()
 removes and returns the entry with smallest key! Phạm Bảo Sơn - DSA •  Additional methods! –  min()
 returns, but does not remove, an entry with smallest key! –  size(), isEmpty()! •  Applications:! –  Standby flyers! –  Auctions! –  Stock market! Total Order Relations " •  Keys in a priority •  Mathematical concept queue can be of total order relation ≤! arbitrary objects –  Reflexive property:
 x≤x on which an order is defined! –  Antisymmetric property:
 x ≤ y ∧ y ≤ x ⇒ x = y! •  Two distinct –  Transitive property:
 entries in a priority x≤y∧y≤z⇒x≤z queue can have the same key Phạm Bảo Sơn - .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
Đã 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.