Topic hub
Learn AI & Data Science
You don't need a computer-science degree to understand AI — you need clear explanations that start where you are. This hub demystifies Artificial Intelligence, Machine Learning and Data Science one idea at a time, from "what is AI" through algorithms, neural networks, deep learning and large language models. Start with the learning path, or jump to whatever concept you're stuck on.
Start here
Start here — free mini-course
Data Structures & Algorithms: The Complete Course
A free, book-quality DSA course — Big-O, arrays, linked lists, trees, graphs, sorting, dynamic programming and more, with complexity tables, pseudocode and worked examples for every topic.
30 of 30 lessons available now — new lessons weekly.
Guides in this hub
Coding Interview Strategy: A Framework for Solving Problems Under Pressure
Knowing algorithms isn't enough — you have to deploy them under pressure. Here's a repeatable framework for solving unseen problems and a study plan that builds durable skill.
P vs NP and Complexity Classes: What 'Hard' Really Means (Intuition, No Proofs)
Why do some problems have fast algorithms and others resist every attempt? P vs NP is the deepest open question in computer science — here's the intuition, minus the proofs.
Union-Find (Disjoint Set Union): Near-Constant Connectivity with Two Optimizations
Union-Find answers 'are these two things connected?' and 'connect them' in almost O(1) — thanks to two beautifully simple optimizations that make the trees nearly flat.
Bit Manipulation: The Operators, the Tricks, and When Bits Beat Data Structures
Bitwise operators let you pack, flag, and compute at the level of individual bits — often replacing a whole data structure with a single integer and an O(1) operation.
Backtracking: Systematic Search with Pruning (Permutations, N-Queens, Sudoku)
Backtracking explores all possibilities like brute force, but abandons a path the instant it can't lead to a solution. That pruning is what makes searching enormous spaces feasible.
Dynamic Programming: Foundations, Patterns, and How to Recognize a DP Problem
Dynamic programming is just recursion that stops repeating itself. Master the two conditions, the two implementations, and the handful of patterns, and the scary reputation disappears.
Greedy Algorithms: When Local Choices Are Globally Optimal (and When They Aren't)
Greedy algorithms make the choice that looks best right now and never look back. Sometimes that's provably optimal (scheduling, Huffman, MST); sometimes it's disastrously wrong. Knowing which is the skill.
Divide and Conquer: The Paradigm Behind Merge Sort, Binary Search, and Fast Multiplication
Split the problem, solve the pieces, combine the results. Divide and conquer is behind merge sort, binary search, and fast multiplication — and the Master Theorem tells you the cost at a glance.
Two Pointers & Sliding Window: Turning O(n²) Scans into O(n)
Two pointers and the sliding window solve an enormous share of array and string problems in O(n). Here's how they work, why they're linear, and how to spot which one a problem wants.
Binary Search Patterns: The Template, Boundaries, and 'Search on the Answer'
Binary search is trivial to describe and famously hard to get right. Here's a bug-resistant template, the boundary variants, and the 'search on the answer' trick that turns optimization into search.
Sorting II: Counting Sort, Radix Sort, and Bucket Sort — Beating O(n log n)
The O(n log n) barrier only binds sorts that compare elements. Counting, radix, and bucket sort don't compare — they use the values themselves — and can sort in linear time.
Sorting I: Merge Sort, Quicksort, and Heapsort — The O(n log n) Algorithms
Sorting is the most-studied problem in computing. Here are the three O(n log n) heavyweights — merge sort, quicksort, heapsort — and the trade-offs (stability, space, worst case) that decide between them.
Minimum Spanning Trees: Kruskal's and Prim's Algorithms Explained
Connect every vertex at the lowest total cost with no redundant links: the minimum spanning tree. Two greedy algorithms solve it — Kruskal's from the edges out, Prim's from a vertex out.
Shortest Paths: Dijkstra's Algorithm and Bellman-Ford Explained
When edges have weights, BFS isn't enough. Dijkstra greedily grows a shortest-path tree with a priority queue; Bellman-Ford relaxes every edge repeatedly and even handles negative weights.
Graph Traversal: BFS and DFS Explained (Shortest Paths, Cycles, Topological Sort)
Two traversals underlie almost every graph algorithm. Swap a queue for a stack and BFS becomes DFS — but that one swap changes what each is good for entirely.
Graphs & Their Representations: Adjacency List vs Matrix, and the Vocabulary You Need
Trees were a special case; graphs are the general one. Here's the vocabulary, the two ways to store a graph, and the trade-off that decides which to pick.
Tries (Prefix Trees): Autocomplete, Prefix Search, and When the Path Is the Key
A trie stores keys not in nodes but along the path to them — which makes prefix queries and autocomplete trivial and lookup speed independent of how many words you've stored.
Heaps & Priority Queues: The Array-Backed Tree Behind 'Always Get the Smallest'
Drop the full sorted order of a BST and keep only 'smallest on top', and the tree collapses into a plain array — the heap: O(1) peek, O(log n) insert and extract.
Balanced Trees: AVL & Red-Black Trees Explained by Intuition (Rotations, Not Rote)
Plain BSTs collapse to O(n) on sorted input. Self-balancing trees fix that with one elegant move — the rotation — applied under two different philosophies: AVL's strictness and red-black's pragmatism.
Binary Search Trees (BST): Search, Insert, Delete — and Why Order Changes Everything
One rule — smaller keys left, larger keys right — turns a binary tree into a searchable, sorted, dynamic structure. Here's every operation, including the deletion case everyone fumbles.
Trees & Binary Trees: Terminology, Traversals (In/Pre/Post/Level-Order), and Recursion
Hierarchy enters the course: tree anatomy, the four traversals every interview assumes you know cold, and why tree code is recursion's home turf.
Hashing & Hash Tables: How O(1) Lookup Really Works (Collisions, Load Factor, Resizing)
The most-used data structure in modern programming: how a hash function turns keys into array indices, what happens when two keys collide, and why 'O(1)' comes with fine print.
Recursion & the Call Stack: How It Really Works, Base Cases, and Complexity
Recursion stops being magic the moment you see the call stack doing the bookkeeping. Frames, base cases, recursion trees, and the complexity rules — all here.
Queues & Deques Explained: FIFO, Circular Buffers, and Sliding-Window Maximum
First In, First Out: how queues actually get O(1) at both ends (the circular-buffer trick), what deques add, and the monotonic deque behind sliding-window maximum.
Stacks Explained: LIFO, Operations, and the Problems Stacks Solve
Push, pop, peek — three O(1) operations that solve an outsized share of problems: matching brackets, undo systems, expression evaluation, and the monotonic stack pattern.
Linked Lists Explained: Singly, Doubly & Circular — Operations, Complexity, Patterns
Nodes, pointers, and no contiguous memory: how linked lists work, why insertion is O(1) but access is O(n), and the pointer patterns every interviewer asks about.
Strings & String Algorithms: Immutability, Building, Searching, and Classic Patterns
Strings look simple and hide more interview traps than any other basic type. Immutability, O(n²) concatenation, substring search, anagrams — all covered here.
Arrays & Dynamic Arrays: How They Work, Complexity, and When to Use Them
Arrays are the structure every other structure is built on. Here's how they live in memory, why indexing is instant, and how dynamic arrays pull off O(1) append.
How to Think About Data Structures & Algorithms (A Beginner's Mental Model)
DSA isn't memorization — it's a small set of trade-offs you learn to recognize. Here's the mental model that makes everything after this lesson easier.
Big-O Notation Explained: Time & Space Complexity from Scratch
O(n), O(log n), O(n²) — here's what the notation actually means, how to derive it for any piece of code, and the traps (amortized cost, hidden loops) that catch beginners.
Confusion Matrix Explained: TP, FP, FN, TN — and the Metrics They Build
Every classification metric you've heard of — accuracy, precision, recall, F1 — is built from the same four numbers. Here's how to read them.
Precision vs Recall: What They Mean and When to Optimize Which
Two metrics, two different kinds of failure. The right one to optimize depends on which mistake costs you more.
Cross-Validation Explained: How K-Fold Works and Why It Beats a Single Split
One random test split can flatter or sabotage a model by pure luck. K-fold cross-validation replaces that lottery with an honest average.
Gradient Descent Explained Simply: How Machines Actually Learn
Nearly every neural network ever trained learned the same way: measure the error, feel the slope, step downhill, repeat.
The Bias–Variance Tradeoff, Explained With Intuition (Not Just Formulas)
Bias is being systematically wrong; variance is being erratically wrong. Every model sits somewhere on the line between the two.
Overfitting vs Underfitting: How to Spot Each and How to Fix It
One model memorizes, the other never learns. Both fail on new data — for opposite reasons, with opposite fixes.
L1 vs L2 Regularization: Sparsity, Shrinkage, and When to Use Each
Both penalties tame overfitting by punishing large weights — but one deletes features outright while the other shrinks them all a little.
Bagging vs Boosting: How the Two Big Ensemble Ideas Actually Differ
Both combine many weak models into one strong one — but with opposite strategies aimed at opposite problems.
Feature Scaling and Normalization: When You Need It and How to Do It Right
A salary column in the tens of thousands will silently steamroll an age column in the tens — unless you put them on a common scale.
Embeddings Explained: How Meaning Becomes a List of Numbers
Embeddings turn words, images and users into coordinates — so that 'similar' becomes something a computer can measure with geometry.
Attention and Transformers, Explained Intuitively
One mechanism — letting every word look at every other word and decide what's relevant — reshaped the entire field of AI.
Learning Rate Explained: The Most Important Hyperparameter in Deep Learning
One number decides whether your network converges beautifully, crawls forever, or explodes into NaN. Here's how to read it and set it.
How AI Works: The Magic Behind AI
AI takes input, thinks using patterns it learned, then gives an answer.
How AI Sees, Understands and Learns
AI takes in examples, finds patterns, and learns to get smarter over time.
Data is the Fuel, AI is the Engine
Data is the fuel and AI is the engine — good data means smart results.
Your Voice, AI's Response
From your words to a spoken answer — how a voice assistant replies, step by step.
Cars that Drive Themselves
Cameras and sensors act as a car's eyes so it can drive itself safely.
AI Translates Languages Instantly
AI translates languages on the spot so everyone can understand each other.
Sorting Apples & Oranges
AI spots patterns and sorts things into groups — like apples and oranges.
AI is Already in Your Everyday Life
AI is already part of everyday life — maps, music, photos and homework help.
AI: Your Study Buddy
Your AI study buddy explains, quizzes and helps you learn a little every day.
Smart Study Habits for Success
Plan, focus, take breaks and review — smart habits make learning easier.
Time Management: Plan Today, Achieve Tomorrow
Plan your day, do important things first, and reach your goals.
AI + STEM = Endless Possibilities
Mixing AI with Science, Tech, Engineering and Maths unlocks amazing ideas.
AI: Building a Better Future
AI is helping build a cleaner, healthier, smarter future for everyone.
AI is Helping to Save Our Planet
AI helps track weather, save energy, protect animals and fight pollution.
AI is Powerful, Ethics Makes It Right
AI is powerful — using it fairly, safely and kindly keeps it good.
What is an Algorithm?
An algorithm is a step-by-step recipe a computer follows to solve a problem.
AI vs Machine Learning
Machine Learning is a part of AI: machines that learn from data instead of being told every rule.
Learning with Labels
In supervised learning, AI learns from examples that already have the right answers.
Finding Hidden Patterns
In unsupervised learning, AI groups similar things without being told the answers.
Learning via Rewards
In reinforcement learning, AI learns by trying things and earning rewards.
Digital Brains
Neural networks are layers of tiny units that pass signals, inspired by the brain.
Deep Learning (DL) Explained
Deep learning uses many layers of neural networks to learn complex patterns.
How AI Creates Pictures
Generative AI starts with random noise and cleans it step by step into a clear picture.
Natural Language Processing (NLP)
NLP lets computers read, understand and write human language.
Transformers Explained
Transformers use 'attention' to focus on the most important words — the engine behind modern AI.
Large Language Models (LLMs)
LLMs are huge AI models trained on lots of text to understand and generate language.
AI Ethics and Responsibility
Powerful AI must be used responsibly — fairly, safely and honestly.
Browse the AI topic library
10,001 questions & answers and 8,407 quiz questions across 293 topics — free, offline-friendly and drawn from the AI Learning app. Search for a topic, or pick a category.
Type at least two letters to search.
Put it into practice with AI Learning
A private, offline app to learn Artificial Intelligence, Machine Learning & Data Science at your own level: ~10,000 Q&A, illustrated guides, cheat sheets, quizzes and mock tests.
- Free
- No account
- Works offline