/algorithms

Learning to code basic algorithms and data structures

Primary LanguagePython

Algorithms and Data structures 📚

This repository contains my steps in learning CS. To understand the basics, I code algorithms and data structures from scratch.

Data structures

  • Linked list
  • Array
  • B-Tree
  • Binary Trees
  • Heap
Data structures
Linked list
Searching algorithms 💾
Binary search O(log(n)) O(1)
Sorting algorithms 💾
Insertion sort O(n2) O(1)
Selection sort O(n2) O(1)
Bubble sort O(n2) O(1)
Counting sort O(n+k) O(k)
Mergesort O(nlog(n)) O(n)
Quicksort O(nlog(n)) O(log(n))

Each algorithms has its runtime ⏱ and space 💾 complexity, here are the typical ones big-o