Loading lesson path
Python
Learn the core DSA patterns using Python implementations and examples.
DSA with Python
Python Lists and Arrays
A stack is a linear data structure that follows the Last-In-First-Out (LIFO) principle. Think of it like a stack of pancakes - you can only add or remove pancakes from the top. Stacks A stack is a da…
A queue is a linear data structure that follows the First-In-First-Out (FIFO) principle. Queues Think of a queue as people standing in line in a supermarket. The first person to stand in line is also…
Linked Lists with Python
Hash Table A Hash Table is a data structure designed to be fast to work with. The reason Hash Tables are sometimes preferred instead of arrays or linked lists is because searching for, adding, and de…
Python Trees
A tree is a hierarchical data structure consisting of nodes connected by edges. Each node contains a value and references to its child nodes. Binary Trees A Binary Tree is a type of tree data structu…
A Binary Search Tree is a Binary Tree where every node's left child has a lower value, and every node's right child has a higher value. A clear advantage with Binary Search Trees is that operations l…
The AVL Tree is a type of Binary Search Tree named after two Soviet inventors Georgy A delson- V elsky and Evgenii L andis who invented the AVL Tree in 1962. AVL trees are self-balancing, which means…
Python Graphs
Linear Search Linear search (or sequential search) is the simplest search algorithm. It checks each element one by one. Run the simulation above to see how the Linear Search algorithm works. This alg…
Binary Search The Binary Search algorithm searches through a sorted array and returns the index of the value it searches for. Run the simulation to see how the Binary Search algorithm works. Binary S…
Bubble Sort Bubble Sort is an algorithm that sorts an array from the lowest value to the highest value. Run the simulation to see how it looks like when the Bubble Sort algorithm sorts an array of va…
Selection Sort The Selection Sort algorithm finds the lowest value in an array and moves it to the front of the array. The algorithm looks through the array again and again, moving the next lowest va…
Insertion Sort The Insertion Sort algorithm uses one part of the array to hold the sorted values, and the other part of the array to hold values that are not sorted yet. The algorithm takes one value…
DSA Quicksort with Python
Counting Sort The Counting Sort algorithm sorts an array by counting the number of times each value occurs. Run the simulation to see how 17 integer values from 1 till 5 are sorted using Counting Sor…
Radix Sort The Radix Sort algorithm sorts an array by individual digits, starting with the least significant digit (the rightmost one). Click the button to do Radix Sort, one step (digit) at a time.…
Merge Sort The Merge Sort algorithm is a divide-and-conquer algorithm that sorts an array by first breaking it down into smaller arrays, and then building the array back together the correct way so t…