
Explore fenwick trees implementation II by performing updates, computing prefix sums, and querying interval sums in logarithmic time through index-based updates and the prefix sum method.
Explore how an LRU cache uses a doubly linked list and a hash table to achieve constant-time insertion, lookup, and removal of least recently used items.
Implement an LRU cache with a doubly linked list and a dictionary, storing up to four websites and evicting the least recently used item, and preview the display tree later.
Implement left and right rotations in splay trees, update child and parent references precisely, and relate these rotations to AVL and red-black trees for correct subtree reorganization.
Implement the splay tree display operation by rotating a given node to the root, handling zig-zig and zig-zag cases. The approach supports searching, inserting, and caching recently visited items.
Transform the trie into an associative array by storing key-value pairs at leaf nodes. Iterate through key characters, create needed nodes, and assign the leaf value.
Discover how longest common prefix search with trie data structures enables efficient IP routing, guiding packets using IP addresses toward the destination to compute the shortest path in networks.
Implement the naive brute-force substring search by aligning the pattern with the text, comparing characters, shifting one position on a mismatch, and reporting matches, with understanding of its inefficiency.
This course is for those who are interested in computer science and want to implement the algorithms and given data structures in Python. In every chapter you will learn about the theory of a given data structure or algorithm and then you will implement them from scratch.
Chapter 1: Binary Indexed Trees (Fenwick Trees)
theory behind the binary indexed tree or Fenwick tree data structure
how to use this data structure in computer vision and artificial intelligence
implementation in Python
Chapter 2: LRU Caches
what are caches and why are they so important
how to use doubly linked lists to implement caches
theory behind LRU caches
implementation in Python
Chapter 3: Splay Trees
what are splay trees
how to achieve caches with splay trees
Chapter 4: B-Trees
external memory and internal memory (RAM)
data structures for the external memory
trees with multiple children and multiple keys
what are B-tree data structures?
Chapter 5: Prefix Trees (Tries)
what are tries or prefix trees
real world applications of tries
autocomplete feature of tries
sorting with tries
IP routing
Chapter 6: Ternary Search Trees
what are ternary search trees
boggle game with tries
Chapter 7: Substring Search Algorithms
what are substring search algorithms and why are they important in real world softwares
brute-force substring search algorithm
hashing and Rabin-Karp method
Knuth-Morris-Pratt substring search algorithm
Z substring search algorithm (Z algorithm)
implementations in Python
Chapter 8: Topological Ordering
what is topological ordering (topological sort)?
topological ordering implementation with depth-first search
Chapter 9: Cycle Detection
how to detect cycles in graphs?
Chapter 10: Strongly Connected Components (Tarjan's Algorithm)
what are strongly connected components?
Tarjan's algorithm with depth-first search
Chapter 11: Hamiltonian cycles (Travelling Salesman Problem)
Hamiltonian cycles in graphs
what is the travelling salesman problem?
how to use backtracking to solve the problem
meta-heuristic approaches to boost algorithms
Chapter 12: Eulerian Cycles (Chinese Postman Problem)
Eulerian cycles in graphs
what is the chinese postman problem?
Thanks for joining my course, let's get started!