Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/data/roadmaps/leetcode/content/fenwick-tree@y0urRAnd0mId.md
Original file line number Diff line number Diff line change
@@ -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)
12 changes: 12 additions & 0 deletions src/data/roadmaps/leetcode/content/segment-tree@an0thErRAnd0mId.md
Original file line number Diff line number Diff line change
@@ -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)
12 changes: 12 additions & 0 deletions src/data/roadmaps/leetcode/content/tries@th1sIsArAnd0mId.md
Original file line number Diff line number Diff line change
@@ -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)