Skip to content

cwohlfeil/python_data_structs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Examples of Python Data Structures and Algorithms

This repository is meant to be a tool to help me ensure I fully grasp these concepts, I made it public because it might help others too, and I may want to look over it again someday. It's glorified homework.

Throughout this repo I try to keep my code very pythonic, especially paying attention to PEP8 formatting and modern python best practices. I start off very basic and slowly ramp up the difficulty, commenting everything then only commenting new ideas/syntax.

Licensing

Most things here are based on Problem Solving with Algorithms and Data Structures using Python which is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Everything else is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.

Contributing

If there's anything you do not understand, file an issue and I will attempt to clarify. If you think you can make my code better, by all means submit a pull request. Try to pay attentions to the ramp up in code complexity I am attempting, don't try to make some code golf nonsense in the basic data structures and expect to get merged.

Contents

  • big_o.py - Some simple examples of Big O algorithms in Python.
  • basic - The basic data structures, with some examples.
    1. stack
    2. queue
    3. deque
    4. unordered list
    5. ordered list
  • recursion - Some examples of recursive algorithms.
    1. simple
    2. stack frames
    3. visualizing recursion simple
    4. visualizing recursion
    5. sierpinski triangle
    6. tower of hanoi
    7. maze
    8. dynamic programming
  • sort_search - Some examples of sorting and searching algorithms.
    1. sequential search
    2. binary search
    3. hash table
    4. bubble sort
    5. selection sort
    6. insertion sort
    7. shell sort
    8. merge sort
    9. quick sort
  • tree - Some examples of trees and tree algorithms.
    1. list of lists
    2. binary tree
    3. parse tree
    4. binary heap
    5. binary search trees
    6. balanced binary search trees
  • graphs - Some examples of graphs and graph algorithms.
    1. adjacency list
    2. breadth first search
    3. depth first search
    4. shortest path

Todo

  • More Big O examples
  • Simplify/pythonify code
  • Finish explanations
  • End of chapter questions
  • Programming exercises
  • Testing

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages