Heap

heap data type
575 téléchargements
Mise à jour 15 déc. 2011

Afficher la licence

Implements heap data type.

properties:
h- an array in which the data is stored
heapSize- the size of the heap
methods:
Heap- constructor for the Heap class, acepts numeric arrays as an input.
heapSort- method for performing sorting, runtime O(nlogn),although, very, very slow... not to be used for sorting arrays!!!
heapMaximum- returns maximum in the heap heapExtractMax- extracts maximum value from the heap
heapIncreaseKey- increses the key in the postion i
maxKeyInsert- inserts a key in the heap

made by Hanan Kavitz
free for distribution

Citation pour cette source

Hanan Kavitz (2024). Heap (https://www.mathworks.com/matlabcentral/fileexchange/34218-heap), MATLAB Central File Exchange. Récupéré le .

Compatibilité avec les versions de MATLAB
Créé avec R2011b
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur Configure Simulation Conditions dans Help Center et MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Publié le Notes de version
1.0.0.0