diff --git a/src/data/roadmaps/leetcode/content/fenwick-tree@y0urRAnd0mId.md b/src/data/roadmaps/leetcode/content/fenwick-tree@y0urRAnd0mId.md new file mode 100644 index 000000000000..47c6ddb3815c --- /dev/null +++ b/src/data/roadmaps/leetcode/content/fenwick-tree@y0urRAnd0mId.md @@ -0,0 +1,12 @@ +# Fenwick Tree (Binary Indexed Tree) + +A Fenwick Tree, or Binary Indexed Tree (BIT), is a data structure that provides efficient methods for calculation and manipulation of the prefix sums of an array. Compared to a standard Segment Tree, a Fenwick Tree requires less memory, is much easier to implement, and performs both element updates and prefix sum queries in $O(\log n)$ time. It teaches you how to leverage bits and lowest significant bit (LSB) operations to navigate a tree-like structure stored implicitly within an array. + +Visit the following resources to learn more: + +- [@article@Range Sum Query - Mutable - LeetCode](https://leetcode.com/problems/range-sum-query-mutable/) +- [@video@Fenwick Tree / Binary Indexed Tree Complete Tutorial](https://www.youtube.com/watch?v=CWDQHfOnK08) +- [@article@Binary Indexed Tree / Fenwick Tree Insights](https://takeuforward.org/data-structure/binary-indexed-tree-fenwick-tree) +- [@article@Inversion Count using Fenwick Tree](https://takeuforward.org/data-structure/inversion-count-using-fenwick-tree) +- [@video@Fenwick Tree / Binary Indexed Tree Structure](https://www.youtube.com/watch?v=uSFzHC_dgAg) +- [@video@Inversion Count Problem using BIT](https://www.youtube.com/watch?v=kPaJfAUwViY) \ No newline at end of file diff --git a/src/data/roadmaps/leetcode/content/segment-tree@an0thErRAnd0mId.md b/src/data/roadmaps/leetcode/content/segment-tree@an0thErRAnd0mId.md new file mode 100644 index 000000000000..8f99471a8c1a --- /dev/null +++ b/src/data/roadmaps/leetcode/content/segment-tree@an0thErRAnd0mId.md @@ -0,0 +1,12 @@ +# Segment Tree + +A Segment Tree is an advanced data structure used for storing information about intervals or segments. It allows querying a range (e.g., range sum, minimum, or maximum queries) and updating an element both in efficient $O(\log n)$ time. It teaches you how to perform bottom-up array-based divide and conquer structures and lays the groundwork for handling complex range-query competitive programming problems. + +Visit the following resources to learn more: + +- [@article@Range Sum Query - Mutable - LeetCode](https://leetcode.com/problems/range-sum-query-mutable/) +- [@video@Segment Trees Complete Guide](https://www.youtube.com/watch?v=2bSS8rtFym4) +- [@article@Introduction to Segment Trees | Range Queries](https://takeuforward.org/data-structure/segment-tree-intro-with-range-queries) +- [@article@Lazy Propagation in Segment Trees (Range Updates)](https://takeuforward.org/data-structure/lazy-propagation-segment-tree) +- [@video@Segment Trees Playlist: Basics to Lazy Propagation](https://www.youtube.com/watch?v=negJCfpBfiQ) +- [@video@Lazy Propagation in Segment Trees Explained](https://www.youtube.com/watch?v=rwXVCDeE96c) \ No newline at end of file diff --git a/src/data/roadmaps/leetcode/content/tries@th1sIsArAnd0mId.md b/src/data/roadmaps/leetcode/content/tries@th1sIsArAnd0mId.md new file mode 100644 index 000000000000..e18c59914d4a --- /dev/null +++ b/src/data/roadmaps/leetcode/content/tries@th1sIsArAnd0mId.md @@ -0,0 +1,12 @@ +# Tries (Prefix Tree) + +A Trie is a tree-like data structure used to efficiently store and retrieve keys in a dataset of strings. It shines in prefix-matching problems, autocomplete engines, and dictionary implementations. Inserting and searching for a string of length $L$ takes $O(L)$ time, making it significantly faster than standard brute-force string comparisons. This pattern teaches you how to structure tree nodes containing character array pointers or hash maps. + +Visit the following resources to learn more: + +- [@article@Implement Trie (Prefix Tree) - LeetCode](https://leetcode.com/problems/implement-trie-prefix-tree/) +- [@video@Trie Data Structure | Complete Implementation](https://www.youtube.com/watch?v=giiaIofn31A) +- [@article@Implement Trie - I](https://takeuforward.org/data-structure/implement-trie-1) +- [@article@Implement Trie - II (Advanced Operations)](https://takeuforward.org/data-structure/implement-trie-ii) +- [@video@Tries Master Class by Striver](https://www.youtube.com/watch?v=thsleiL6zxg) +- [@video@Implement Trie - II (Count & Erase)](https://www.youtube.com/watch?v=K5pcpkEMCN0) \ No newline at end of file