YSC2229: Introductory Data Structures and Algorithms
  • 1. Software Prerequisites
  • 2. OCaml Style Guide
  • 3. Policies
  • 4. Midterm Project: Memory Allocation and Reclamation
  • 5. Final Project: Vroomba Programming
  • 1. Chapter 01: Introduction
  • 2. Chapter 02: Working with Arrays
  • 3. Chapter 03: Complexity of Algorithms and Order Notation
  • 4. Chapter 04: Divide-and-Conquer Algorithms
  • 5. Chapter 05: Binary Heaps and Priority Queues
    • 5.1. Printing and Validating Generic Arrays
    • 5.2. Best-Worst Case for Comparison-Based Sorting
    • 5.3. Sorting in Linear Time
    • 5.4. Binary Heaps
    • 5.5. Maintaining Binary Heaps
    • 5.6. Heapsort
    • 5.7. Priority Queues
    • 5.8. Exercises
  • 6. Chapter 06: Abstract Data Types
  • 7. Chapter 07: Hashing-Based Data Structures
  • 8. Chapter 08: Searching in Strings
  • 9. Chapter 09: Backtracking and Dynamic Programming
  • 10. Chapter 10: Data Encoding and Compression
  • 11. Chapter 11: Binary Search Trees
  • 12. Chapter 12: Graph Algorithms
  • 13. Chapter 13: Elements of Computational Geometry
YSC2229: Introductory Data Structures and Algorithms
  • »
  • 5. Chapter 05: Binary Heaps and Priority Queues

5. Chapter 05: Binary Heaps and Priority Queues

  • 5.1. Printing and Validating Generic Arrays
  • 5.2. Best-Worst Case for Comparison-Based Sorting
  • 5.3. Sorting in Linear Time
    • 5.3.1. Simple Bucket Sort
    • 5.3.2. Enhanced Bucket Sort
    • 5.3.3. Stability of sorting
    • 5.3.4. Radix Sort
  • 5.4. Binary Heaps
    • 5.4.1. Finding a maximum in a changing array
    • 5.4.2. Definition of a binary heap
    • 5.4.3. Checking that an array is a heap
  • 5.5. Maintaining Binary Heaps
    • 5.5.1. “Heapifying” elements of an array
    • 5.5.2. Complexity of heapify
    • 5.5.3. Building a heap from an array
  • 5.6. Heapsort
    • 5.6.1. Heapsort Complexity
    • 5.6.2. Evaluating Heapsort
    • 5.6.3. Which sorting algorithm to choose?
  • 5.7. Priority Queues
    • 5.7.1. Creating Priority Queues
    • 5.7.2. Operations on Priority Queues
    • 5.7.3. Working with Priority Queues
  • 5.8. Exercises
    • 5.8.1. Exercise 1
    • 5.8.2. Exercise 2
    • 5.8.3. Exercise 3
    • 5.8.4. Exercise 4
    • 5.8.5. Exercise 5
    • 5.8.6. Exercise 6
Previous Next

© Copyright 2021, Ilya Sergey.

Built with Sphinx using a theme provided by Read the Docs.