Skip to content

paulsheridan/data-structures

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

data-structures

A repository that will hold sample code for a number of classic data structures implemented in Python. It includes: A Singly Linked List, A Doubly Linked List and a Stack

A Linked List is useful when: You don't need random access to the elements. You need to push and retrieve values to/from the beginning of the list in constant time. You need to push and retrieve values to/from the beginning or the end in constant time (doubly linked list only). You want to push items to the middle of the list easily and quickly.

A Stack might be useful when: You'd like to completely walk through a file system data tree using its first-in-last-out structure. You want a list structured only to pop things out in the reverse order you put them in.

The Heap self-organizes whenever a change is made and will always pop the largest available value inside it.

The Priority Queue takes tuples of value/priority (from 0 to 4) and organizes the inputs by priority. The highest priority tuples will always pop from the list.

About

A repository that will hold sample code for a number of classic data structures implemented in Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages