Heaps and Tries in Computer Science

Topic 11
Heaps and Tries
Announcements
Grading
Homework 3 to be graded by today
Homework 4 to be graded tomorrow/Thursday
Homework 5 solutions will be up today
Test in 1.5 weeks
Online students: make sure you can take the test
on Thursday/Friday.
Participation
Schedule
Homework 5 solutions
 
 
 
 
 
Heaps
Priority Queues
Definition:
Heap Property
 
Representation/Implementation
 
Array attributes
 
Example representation
Calculating Parent/Child
 
Heap Operations: Insertion
 
 
 
 
 
Pseudocode
 
Heap Operations: delete-max/min
 
 
 
 
 
Heap Operations: build-heap
 
 
 
 
 
Example
 
 
 
 
Pseudocode
 
Heap Sort
 
Basic Idea
 
Pseudocode
 
Example
 
Stability
 
Tries
 
Definition
Definition:
Adding fixed-length keys
 
 
 
 
 
 
 
 
 
 
 
 
 
Alphabet Trie
(alphabet from English alphabet)
 
 
 
 
 
 
 
Analysis (compressed tries)
Search
Insertion
# nodes
Uses
Sort?
Search?
Searching for Suffixes
 
Example
 
 
 
 
 
Slide Note
Embed
Share

Delve into the concepts of heaps and tries, which are crucial data structures in computer science. Learn about priority queues, heap properties, representation, implementation, operations such as insertion and deletion, calculating parent/child relationships, and building heaps. This topic covers essential aspects of managing data efficiently in algorithms.

  • Data Structures
  • Computer Science
  • Heaps
  • Tries
  • Priority Queues

Uploaded on Sep 10, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Topic 11 Heaps and Tries

  2. Announcements Grading Homework 3 to be graded by today Homework 4 to be graded tomorrow/Thursday Homework 5 solutions will be up today Test in 1.5 weeks Online students: make sure you can take the test on Thursday/Friday. Participation Schedule

  3. Homework 5 solutions

  4. Heaps Priority Queues Definition:

  5. Heap Property

  6. Representation/Implementation

  7. Array attributes

  8. Example representation

  9. Calculating Parent/Child

  10. Heap Operations: Insertion

  11. Pseudocode

  12. Heap Operations: delete-max/min

  13. Heap Operations: build-heap

  14. Example

  15. Pseudocode

  16. Heap Sort

  17. Basic Idea

  18. Pseudocode

  19. Example

  20. Stability

  21. Tries

  22. Definition Definition:

  23. Adding fixed-length keys

  24. Alphabet Trie (alphabet from English alphabet)

  25. Analysis (compressed tries) Search Insertion # nodes

  26. Uses Sort? Search?

  27. Searching for Suffixes

  28. Example

More Related Content

giItT1WQy@!-/#giItT1WQy@!-/#