Algorithms and Datastructures is the core of any computer science program. The concepts and ideas learned in this course are reused and re-applied throughout your education and beyond. For instance, achieving success in coding competitions; cracking technical interviews for placements; or working in the industry; all require a solid foundation on algorithms and datastructures. Its importance cannot be understated.
Despite its importance however, it is quite accessible to students across all domains who have basic programming skills.
We will begin with an example ("Address book example") that gives an overview of the first part of the course. It also serves to demonstrate the interplay between algorithms and the associated datastructures in solving problems.
Algorithms is a mathematical course. In this module we will cover some of the mathematical concepts that will be used throughout the course. Topics include: sets, functions, order notation, introduction to recurrence, recurrence relations, and master theorem. We will also familiarize ourselves with reading and writing pseudo-code.
Sorting an array often is the first step in designing complex algorithms for real world problems. Further, they are ideal to demonstrate algorithm design principles and analysis. Topics covered in this module include insertion sort, merge sort, heap sort, quick sort, and their analysis.
An array can be thought of as a datastructure, a rather simple one though. Organizing data in different ways help us perform certain operations more efficiently than using a plain array. We will look at some of these -- the elementary ones such as linked lists, stack, and queue, before moving on to heap, binary search trees, red-black trees, and hash maps.
We will begin this module with an example which highlights the essential underlying idea in this module which highlights the essential underlying idea in this module which highlights the essential underlying idea in this module which highlights the essential underlying idea in this module ... (Pun very much intended!)
Recursion is the swiss army knife of computer science (and not so coincidentally, mathematics as well). It is the heart of algorithm design techniques such as divide and conquer, dynamic programming and greedy algorithms. We have already used recursion previously, but without calling it out explicitly. In this module, we will recur into (pun intended) few of them again.
The hammer that nails-in several stubborn real world problems, Dynamic Programming is both revered and feared. One needs exposure to several DP problems to get a handle on the general principle behind this powerful method, and that is exactly what we will do in this module.
A special case of DP is the easier to understand Greedy Algorithm method. Though, it is simple it is applicable only when the given problem satisfies some conditions. In this module, we will learn these conditions and look at a few problems.
The remaining chapters deal with Graph Algorithms, and we will motivate it with a toy example. From powering the internet to spreading misinformation in social networks, Graph Algorithms have a wide range of applications. We will look at a few graph algorithms and we'll also have a chance to apply what we learned so far.
In this chapter we will learn what graphs are, and how to implement them on a computer, followed by some elementary graph algorithms -- the breadth-first and depth-first search.
Your country is at war, and several of your battalions are spread out on multiple fronts. You are tasked with establishing supply lines to replenish resources to your troops on all fronts, while minimizing cost. What do you do? We will study MSTs and two associated algorithms for solving it.
Internet routing is a classical example of the shortest path problem. In this module we will learn about the shortest path problem, and two algorithms for solving it.