
From Algorithms course, but the same perspective.
From the algorithms course. Some problems in this course maybe from LeetCode
From the algorithms course. Some problems in this course maybe from LeetCode
From my C++ course
Explore the capacity trick and root cause analysis to optimize array appends with size and capacity, doubling capacity for amortized linear performance.
Learn to implement python-like array operations with negative indexing, right rotations, and efficient pops. Explore 2d matrices with set/get, and apply a move-to-front index optimization.
Master python array operations through negative indexing, left and right rotations, and modulus optimization, then implement pop position, index transposition, and a dynamic 2d array.
Discover how to judge algorithm efficiency using asymptotic complexity. Focus on time and memory, large n, and dropping constants to identify O(n), O(n^2), and O(1).
Master practical techniques to determine time complexity by ignoring constants, analyzing for loops and nested blocks, and combining orders like O(1), O(n), O(n^2), O(nm) for polynomial time.
Demystify Big O notation by treating constants as upper-bounding factors, introduce n0, and compare O(n) and O(n^2) with practical examples of constants affecting run time.
Explore worst-case, best-case, average-case, and amortized analyses, O() upper bounds, and how these concepts apply to Python data structures like lists, sets, dicts, and hash tables.
Explore memory complexity by estimating the maximum memory used at any moment. Compare constant, linear, and quadratic memory and consider recursion's auxiliary space on the stack.
Explore how linked lists solve dynamic memory challenges by using nodes connected via next pointers. Learn to create and traverse nodes, understand null, and inspect memory addresses (ids) during debugging.
Learn to print a linked list by iterating from head to tail, printing node data, and implement a recursive version plus a find function to locate a node by value.
Learn to build a singly linked list with head and tail, implement insert_end in O(1), handle empty vs non-empty cases, and print and iterate the list safely.
Learn to traverse linked lists and implement core operations: get the nth node with 1-based indexing, return None if not found, and perform a 0-based index search with swapping.
Build a debugging framework for linked lists by sketching test cases (zero, one, two, even or odd sizes) and applying unit testing, then write modular code to prevent runtime errors.
Learn how to maintain data integrity in a linked list by managing head, tail, and length, then implement a verification helper and tests to catch errors with debugging best practices.
Master singly linked lists through homework one by implementing insert_front and delete_front, getting the nth node from back, and verifying identity with list comparison, while testing without a length field.
Explore solutions for a singly linked list homework: insert front, delete front, get nth from back, and list comparison, emphasizing head and tail and edge cases.
Master linked list deletion in Python by removing the front, last, or nth node, or a node with a specific value, using get_nth and ADT concepts, with edge-case handling.
Clarify physical data structures as block or scattered memory in arrays and lists, and logical data structures like queues, noting O(1) array access and O(n) linked-list access.
Learn to delete an element with a specific key in a linked list by iterating with previous and current, handling head and tail, and using a delete_next_node helper.
Reverse every pair of consecutive values in a linked list by swapping them. Reverse the nodes themselves using previous and current pointers, updating the head and tail as needed.
Delete every even position in a linked list using previous and current pointers with delete_next_node, then insert values into a sorted list via insertion sort and embed_after.
Execute SLL homework tasks: swap head and tail by addresses, rotate left by k, remove duplicates, delete last key occurrence, and move key-matching nodes to the end using nodes only.
swap the head and tail in a singly linked list, handle edge cases, and perform left rotation by n with cycle creation and breaking, using k %= length.
Solve linked list challenges in python: reorder odd and even nodes. Perform zig-zag insertions, add numbers from lists, remove duplicates, and apply k-group reversals.
Learn how to rearrange a linked list by splitting into odd and even positions, then merge by linking the last odd to the first even, handling odd and even lengths.
Add two numbers represented by linked lists by iterating through both lists, using modulus and division to obtain digits and carry, and appending new nodes as needed.
Remove duplicates from a linked list by traversing with previous and current, either keeping the first occurrence or removing all duplicates, using the dummy node trick and achieving O(1) memory.
Solve the last problem by reversing a linked list in groups of size k in Python, extending the standard reverse with an inner helper returning head, tail, and next head.
Explore how a doubly linked list adds a previous pointer to the singly linked list, enabling bidirectional navigation and O(1) backward access, with head, tail, length, and memory trade-offs.
Delete operations in a doubly-linked list enable end deletions in O(1) by updating head and tail. Learn delete_next_node, delete_link_node, and delete_node_with_key.
Use a dummy node and delete_link to remove all nodes with a key in a linked list, then delete even or odd positions, and optionally check palindrome with length.
Master five linked-list problems in Python: find the middle node with single pass, implement doubly and singly variants, swap kth nodes by address, reverse, and merge sorted lists in O(n+m).
Reverse a doubly linked list by moving left to right, swapping two nodes, using copies of the next two nodes to guide linking, and swapping the head and tail.
Merge two sorted linked lists as in merge sort by repeatedly selecting the smaller head from each list. Append the remaining nodes to complete the merge.
Implement a sparse array in Python using index and data nodes and a dummy head; use get_node for on-demand creation, then add two linked lists and note quadratic time complexity.
Learn how to implement a sparse matrix as a linked-list of row lists, storing only nonzero values, with zero-based indices, printable as a 2d array, and supporting addition.
From the C++ course. Minor changes maybe for Python
Implement an array-based stack in Python by treating the end of a list as the top, enabling push, pop, and peek with O(1) operations, and discuss simple size checks.
Solve reversing an integer with a stack using mod and division, then validate parentheses with a stack and a dictionary mapping closings to openings.
Use a stack to compute nested parentheses scores by pairing each closed expression with its parent, yielding 1 for empty and doubling for inner values.
Master the daily temperatures problem by applying reverse thinking with a stack. Use a simplification technique to match past days and compute days to wait in linear time.
Learn to implement a stack using a linked list, with push, pop, peek, and empty checks, and compare it to array-based stacks while noting the head as the top.
Explore infix, postfix, and prefix notation, clarify precedence and associativity, and learn how postfix evaluation with a stack simplifies computing expressions.
Learn to convert infix expressions to postfix with parentheses using a stack, handle sub-problems, precedence, associativity, and token parsing.
Tackle three data-structures challenges in Python: a stack that deletes the middle in O(1), infix-to-prefix conversion via reversal and parentheses handling, and removing brackets from single-digit plus and minus expressions.
Explore the queue data structure and its FIFO ordering, with enqueue at the rear and dequeue from the front, cover is empty and is full checks, and preview circle queue.
Explore implementing a circular queue with a circular array, using front, rear, and the added elements variable to distinguish empty from full, enabling simple enqueue and dequeue.
Master circular queue coding in Python with a fixed-size array, front and rear indices, and added_elements to manage empty and full states, plus enqueue, dequeue, and display operations.
Implement the dequeue in a double-ended queue with enqueue at the front and dequeue at the rear, preserving O(1) operations and illustrating a stack built from a linked list queue.
Implement a queue using two internal stacks to keep dequeue at O(1), and design a priority queue with priorities 1–3 using a linked list, ensuring O(1) enqueue and dequeue.
Learn to implement a queue with two stacks achieving amortized O(1) enqueue, remove the added_elements indicator in a circular queue, and build a LastKNumberSumStream with O(k) memory.
Explore nonlinear data structures with trees, from root and leaves to height, depth, and subtrees, and compare binary trees, tries, and AVL trees, with linked lists as special cases.
Implement and verify post-order traversal for binary trees in Python using recursion, printing left subtree, right subtree, and the node, while tracing the what of expressions rather than the how.
Explore detailed recursive tracing of binary tree traversals, including in-order, pre-order, and post-order, with left and right subtree printing and visual techniques.
Discover binary tree types including full binary trees, internal and leaf nodes, perfect and complete trees, degenerate and balanced trees, and the k-ary generalization, with height-focused formulas.
Explore how perfect binary trees yield node counts of 2^levels minus 1 and how height derives from n using log2(n+1) minus 1, plus balanced trees and Catalan numbers.
Create and enrich a binary tree class with a root, provide an inorder print method, and build the tree by adding path based node sequences using value and direction lists.
Master binary tree problems in python with practical tasks like tree_max, maxDepth, and summing left leaves. Also explore cousins, perfect trees, and recursive versus formula-based solutions.
Explore solving tree problems in Python, including tree maximum, maximum depth, sum of left leaves, and cousins, using recursion and divide-and-conquer; compare recursive height with a formula for perfect trees.
Describe printing a binary tree's left boundary by recursively following the left child, discarding non-boundary right nodes, and promoting right children when left is absent to form the boundary chain.
Explore the diameter of a binary tree by analyzing whether the longest path passes through a node or resides in a subtree, using height calculations to update a global diameter.
Use collections.deque to implement level order traversal and process by level using the queue size. Compare time and memory: O(n) time, O(n) memory in worst case.
Practice recursive level order traversal and analyze time complexity, implement zigzag traversal with even levels reversed without reversing, and determine binary tree completeness by enforcing left-before-right node ordering.
Determine whether a binary tree is complete using a level-order traversal rule: after a missing node, no further nodes may appear, with a simple left-before-right check.
Master the art of analyzing binary trees by checking symmetry with recursive and parenthesizing approaches, performing full-subtree flips to transform structures, and identifying and printing duplicate subtrees.
Understand how the binary search tree uses left values smaller and right values larger, producing a sorted inorder traversal and efficient search, especially when the tree is balanced.
Insert values into a binary search tree using a recursive insert function, guiding traversal left or right until the proper spot is found, ignoring equal values.
Transform binary search tree homework by implementing an iterative search with a while loop and validate BSTs through inorder sorting and a recursive min-max range approach.
Find the kth smallest element in a binary search tree using a selective inorder traversal that stops early. Decrement k as you visit nodes and return when k equals 1.
Explore how in-order traversal defines the BST successor, using the right-subtree minimum or climbing via ancestors to locate the next node, with or without a parent pointer.
Explore implementing the BST successor using an ancestors path and handling root, right subtree, and edge cases. Identify the maximum and predecessor, and emphasize testing with scenarios before coding.
Mastering skills in data structures using Python shows how to add a parent to a data structure, initialize and link nodes during insertion, and use parent pointers to find successors.
Learn how to delete a node from a binary search tree, handling leaf, single-child, and two-children cases, using successor or predecessor replacement and maintaining binary search tree properties.
Master BST deletion in Python by implementing search, handling leaf and single-child cases, and deleting two-child nodes via right-subtree minimum replacement and re-linking.
Address binary search tree homework in Python by using the predecessor inside the successor, and convert the successor deletion from recursion to iteration while analyzing successor node states.
Master the bst homework by using the predecessor (maximum from the left) to replace and delete in a two-child case, avoiding recursion with an iterative approach.
Almost all other courses focus on knowledge. In this course, we focus on gaining real skills.
Overall:
The course covers basic to advanced data structures
Learn the inner details of the data structures and their time & memory complexity analysis
Learn how to code line-by-line
Source code and Slides and provided for all content
An extensive amount of practice to master the taught data structures (where most other content fails!)
Content:
Asymptotic Complexity
Arrays
Singly Linked List
Doubly Linked List
Project: Sparse Array and Matrix
Stack
Queue
Binary Tree
Binary Search Tree
Binary Heap
AVL Tree
Letter Tree (Trie)
Hash Table
Extensive Homework sets with video solutions
Teaching Style:
Instead of long theory then coding style, we follow a unique style
I parallelize the concepts with the codes as much as possible
Go Concrete as possible
Use Clear Visualization
By the end of the journey
Solid understanding of Data Structures topics in Python
Mastering different skills
Analytical and Problem-Solving skills
Clean coding for data structures
Black-box applying on DS
With the administered problem-solving skills
You can start competitive programming smoothly [DS type]
Smooth start in Algorithms course
One more step toward interviews preparation
Prerequisites
Strong Programming Skills:
Built-in Data Structures: list, tuple, set, dictionary
Comfortable with recursive functions
Basic Programming Problem-Solving Skills
That is; solved a lot on the basic topics
Use IDE Debugger
Preferred:
Project Building Skills
Don't miss such a unique learning experience!
Acknowledgement: “I’d like to extend my gratitude towards Robert Bogan for his help with proofreading the slides for this course”