Repository for Data Structures and Algorithms in Python.
These programs can be imported and used as modules in your programs.
-
- Mathematical operations on Matrices
- Addition
- Subtraction
- Scalar Multiplication
- Multiplication
- Transpose
- Identity
-
- Stack Data Structure
- Push
- Pop
- Top
-
- Traverse Binary Trees
- Without any order
- Pre order
- In order
- Post order
-
- Tower of Hanoi puzzle
- Display Steps
- Uses Stack DS from stack.py as Rods
-
- Factorial of a Positive Integer
- Iteration (for & while)
- Recursion
-
- Factors of Non-Zero Integers
- Iteration (for & while)
- Recursion
-
- Permutations & Combinations
- nPr
- nCr
- Uses factorial.py for calculating factorials
-
- Pascal's Triangle
- Uses permutations_combinations.py for calculating nCr
-
- Sorting List of Floats and/or Integers
- Quick Sort
- Merge Sort
- Selection Sort
- Insertion Sort
- Bubble Sort
-
- Compare Time Complexity of Sorting Algorithms
- Show Scores
- Plot a Graph
- Uses sorting.py for sorting algorithms
-
- Searching within a List
- Linear Search
- Binary Search
- Uses sorting.py for the sorting algorithm
-
- Queue Data Structure
- Single Ended Queue
- Double Ended Queue
- Enqueue
- Dequeue