Skip to content

pythoner/Algorithms

Repository files navigation

Algos in Python

Implementation for the algorithms and datastructures taught in CS161, in Python Includes test code - doctests for few and full unittests for others

Completed

  • Karatsuba Multiplication
  • Basic Sorting
  • Counting Inversions in an array
  • Selecting ith order statistic in an array
  • Graph datastructure (directed & undirected)
  • Graph Algos
    • Topological Sorting
    • Shortest hops
    • DFS
    • BFS
    • Connected Components
    • Dijkstra's Shortest Path - O(mlogn)
    • Prim's Minimum Cost Spanning Tree - O(mlogn)
    • Kruskal's Minimum Spanning Tree - O(mlogn)
  • Heap datastructure
    • Max heaps
    • Min heaps (priority queue)
    • Heapsort
  • Job Scheduling
  • UnionFind Data Structure

Tests

python -m tests.graph_test
python -m tests.digraph_test
python -m tests.graph_algorithms_test
python -m tests.heap_test
python -m tests.unionfind_test

About

Data Structures and Algorithms in Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors