# Top must-know algorithms and data structures for computer science students3 min read

Even you are a self-taught programmer or a computer science student, a developer with years of experience or just a novice, you are preparing for an interview or whatever, familiar with some algorithms and know-how to solve them is crucial. But there are many resources and many things to learn that make you confused about what should be accumulated. In this article, hopefully, I can help you find the right direction from the very first steps for your learning data structures and algorithms’ path. Underneath, I list some top data structures and algorithms that every computer science student and programmer should know, even you may think it’s redundant because you don’t use those algorithms much in your work expect you are a competitive programmer. But trust me, learning new things will always benefit us.

**Data structures and algorithms are patterns for solving problems**. The more of them you have in your utility belt, the greater variety of problems you’ll be able to solve. You’ll also be able to come up with more elegant solutions to new problems than you would otherwise be able to. In fact, many effective algorithms had been designed and ready to use for many problems around us, such as Dijkstra’s algorithm – the algorithm designed for finding the shortest paths between nodes in a graph, QuickSort – efficient sorting algorithm for placing the elements of a random access file or an array in order, etc…so for the most part, your duty is trying to learn the common algorithms and applying those to appropriate problems. But one day you will create your own algorithm while solving problems, who knows?

**Also read:**

If you want to take a look a general view about the top 5 algorithms that dominate the world, check out this article.

## Top must-know algorithms

- Insertion sort, Selection sort, Bubble sort
- Merge Sort, Quicksort
- Binary Search
- Breadth-First Search (BFS)
- Single-Source Shortest Paths-Dijkstra’s algorithm
- Depth First Search (DFS)
- Lee algorithm | Shortest path in a Maze
- Flood fill Algorithm
- Floyd’s Cycle Detection Algorithm
- Kadane’s algorithm
- Longest Increasing Subsequence
- Inorder, Preorder, Postorder
- Heap Sort
- Topological Sorting in a DAG
- Disjoint-Set Data Structure (Union-Find Algorithm)
- Kruskal’s Algorithm for finding Minimum Spanning Tree
- Single-Source Shortest Paths — Dijkstra’s Algorithm
- Secure Hash Algorithm (SHA)
- All-Pairs Shortest Paths — Floyd Warshall Algorithm

## Top must-know data structures

The algorithm and data structure are often tied together. Besides learning and acquiring algorithm, you, as a computer science student, should also know about some popular data structures as well. Here is the list:

- Linked-List
- Linked List Implementation | Part 1
- Linked List Implementation | Part 2
- Insertion in BST
- Search given key in BST
- Deletion from BST
- Hashing
- Stack, Queue
- Min Heap and Max Heap
- Graph Implementation using STL
- Graph Implementation in C++ without using STL
- Trie Implementation | Insert, Search and Delete
- Memory efficient Trie Implementation using Map | Insert, Search and Delete

At the end of the day, if you are an avid algorithm learner after familiar with the list of algorithms above, you should also find out some useful concepts such as Backtracking, Dynamic Programming, Divide & Conquer, Greedy Algorithms, which are really useful and worth your time.

## Leave a Reply