5 Common Algorithms You Should Now

If you want to become a software engineer or have an interest in coding, but don’t know where to start, here is a quick tip from your favorite friends at Kano. Algorithms.

Once you get the gist of the famous algorithms of programming, you’ll start seeing them everywhere and coding will become like a second language. The more algorithms you know, the more they’ll help you in your future career as a software engineer.

To get you started, let’s look at the common algorithms you should know.

Search Algorithm

Search algorithm is designed to find the required data in the data structure where it is stored. Here are some examples:
- Linear Search
- Binary Search
- Depth First Search (DFS)
- Breadth First Search (DFS)
- Jump search (DFS)

Greedy algorithm

Greedy is an algorithmic paradigm that builds up a solution piece by piece, always choosing the next piece that offers the most obvious and immediate benefit. Here are some examples:
- Huffman coding
- Fractional Knapsack problem
- Activity Selection
- Job sequencing problem

Dynamic Programming

Dynamic programming can optimize recursion. D.P stores the results of subproblem for recomputation in further problems. This simple optimization reduces time complexities from exponential to polynomial. Here are our favorites:
- Fibonacci number series.
- Knapsack problem
- Tower of Hanoi
- Shortest path by Dijkstra
- Matrix chain multiplication

Recursive Algorithm

A recursive algorithm is an algorithm that calls itself with smaller or simpler input values, and the result for the current input by applying simple operations to the returned value for the smaller input. Here are some of the best examples:
- Factorial
- Exponential
- Tower of Hanoi
- Tree traversals
- DFS of graph

Sort algorithm

Sort algorithms are used to rearrange array or given list of elements according to the comparison operator. The comparison operator is used to decide the new order of elements in the respective data structure. Like some of these:
- Quick sort
- Insertion sort
- Selection sort
- Bubble sort
- Tim sort
- Radix sort
- Heap sort
- Merge sort

What do you think? Did we miss any? Let us know on social media.

Writing by The CoderGeek.

Tech for creation, not just consumption.