Skip to content

A collection of some algorithms (sort, search, dynamic programming, recursion..)

Notifications You must be signed in to change notification settings

tatitati/algorithms

Repository files navigation

ALGORITHMS

Recursion

  • Sum of numbers from 1 to n
  • Fibonacci
  • Reverse string
  • factorial
  • counting backward by 2
  • check if number is polyndrome
  • hanoi tower

BackTracking

  • Solve laberinth
  • Solve Sudoku
  • ADN sequence

Sort

  • Bubble sort
  • Insertion sort
  • Merge sort
  • Selection sort
  • Quick sort
  • Bucket sort
  • Radix sort

Search

  • Binary search using array (iterative)
  • Binary search using array (recursive)
  • Binary search tree (BST)
  • ...

Clustering

  • K-Means

Dynamic Programming

  • Fibonacci (Top-DOWN, memoization)
  • Fibonacci (Bottom-UP, tabulation)
  • Solve Knapsack
  • Max array sum
  • coin change
  • Largest common subsequence
  • rod cut (Top-DOWN, memoization)
  • rod cut (Bottom-UP, tabulation)

Concurrency

  • ...

DATA STRUCTURES

Graphs

Traverse

  • Breath First Search (queue, iterative)
  • Breath First Search (queue, recursive)
  • Depth First Search (stack, iterative)
  • Depth First Search (stack, recursive)

Find shortest path (single source)

  • Dijkstra
  • Bellman Ford

All pairs shortest paths

  • Floyd-Warshall
  • Johnson's

Minimum Spanning Tree (MST)

  • Kruskal
  • Prim (with Min Priority Queue + Adjacency matrix)
  • Prim (with node-color)

Maximum Flow

  • Ford-Fulkerson

Component strongly connected

  • ....

Classifying edges

  • ....

Strings

  • Count consonants (iterative)
  • Count consonants (recursive)

Binary Tree

  • Traversal INORDER
  • Traversal PREORDER
  • Traversal POSTORDER
  • Traversal LEVEL ORDER
  • Traversal LEVEL ORDER (reverse order)
  • Find MIN
  • Find MAX
  • Find inorder PRECESSOR
  • Find inorder SUCESSOR
  • Operation INSERT
  • Operation DELETE
  • Operation SEARCH
  • Rotation Left
  • Rotation Right

Hash map

  • Bloom filters

Heap

  • Heap Tree

Black-Red

  • Black-Red Tree

Queue

  • Queue
  • Max Priority Queue
  • Min Priority Queue

About

A collection of some algorithms (sort, search, dynamic programming, recursion..)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published