Find a course
Age level: University students (18–25)IntermediateTechnology & Programming

Data Structures and Algorithms

Big O, arrays, hash tables, trees, graphs, sorting and dynamic programming with hands-on code

⏱ 2 h 40 min5 modules · 13 lessons70 practice questionsFinal exam: 20 questions
Included with this course

Your certificate for this course

Finish the 13 lessons (about 2 h 40 min) and pass the 20-question final exam. Your Certificate of Completion is ready the moment you pass.

  • Your name and this course titlePrinted in classic diploma typography
  • Grade: Pass, Merit or DistinctionOn the gold seal, with your final score
  • Unique ID and QR codeAnyone can verify it in seconds
  • Score report PDFModule-by-module results and exam score
  1. Lessons13 lessons
  2. Final exam20 questions · 70% to pass
  3. CertificatePDF + score report

What you will learn

  • Describe the running time and memory use of code with Big O notation and compare growth rates
  • Analyze loops, nested loops and recursive functions, including best, worst and amortized cases
  • Choose between arrays, linked lists, stacks, queues and hash tables based on the operations a problem needs
  • Implement and analyze binary search and explain why it requires sorted data
  • Compare insertion, selection, merge and quicksort by time, space and stability
  • Explain how binary search trees and heaps work and what keeps their operations fast
  • Represent graphs and use breadth-first and depth-first search to explore them
  • Recognize problems suited to dynamic programming or greedy algorithms and solve simple ones

About this course

Two programs can give the same correct answer and still differ by a factor of a million in speed. One searches a sorted list of a billion names in about 30 steps; the other might take a billion. The difference isn't faster hardware or a cleverer language. It's the choice of data structure and algorithm, and that choice is what this course teaches.

You'll start with the tools for reasoning about efficiency: counting operations, Big O notation, and analyzing loops and recursive functions. Then you'll work through the core data structures that appear in almost every program and technical interview: arrays and dynamic arrays, linked lists, stacks, queues and hash tables. For each one you'll learn how it's laid out, what each operation costs, and when to choose it.

Next come searching and sorting. You'll write binary search, compare insertion, selection and bubble sort, and see how merge sort and quicksort reach O(n log n). After that you'll build intuition for hierarchical and networked data with binary search trees, heaps and graphs, including breadth-first and depth-first search. The final lesson introduces dynamic programming and greedy algorithms, two strategies for problems that seem to need brute force.

The course is for students who can already write basic code with variables, loops, functions and arrays in any language, whether you're in a computer science program, preparing for coding interviews, or teaching yourself. Code challenges use JavaScript and run right in your browser; if you know Python or Java, the syntax will feel familiar. Each lesson combines short explanations with calculators, code exercises and quick checks, and you can earn a free certificate by passing the final exam.

Syllabus

  1. Analyzing Algorithms

    Count the work an algorithm does, describe its growth with Big O notation, and analyze loops and recursive functions.

    1. Algorithms, Data Structures and Efficiency12 min
    2. Big O Notation13 min
    3. Recursion and Recurrences13 min
  2. Arrays, Lists, Stacks, Queues and Hash Tables

    The workhorse data structures: how they're laid out in memory, what each operation costs and when to use which.

    1. Arrays and Linked Lists13 min
    2. Stacks and Queues12 min
    3. Hash Tables13 min
  3. Searching and Sorting

    Binary search, the simple quadratic sorts, and the divide-and-conquer sorts that reach O(n log n).

    1. Binary Search12 min
    2. Bubble, Selection and Insertion Sort13 min
    3. Merge Sort, Quicksort and the Limits of Sorting14 min
  4. Trees and Heaps

    Hierarchical structures that keep data ordered or prioritized: binary search trees, traversals, heaps and priority queues.

    1. Trees and Binary Search Trees14 min
    2. Heaps and Priority Queues13 min
  5. Graphs and Algorithm Design

    Model connections with graphs, explore them with BFS and DFS, and solve hard-looking problems with dynamic programming and greedy strategies.

    1. Graphs, BFS and DFS14 min
    2. Dynamic Programming and Greedy Algorithms15 min
  6. Final exam and certificate

    20 questions drawn from a pool of 39. Score 70% or more to pass; retakes get a fresh set of questions.

