Skip to content

This repository is dedicated to studying the implementation of various algorithms, starting from basic sorting and searching techniques to advanced graph algorithms, dynamic programming and more.

Notifications You must be signed in to change notification settings

MostafaAE/algorithms

Repository files navigation

Algorithms

This repository hosts a diverse collection of implemented algorithms across various domains in computer science. From foundational searching and sorting techniques to advanced graph algorithms and dynamic programming, this repository provides a comprehensive resource for understanding and implementing essential algorithms.

What's Inside

Fundamental methods for locating elements in collections.

  • Linear Search – sequentially checks each element (O(n)).
  • Binary Search – efficiently searches sorted data (O(log n)).

Classic algorithms for ordering data.

  • Selection Sort – repeatedly selects the minimum element (O(n²)).
  • Insertion Sort – builds a sorted list one element at a time (O(n²)).
  • Count Sort – non-comparison sort using element frequency (O(n + k)).

Solves problems by recursively dividing them into subproblems.

  • Merge Sort – stable and efficient divide-and-conquer sort (O(n log n)).
  • Quick Sort – efficient in practice with average-case O(n log n).

Algorithms for traversing and processing graphs.

  • Kahn's Algorithm – orders nodes in a directed acyclic graph (DAG).

Solves problems by combining solutions to subproblems with overlapping states.

Explores decision trees by trying all possibilities and backtracking when needed.

Efficient algorithms for searching substrings in text.

  • Rabin–Karp – uses a rolling hash for multiple pattern matching.
  • Knuth–Morris–Pratt (KMP) – uses prefix function for linear-time pattern search.

About

This repository is dedicated to studying the implementation of various algorithms, starting from basic sorting and searching techniques to advanced graph algorithms, dynamic programming and more.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages