Skip to content

Repository files navigation

Basic Python Algorithms

This repository contains fundamental algorithm implementations in Python. These include sorting, searching, recursion, and mathematical algorithms, commonly used in Data Structures & Algorithms (DSA) courses and coding interviews.

Each script is a standalone implementation demonstrating a specific concept with clean and understandable code.


πŸ“‚ Included Algorithms

πŸ” Searching Algorithms

  1. Binary Search – Implements binary search after sorting with bubble sort.
  2. Recursive Binary Search – A recursive approach to binary search.
  3. Sequential Search – Searches for an element in a list sequentially.

πŸ”’ Sorting Algorithms

  1. Bubble Sort – Sorts a list using the bubble sort technique.
  2. Selection Sort – Implements the selection sort algorithm.
  3. Insertion Sort – Implements the insertion sort algorithm.

πŸ”£ Mathematical Algorithms

  1. GCD.py – Uses the Euclidean algorithm to compute the Greatest Common Divisor (GCD).
  2. LCM.py – Finds the Least Common Multiple (LCM) of given numbers.
  3. Factorial.py – Calculates the factorial of a number using recursion.
  4. Fibonacci Series.py – Generates the Fibonacci sequence up to a specified limit.

πŸ“Š Miscellaneous

  1. Check Parenthesis.py – Uses a stack to check if parentheses in a string are balanced.
  2. Check Matrices Equality.py – Compares two matrices for equality.
  3. Largest and Smallest in List.py – Finds the largest and smallest elements in a list.

About

πŸ“Œ Python-Sorting-Searching is a collection of fundamental Python algorithms, focusing on sorting, searching, and basic mathematical operations. These algorithms are essential for problem-solving, coding interviews, and understanding algorithmic efficiency.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages