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
- Multiplication
- Transpose
-
- Stack Data Structure
- Push
- Pop
- Top
-
- Traverse Binary Trees
- Without any order
- Pre order
- In order
- Post order
-
- Tower of Hanoi puzzle
- Uses Stack DS from stack.py as Rods
- Display Steps
-
- 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