Try a sample question

Why do computer scientists usually describe algorithms by counting operations as a function of n rather than by timing them?

  1. Timing programs is impossible on modern computers
  2. Operation counts describe the algorithm itself, independent of hardware, language and other programs running
  3. Operation counts are always exactly equal to running time in milliseconds
  4. Only very slow algorithms can be timed
Show the answer

Answer: B. Operation counts describe the algorithm itself, independent of hardware, language and other programs running

Timings depend on the machine, language, compiler and background load, so they don't transfer between environments. Counting operations as a function of n captures how the algorithm itself scales. Timing is still useful for measuring real programs; it just doesn't describe the algorithm in general.

Algorithm
A finite, step-by-step procedure for solving a problem or performing a computation.
Data structure
A way of organizing data in memory so that certain operations are efficient.
Time complexity
How the number of operations an algorithm performs grows with input size.
Space complexity
How the extra memory an algorithm needs grows with input size.
Big O notation
Notation that gives an upper bound on growth rate, ignoring constant factors and lower-order terms, such as O(n) or O(n log n).
Logarithm (base 2)
The number of times you can halve a value before reaching 1; log₂ 1,024 = 10.

Frequently asked questions

Do I need to know a specific programming language?

No. The ideas are language-independent. Code exercises use JavaScript because it runs in the browser, but they stick to basic syntax such as loops, arrays, objects and functions, so anyone who has written Python, Java, C or similar code can follow them.

What is Big O notation in simple terms?

Big O describes how the work an algorithm does grows as the input gets larger, ignoring constant factors and small terms. O(n) means the work grows in proportion to the input size; O(n²) means doubling the input roughly quadruples the work; O(log n) means doubling the input adds only one more step.

Which data structures should I learn first?

Arrays, hash tables (dictionaries or maps), stacks and queues cover a large share of real programming and interview problems. After those, learn trees, heaps and graphs. This course follows that order.

Is this course enough to prepare for coding interviews?

It covers the core concepts most interviews test: complexity analysis, the main data structures, searching, sorting, trees, graph traversal and an introduction to dynamic programming. To be interview-ready you'll also need plenty of practice solving problems under time pressure on top of this foundation.

Why does sorting matter if every language has a built-in sort?

You'll usually use the built-in sort in real code. Studying sorting algorithms teaches you divide and conquer, recursion, stability and trade-offs between time and memory, and helps you know when sorting first makes a problem easier.

How much math do I need?

Basic algebra is enough. You'll use logarithms base 2, which simply answer the question of how many times you can halve a number before reaching 1. Every formula is explained with examples.

Sources and further reading

Related courses

University studentsBeginner

Introduction to Computer Science

Binary, hardware, algorithms, code and the internet: the ideas behind every computer

Technology & Programming
2 h 35 min12 lessonsCertificate
University studentsIntermediate

Object-Oriented Programming

Classes, encapsulation, inheritance, polymorphism and SOLID design

Technology & Programming
2 h 40 min12 lessonsCertificate
University studentsIntermediate

Operating Systems Concepts

Processes, threads, scheduling, memory, file systems and protection explained

Technology & Programming
2 h 50 min11 lessonsCertificate
University studentsBeginner

How Computers Work

From bits and logic gates to processors, memory and the operating system

Technology & Programming
2 h 25 min11 lessonsCertificate
TeensBeginner

Computer Science Principles

Data, algorithms, the internet and the impact of computing, the big ideas of CS

Technology & Programming
1 h 55 min11 lessonsCertificate
TeensBeginner

Binary and Number Systems

Count, convert and calculate in binary, hexadecimal and octal like a computer

Technology & Programming
1 h 50 min11 lessonsCertificate