Skip to content

starkk242/ds

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Implementation for the Data Structures

from ds import Stack
from ds import Queue
from ds import MaxHeap

mystack=Stack()
mystack.push(1)
mystack.push(2)
print(mystack.peek())
print(mystack.pop())
print(mystack)

myqueue=Queue()
myqueue.enqueue(15)
myqueue.enqueue(10)
myqueue.enqueue(17)
print(myqueue.get_size())
print(myqueue.dequeue())
print(myqueue)

my=MaxHeap([95,3,21])
my.push(15)
my.push(14)
my.push(20)
my.push(18)
print(my)
print(my.peek())
print(my.pop())
print(my.peek())
print(my.pop())
print(my.peek())
print(my.pop())

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages