Skip to content

the best heap implementation ever made using python with heap sort for ascending and desending order

Notifications You must be signed in to change notification settings

ALAWIII/Heap-implementation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

Heap-implementation

the best heap implementation ever made using python with heap sort for ascending and desending order

some examples :

obj = HeapQueue(data=[5,8,1,4,8,2,8,2,9], max_priority=True)
obj.sort(ascending=True)

obj2 = HeapQueue(data=[5,8,1,4,8,2,8,2,9], max_priority=True)
obj2.sort(ascending=False)

obj3 = HeapQueue(data=[5,8,1,4,8,2,8,2,9], max_priority=False)
obj3.sort(ascending=True)

obj4 = HeapQueue(data=[5,8,1,4,8,2,8,2,9], max_priority=False)
obj4.sort(ascending=False)

print(obj)
print(obj2)
print(obj3)
print(obj4)

About

the best heap implementation ever made using python with heap sort for ascending and desending order

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages