Skip to content

frankpeng7/Min-Max-Heap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Min-Max-Heap

Final Project of EECS 495 Intensive Programming Design

Introduction

  • A min-max heap is a complete binary tree and often represented in an array.
  • Invariants:
    1. containing alternating min and max levels
    2. the root is always at min level
    3. every node at min level is less than all of its descendants
    4. every node at max level is greater than all of its descendants
  • Basic operations:
    • insert an element
    • find the least/greatest element
    • delete the least/greatest element
  • Time complexity:
    • Insert & deletion: O(lg n)
    • getMin & getMax: O(1)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published