When you enroll in this course, you'll also be enrolled in this Specialization.
Learn new concepts from industry experts
Gain a foundational understanding of a subject or tool
Develop job-relevant skills with hands-on projects
Earn a shareable career certificate
There are 6 modules in this course
This online course covers basic algorithmic techniques and ideas for computational problems arising frequently in practical applications: sorting and searching, divide and conquer, greedy algorithms, dynamic programming. We will learn a lot of theory: how to sort data and how it helps for searching; how to break a large problem into pieces and solve them recursively; when it makes sense to proceed greedily; how dynamic programming is used in genomic studies. You will practice solving computational problems, designing new algorithms, and implementing solutions efficiently (so that they run in less than a second).
Welcome to the first module of Data Structures and Algorithms! Here we will provide an overview of where algorithms and data structures are used (hint: everywhere) and walk you through a few sample programming challenges. The programming challenges represent an important (and often the most difficult!) part of this specialization because the only way to fully understand an algorithm is to implement it. Writing correct and efficient programs is hard; please don’t be surprised if they don’t work as you planned—our first programs did not work either! We will help you on your journey through the specialization by showing how to implement your first programming challenges. We will also introduce testing techniques that will help increase your chances of passing assignments on your first attempt. In case your program does not work as intended, we will show how to fix it, even if you don’t yet know which test your implementation is failing on.
Solving the Sum of Two Digits Programming Challenge (screencast)•7 minutes
Solving the Maximum Pairwise Product Programming Challenge: Improving the Naive Solution, Testing, Debugging•14 minutes
Stress Test - Implementation•8 minutes
Stress Test - Find the Test and Debug•8 minutes
Stress Test - More Testing, Submit and Pass!•9 minutes
8 readings•Total 63 minutes
Ace Your Next Coding Interview•10 minutes
What background knowledge is necessary?•10 minutes
Social Networks and Microlearning•1 minute
Optional Videos and Screencasts•10 minutes
Alternative testing guide in Python•10 minutes
Maximum Pairwise Product Programming Challenge•10 minutes
Using PyCharm to solve programming challenges•10 minutes
Acknowledgements•2 minutes
1 assignment•Total 20 minutes
Solving Programming Challenges•20 minutes
2 programming assignments•Total 180 minutes
Programming Assignment 1: Sum of Two Digits•60 minutes
Programming Assignment 1: Maximum Pairwise Product•120 minutes
Algorithmic Warm-up
Module 2•6 hours to complete
Module details
In this module you will learn that programs based on efficient algorithms can solve the same problem billions of times faster than programs based on naïve algorithms. You will learn how to estimate the running time and memory of an algorithm without even implementing it. Armed with this knowledge, you will be able to compare various algorithms, select the most efficient ones, and finally implement them as our programming challenges!
In this module you will learn about seemingly naïve yet powerful class of algorithms called greedy algorithms. After you will learn the key idea behind the greedy algorithms, you may feel that they represent the algorithmic Swiss army knife that can be applied to solve nearly all programming challenges in this course. But be warned: with a few exceptions that we will cover, this intuitive idea rarely works in practice! For this reason, it is important to prove that a greedy algorithm always produces an optimal solution before using this algorithm. In the end of this module, we will test your intuition and taste for greedy algorithms by offering several programming challenges.
In this module you will learn about a powerful algorithmic technique called Divide and Conquer. Based on this technique, you will see how to search huge databases millions of times faster than using naïve linear search. You will even learn that the standard way to multiply numbers (that you learned in the grade school) is far from the being the fastest! We will then apply the divide-and-conquer technique to design two efficient algorithms (merge sort and quick sort) for sorting huge lists, a problem that finds many applications in practice. Finally, we will show that these two algorithms are optimal, that is, no algorithm can sort faster!
Lower Bound for Comparison Based Sorting•12 minutes
Non-Comparison Based Sorting Algorithms•8 minutes
Overview•2 minutes
Algorithm•9 minutes
Random Pivot•13 minutes
Running Time Analysis (optional)•16 minutes
Equal Elements•7 minutes
Final Remarks•8 minutes
5 readings•Total 40 minutes
Resources•10 minutes
Resources•5 minutes
Resources•10 minutes
Resources•5 minutes
Resources•10 minutes
8 assignments•Total 155 minutes
Linear Search and Binary Search•10 minutes
Puzzle: 21 questions game•30 minutes
Puzzle: Two Adjacent Cells of Opposite Colors•30 minutes
Polynomial Multiplication•15 minutes
Master Theorem•10 minutes
Sorting•15 minutes
Quick Sort•15 minutes
Puzzle: Local Maximum•30 minutes
1 programming assignment•Total 180 minutes
Programming Assignment 4: Divide and Conquer•180 minutes
Dynamic Programming 1
Module 5•8 hours to complete
Module details
In this final module of the course you will learn about the powerful algorithmic technique for solving many optimization problems called Dynamic Programming. It turned out that dynamic programming can solve many problems that evade all attempts to solve them using greedy or divide-and-conquer strategy. There are countless applications of dynamic programming in practice: from maximizing the advertisement revenue of a TV station, to search for similar Internet pages, to gene finding (the problem where biologists need to find the minimum number of mutations to transform one gene into another). You will learn how the same idea helps to automatically make spelling corrections and to show the differences between two versions of the same text.
UC San Diego is an academic powerhouse and economic engine, recognized as one of the top 10 public universities by U.S. News and World Report. Innovation is central to who we are and what we do. Here, students learn that knowledge isn't just acquired in the classroom—life is their laboratory.
"To be able to take courses at my own pace and rhythm has been an amazing experience. I can learn whenever it fits my schedule and mood."
Jennifer J.
Learner since 2020
"I directly applied the concepts and skills I learned from my courses to an exciting new project at work."
Larry W.
Learner since 2021
"When I need courses on topics that my university doesn't offer, Coursera is one of the best places to go."
Chaitanya A.
"Learning isn't just about being better at your job: it's so much more than that. Coursera allows me to learn without limits."
Learner reviews
4.6
12,576 reviews
5 stars
71.85%
4 stars
21.41%
3 stars
4.19%
2 stars
1.05%
1 star
1.47%
Showing 3 of 12576
V
VN
5·
Reviewed on Jan 25, 2025
This is a difficult course and will make you want to drop out. But keep pushing, take help from forums and resources and i am sure at the end you will feel lot more confident.
Enjoy the grind!
A
AF
4·
Reviewed on May 16, 2020
Great course for stepping into algorithms. But some portions have bad lectures like for example explaining the theoritical reasoning for finding safe move in week 3 greedy algorithm is very poor.
G
GS
5·
Reviewed on Oct 31, 2020
Very good course, all the problems are well designed to test your critical thinking skills and there's pretty good and detailed conceptual stuff but not more than needed to make you nearly a pro.
When will I have access to the lectures and assignments?
To access the course materials, assignments and to earn a Certificate, you will need to purchase the Certificate experience when you enroll in a course. You can try a Free Trial instead, or apply for Financial Aid. The course may offer 'Full Course, No Certificate' instead. This option lets you see all course materials, submit required assessments, and get a final grade. This also means that you will not be able to purchase a Certificate experience.
What will I get if I subscribe to this Specialization?
When you enroll in the course, you get access to all of the courses in the Specialization, and you earn a certificate when you complete the work. Your electronic Certificate will be added to your Accomplishments page - from there, you can print your Certificate or add it to your LinkedIn profile.
Is financial aid available?
Yes. In select learning programs, you can apply for financial aid or a scholarship if you can’t afford the enrollment fee. If fin aid or scholarship is available for your learning program selection, you’ll find a link to apply on the description page.