

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Complexity of Interval Heap Operations
A double-ended priority queue(DEPQ) or interval heap features the following operations −
isEmpty()
This function performs to check if DEPQ is empty and returns true if empty.
size()
This function performs to return the total number of elements present in the DEPQ.
getMin()
This function performs to return the element having lowest priority.
getMax()
This function performs to return the element having maximum priority.
put(z)
This function performs to insert the element z in the DEPQ.
removeMin()
This function performs to remove an element with smallest priority and returns this element.
removeMax()
This function performs to remove an element with highest priority and returns this element.
- The operations isEmpty(), size(), getMin(), and getMax() consume O(1) time each;
- put(z), removeMin(), and removeMax() consume O(log n) each;
- Initializing an n element interval heap takes O(n) time.
- Related Questions & Answers
- Initializing an Interval Heap
- Asymptotic Complexity
- Amortized Complexity
- Array Representation Of Binary Heap
- Heap Sort
- Convert min Heap to max Heap in C++
- Complexity of an algorithm for size n=3
- What is the complexity of the Apriori Algorithm?
- How to calculate the time complexity of interpolation search?
- Memory representation of Binomial Heap in C++
- What is 'Space Complexity’?
- Amortized time complexity in Data Structures
- Python Heap Queue Algorithm
- Heap Sort in C#
- Binomial Heap in C++?
Advertisements