
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Learn how data structures and algorithms boost code efficiency and performance, improve problem solving, enable scalable applications, and boost career advancement in technical interviews and coding assessments.
Data structures organize data for efficient operations, using integers, floats, characters, and strings as building blocks, and split into linear structures (arrays, lists, stacks, queues) and non-linear (trees, graphs, heaps).
Explore what algorithms are as step-by-step instructions to process data, and learn key types like searching, sorting, graph, and tree algorithms essential for coding interviews.
Master big O notation to assess algorithm efficiency by measuring time and space growth with input size, from constant to quadratic complexities.
Explore linear complexity and big O of n, showing how time and space scale with input size in arrays and for-each operations.
Explore constant time and space, where algorithms run in big O of one regardless of input size, illustrated by printing array size and tracking no extra memory.
Understand quadratic complexity, where time grows with the square of input size, illustrated by nested loops with n^2 iterations and comparisons to linear or logarithmic options.
Explore logarithmic complexity and O(log n) through a binary search in a sorted array, where the search range halves each step until the target is found.
Understand constants in time and space complexity and why two n reduce to n, with non-nested loops and two arrays yielding O(n).
Analyze dominant and non dominant factors in big o calculations for time and space by examining a Python function with nested loops, showing how O(n^2 + n) simplifies to O(n^2).
Compare the big O complexities, including constant, logarithmic, linear, and quadratic, and show how input size affects time and space, with O(1) most efficient and O(n^2) least.
Explore linked lists where each node stores data and a next pointer, with head and tail guiding traversal, last node points to null, and nodes are non-contiguously stored.
Define a Python node class with a value and a next pointer initialized to none, then a linked list class that starts empty with head and tail pointing to none.
Explore how to insert new elements into a linked list, whether at the beginning, middle, or end, and how head and tail pointers update while handling an empty list.
Implement append to add a new node at end of a linked list, update the tail, and handle the empty list by setting head and tail to the new node.
Implement the prepend operation in a linked list by creating a new node, linking it to the head, and updating the head; handle empty lists by updating the tail.
Master iterating a linked list by initializing an iterator at the head, moving to the next node, and printing each value until reaching the last node.
Implement linked list iteration in Python by starting at the head with an iterator, looping until null, printing each node’s value and moving to the next.
Remove elements from a linked list by handling the first, last, middle, and single-element cases. Update head and tail, adjust pointers, and iterate to reach the prior node.
Implement the remove function in the linked list to search for and delete a node, handling empty lists, head removal, and tail updates during traversal.
Learn how linked list operations vary in time, with prepend, delete first, and append taking constant time, while traversing, searching, inserting after, and removing non-first nodes take linear time.
Explore when to use linked lists for constant time insertions or deletions, dynamic sizing, and efficient middle insertions, especially compared to arrays.
Apply a linked list to manage a shopping cart by adding and removing items and displaying the cart contents, using append, remove, and iterate operations in Python.
Solve the LeetCode reverse linked list challenge by iterating with prev, current, and next pointers to reverse each node and return the new head, achieving linear time and constant space.
Learn to find the middle node of a singly linked list using fast and slow pointers; handle odd and even lengths and analyze O(n) time and O(1) space.
Explore doubly linked lists where each node stores next and prev references. Traverse forward and backward from the head to the tail.
Define constructors for the node and doubly linked list classes, initializing node data and none prev/next pointers, and setting the list head and tail to none for an empty list.
Implement the append function for a doubly linked list by creating a new node, setting head and tail when empty, and updating tail when the list is not empty.
Implement the prepend function in the doubly linked list to add a new node at the beginning, updating head and tail when the list is empty.
Demonstrate printing all nodes in a doubly linked list by initializing an iterator at the head, printing each node's data, and moving to the next until the end.
Explore the stack data structure and the LIFO principle, with push and pull operations demonstrated using a plate stack and a text editor undo example.
Implement the stack class constructor and a node class to hold each node's value and a next pointer, with a top pointer initialized to none.
Implement the push method in the stack class by creating a new node, linking its next to the current top, and updating the top reference, achieving constant time complexity.
Implement the Smt and pop methods for a stack, with isEmpty checking the top. Perform constant-time pop by copying the top value, moving the top pointer, and returning the copy.
Learn to use Python's built-in list as a stack by appending items, checking length with len, and popping the top element to reveal three, then remaining one and two.
Explore a text editor use case using a stack to implement undo by pushing the lengths of inserted texts and popping to delete the last text from the content.
Solve the LeetCode valid parentheses problem using a stack: push opening brackets, pop on closing brackets, and ensure the stack is empty at the end, with O(n) time and space.
Explore the queue data structure, a first in, first out concept. See how enqueue adds to the back and dequeue removes from the front, illustrating the FIFO principle.
Implement the Python queue constructor by creating a node class, initializing value and next to none, and setting front, back, and size for enqueue and dequeue operations.
Implement the isEmpty function in the queue class by checking a size counter initialized to zero; return true if size is zero, otherwise false. Enqueue and dequeue update size later.
Implement the enqueue operation by creating a new node, attaching it to the back of the queue, updating front and back when empty, and incrementing size for O(1) performance.
Implement the dequeue operation for a queue by removing the front element, updating the front pointer, and adjusting size; handle empty queues and single-element cases, and ensure constant time complexity.
Explore how a queue manages print jobs by enqueuing documents and printing them in fifo order, illustrating enqueue and a simple print service workflow.
Welcome to the Data Structures and Algorithms in Python Course!
Are you a Python programmer who wants to write efficient code and improve your programming and problem solving skills ?
Do you have an upcoming coding interview and you want to ace it with confidence ?
If the answer is yes, then this course is the right choice for you!
In this course you will learn everything about Data Structures and Algorithms and how to implement and use them in Python.
The concepts are explained with animations which makes it much more easier to understand and memorize.
You will also apply your knowledge throughout the course via coding exercises and Leetcode coding challenges with video solutions.
The course covers the following topics:
General
Why Should You Learn Data Structures and Algorithms ?
What are Data Structures ?
What are Algorithms ?
Big O Notation
Linear Complexity - O(n)
Constant Complexity - O(1)
Quadratic Complexity - O(n^2)
Logarithmic Complexity - O(logn)
Constants in Big O
Dominant and Non-Dominant Factors in Big O
Complexities Comparison
Data Structures
Linked Lists
Doubly Linked Lists
Stacks
Queues
Sets
Trees
Tries
Heaps
Hash Tables
Graphs
Algorithms
Linear Search
Binary Search
Bubble Sort
Insertion Sort
Selection Sort
Merge Sort
Recursion
Tree Traversal
Graph Traversal
I'm confident that you will enjoy this course, but if you for some reason are not happy with the course it's backed by Udemy's 30 day money back guarantee, so nothing to lose :)
I'm excited to see you in the course, hit that enroll button and start your mastering Data Structures & Algorithms journey :)