Algorithms every developer should know

Algorithms are a crucial part of software development. Whether they are divide and conquer, brute force, randomized, greedy, recursive, backtracking, or dynamic, algorithms help you accomplish the task you need and create more efficient software programs.

Here’s a short list of algorithms that you can further explore.


  • Linear search
  • Binary search
  • Depth-first search (DFS)
  • Breadth-first search (BFS)


  • Insertion sort
  • Selection sort
  • Merge sort
  • Heap sort
  • Quick sort
  • Counting sort

Graphs and paths

  • Kruskal - constructs a minimum spanning tree out of a connected, weighted graph.
  • Dijkstra - returns the shortest paths between nodes in a graph.
  • Bellman-Ford - unlike Dijkstra’s, it can handle negative weight edges in a graph.
  • Floyd-Warshall - returns the shortest paths between every pair of vertices in the graph.
  • Topological sort - returns a linear ordering of vertices of a directed graph.
  • Flood fill - determines the area connected to a given node in a multi-dimensional array.
  • Lee algorithm - one possible solution for maze routing problems.

This short list is just a starting point; many more algorithms are worth knowing! So which are the ones you use daily?