mirror of
https://github.com/prdlk/leetcode.git
synced 2026-11-02 21:22:43 +00:00
build(docs): generate Blume site artifacts
This commit is contained in:
1 parent
7f8461e692
commit
cd23c619df
29 files changed
+7930
No files matched your search
@@ -0,0 +1 @@
|
||||
{"/":{"md":"---\ntitle: Introduction\ndescription: Structured dependency spine based roadmap for solving DSA Problems on leetcode.\nicon: play\n---\n\n## 1. Linear Structures\n\n:::tip\nData is read in one direction, from the first item to the last. The current position is recorded at each step. All later phases use this skill.\n:::\n\n**[Hash Table](/hash-table)**\n\nA key maps to a value in constant time, which removes the need for a full scan.\n\n**[Prefix Sum](/prefix-sum)**\n\nA running total is stored at each index, so the sum of any range is one subtraction.\n\n**[Two Pointers](/two-pointers)**\n\nTwo indices move through the data from different positions and meet at the answer.\n\n**[Sliding Window](/sliding-window)**\n\nA range with a start and an end moves across the data, and the contents are updated at each step.\n\n**[Binary Search](/binary-search)**\n\nHalf of a sorted range is removed at each step until the target is found.\n\n**[Stack](/stack)**\n\nItems are added and removed from one end, so the last item added is the first item removed.\n\n**[Monotonic Stack](/monotonic-stack)**\n\nA stack keeps its items in sorted order, which finds the next larger or smaller item in one pass.\n\n## 2. Nodal & Grid\n\n:::tip\nThe data is in separate parts. Each part points to the next part, or sits next to other parts on a flat surface. An index does not find the next item. The pointers or the neighbors give the path instead.\n:::\n\n**[Linked List](/linked-list)**\n\nEach node points to the next node, and the pointers give the path through the data.\n\n**[Hybrid Structures](/hybrid-structures)**\n\nTwo structures are combined, such as a hash map and a linked list, to get the best properties of each.\n\n**[Matrix Index Math](/matrix-index-math)**\n\nA two-dimensional grid is read as a flat array through a formula, and the neighbors are found by arithmetic.\n\n## 3. Hierarchical\n\n:::tip\nEach part points to one or more parts below it. Those parts do the same. The method that solves a small part also solves the large part. This is recursion.\n:::\n\n**[Tree DFS](/tree-dfs)**\n\nEach branch is followed to its end before the next branch is examined.\n\n**[Tree BFS](/tree-bfs)**\n\nAll nodes at one level are visited before the nodes at the next level.\n\n**[Binary Search Tree](/binary-search-tree)**\n\nEach node holds a value that is larger than its left subtree and smaller than its right subtree.\n\n**[Heap](/heap-priority-queue)**\n\nThe largest or smallest item is always at the top, and it is removed in logarithmic time.\n\n**[Trie](/trie)**\n\nEach node holds one character, and a path from the root spells a word.\n\n## 4. Relational\n\n:::tip\nEach part can point to any other part. Loops can occur. The method must visit each part one time only. The order of the parts, or the distance between them, is not given in the data. The method finds it.\n:::\n\n**[Graph DFS](/graph-dfs)**\n\nEach edge is followed to its end, and a visited set prevents a repeat visit.\n\n**[Graph BFS](/graph-bfs)**\n\nNodes are visited in order of distance from the start, which gives the shortest path in an unweighted graph.\n\n**[Topological Sort](/topological-sort)**\n\nNodes are put in an order where each node comes after all nodes that point to it.\n\n**[Union-Find](/union-find)**\n\nTwo sets are merged and the set of any item is found in near-constant time.\n\n## 5. Decision Space\n\n:::tip\nThe data has no structure. The method makes one. Each choice makes a new branch. The problem sets the correct method: examine all branches, keep a record of the results already found, or make one choice and do not go back.\n:::\n\n**[Backtracking](/backtracking)**\n\nEach choice makes a branch, and a branch is undone when it does not give a valid result.\n\n**[1-D DP](/1d-dynamic-programming)**\n\nThe result for each state is stored in a list, and each new result is computed from the results before it.\n\n**[Multi-D / Grid DP](/multi-d-grid-dp)**\n\nThe result for each state is stored in a table with two or more dimensions, and each cell is computed from its neighbors.\n\n**[Greedy](/greedy)**\n\nThe best local choice is made at each step and is not changed later.\n\n**[Intervals](/intervals)**\n\nRanges with a start and an end are sorted, and then merged, counted, or scheduled.\n","mdx":"---\ntitle: Introduction\ndescription: Structured dependency spine based roadmap for solving DSA Problems on leetcode.\nicon: play\n---\n\n## 1. Linear Structures\n\n:::tip\nData is read in one direction, from the first item to the last. The current position is recorded at each step. All later phases use this skill.\n:::\n\n<Columns cols={2}>\n <Column>\n <Tile\n title=\"Hash Table\"\n description=\"A key maps to a value in constant time, which removes the need for a full scan.\"\n href=\"/hash-table\"\n >\n <Icon icon=\"hash\" size={28} />\n </Tile>\n </Column>\n <Column>\n <Tile\n title=\"Prefix Sum\"\n descLine truncated
|
||||
Reference in new issue
Block a user