diff --git a/docs/data-structure-and-algorithms/algorithms/_category_.json b/docs/data-structure-and-algorithms/algorithms/_category_.json index 06cc2715..11226b38 100644 --- a/docs/data-structure-and-algorithms/algorithms/_category_.json +++ b/docs/data-structure-and-algorithms/algorithms/_category_.json @@ -1,4 +1,4 @@ { "label": "Algorithms", - "position": 2 + "position": 3 } diff --git a/docs/data-structure-and-algorithms/algorithms/introduction.md b/docs/data-structure-and-algorithms/algorithms/introduction.md index d0eacbc3..768776aa 100644 --- a/docs/data-structure-and-algorithms/algorithms/introduction.md +++ b/docs/data-structure-and-algorithms/algorithms/introduction.md @@ -10,6 +10,6 @@ This note is complete, reviewed, and considered stable. ::: -Data Structures and Algorithms (DSA) deal with how data is organized in memory and how it is processed efficiently. They form the foundation of writing programs that scale beyond small inputs, where performance, memory usage, and predictability matter. DSA is fundamentally about trade-offs, time versus space, simplicity versus efficiency and choosing the right approach based on how data is accessed and modified. Rather than memorizing solutions, DSA builds the ability to reason about efficiency, understand how code behaves as input grows, and design systems that remain reliable under load. +Algorithms deal with how data is processed efficiently and how problems are solved systematically. They form the foundation of writing programs that scale beyond small inputs, where performance, memory usage, and predictability matter. Algorithms are fundamentally about trade-offs, time versus space, simplicity versus efficiency and choosing the right approach based on the problem at hand. Rather than memorizing solutions, learning algorithms builds the ability to reason about efficiency, understand how code behaves as input grows, and design systems that remain reliable under load. -Here in the notes, We'll including notes on various data strcutures and algorithms. We will discuss how each data structure and algorithm works, their trade-offs, their performance, etc. +Here in the notes, we'll include notes on various algorithms. We will discuss how each algorithm works, their trade-offs, their performance characteristics, and when to use them. diff --git a/docs/data-structure-and-algorithms/algorithms/sliding-window.md b/docs/data-structure-and-algorithms/algorithms/sliding-window.md index d92fccee..cf6efe2d 100644 --- a/docs/data-structure-and-algorithms/algorithms/sliding-window.md +++ b/docs/data-structure-and-algorithms/algorithms/sliding-window.md @@ -1,5 +1,5 @@ --- -sidebar_position: 5 +sidebar_position: 3 --- # Sliding Window @@ -10,12 +10,12 @@ This approach reduces the time complexity of problems that would otherwise requi ## Types of Sliding Windows -1. **Fixed-Sized Window**: +1. **Fixed-Sized Window**: - The window size remains constant while sliding. - Example: Maximum sum of subarray of size `k`. -2. **Dynamic-Sized Window**: +2. **Dynamic-Sized Window**: - The window size changes based on conditions (e.g., constraints on the sum, distinct elements). - Example: Smallest subarray with a sum greater than `x`. @@ -161,9 +161,9 @@ def count_distinct_in_window(arr, k): ## When to Use Sliding Window -1. **Subarray or Substring Problems**: +1. **Subarray or Substring Problems**: - Finding ranges or subsequences with specific constraints. -2. **Optimizations**: +2. **Optimizations**: - Maximizing or minimizing a property within a range. -3. **Frequency Tracking**: +3. **Frequency Tracking**: - Counting occurrences or distinct elements within a window. diff --git a/docs/data-structure-and-algorithms/data-structures/_category_.json b/docs/data-structure-and-algorithms/data-structures/_category_.json new file mode 100644 index 00000000..0bee1d0f --- /dev/null +++ b/docs/data-structure-and-algorithms/data-structures/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Data Structure", + "position": 2 +} diff --git a/docs/data-structure-and-algorithms/algorithms/arrays.md b/docs/data-structure-and-algorithms/data-structures/arrays.md similarity index 100% rename from docs/data-structure-and-algorithms/algorithms/arrays.md rename to docs/data-structure-and-algorithms/data-structures/arrays.md diff --git a/docs/data-structure-and-algorithms/algorithms/bst/_category_.json b/docs/data-structure-and-algorithms/data-structures/bst/_category_.json similarity index 69% rename from docs/data-structure-and-algorithms/algorithms/bst/_category_.json rename to docs/data-structure-and-algorithms/data-structures/bst/_category_.json index eaf84509..f90454b9 100644 --- a/docs/data-structure-and-algorithms/algorithms/bst/_category_.json +++ b/docs/data-structure-and-algorithms/data-structures/bst/_category_.json @@ -1,4 +1,4 @@ { "label": "Binary Search Tree", - "position": 9 + "position": 8 } diff --git a/docs/data-structure-and-algorithms/algorithms/bst/introduction.md b/docs/data-structure-and-algorithms/data-structures/bst/introduction.md similarity index 100% rename from docs/data-structure-and-algorithms/algorithms/bst/introduction.md rename to docs/data-structure-and-algorithms/data-structures/bst/introduction.md diff --git a/docs/data-structure-and-algorithms/algorithms/bst/key-operations.md b/docs/data-structure-and-algorithms/data-structures/bst/key-operations.md similarity index 100% rename from docs/data-structure-and-algorithms/algorithms/bst/key-operations.md rename to docs/data-structure-and-algorithms/data-structures/bst/key-operations.md diff --git a/docs/data-structure-and-algorithms/algorithms/hashing.md b/docs/data-structure-and-algorithms/data-structures/hash-table.md similarity index 100% rename from docs/data-structure-and-algorithms/algorithms/hashing.md rename to docs/data-structure-and-algorithms/data-structures/hash-table.md diff --git a/docs/data-structure-and-algorithms/data-structures/introduction.md b/docs/data-structure-and-algorithms/data-structures/introduction.md new file mode 100644 index 00000000..976567b4 --- /dev/null +++ b/docs/data-structure-and-algorithms/data-structures/introduction.md @@ -0,0 +1,15 @@ +--- +sidebar_position: 1 +--- + +# Introduction + +:::tip[Status] + +This note is complete, reviewed, and considered stable. + +::: + +Data Structures are the foundation of how data is organized in memory and accessed efficiently. They form the foundation of writing programs that scale beyond small inputs, where performance, memory usage, and predictability matter. Data Structures are fundamentally about trade-offs, time versus space, simplicity versus efficiency and choosing the right approach based on how data is accessed and modified. Rather than memorizing solutions, understanding data structures builds the ability to reason about efficiency, understand how code behaves as input grows, and design systems that remain reliable under load. + +Here in the notes, we'll include notes on various data structures. We will discuss how each data structure works, their trade-offs, their performance characteristics, and when to use them. diff --git a/docs/data-structure-and-algorithms/algorithms/queue.md b/docs/data-structure-and-algorithms/data-structures/queue.md similarity index 99% rename from docs/data-structure-and-algorithms/algorithms/queue.md rename to docs/data-structure-and-algorithms/data-structures/queue.md index a0df3ee4..d8271558 100644 --- a/docs/data-structure-and-algorithms/algorithms/queue.md +++ b/docs/data-structure-and-algorithms/data-structures/queue.md @@ -1,5 +1,5 @@ --- -sidebar_position: 7 +sidebar_position: 6 --- # Queue diff --git a/docs/data-structure-and-algorithms/algorithms/stack.md b/docs/data-structure-and-algorithms/data-structures/stack.md similarity index 84% rename from docs/data-structure-and-algorithms/algorithms/stack.md rename to docs/data-structure-and-algorithms/data-structures/stack.md index c03fbad3..e604c735 100644 --- a/docs/data-structure-and-algorithms/algorithms/stack.md +++ b/docs/data-structure-and-algorithms/data-structures/stack.md @@ -1,5 +1,5 @@ --- -sidebar_position: 6 +sidebar_position: 5 --- # Stack @@ -21,9 +21,9 @@ Stacks can be visualized as a collection of elements piled one on top of another Stacks can be implemented using: -1. **Arrays or Lists**: Most commonly used in high-level programming languages like Python. -2. **Linked Lists**: Useful for dynamic memory allocation. -3. **Built-in Libraries**: Many languages have built-in stack implementations (e.g., Python's `deque`). +1. **Arrays or Lists**: Most commonly used in high-level programming languages like Python. +2. **Linked Lists**: Useful for dynamic memory allocation. +3. **Built-in Libraries**: Many languages have built-in stack implementations (e.g., Python's `deque`). ## Use Cases @@ -144,9 +144,9 @@ def next_greater_elements(nums): ## Advantages of Using Stacks -1. **Simple to Use**: Offers a straightforward way to manage LIFO behavior. -2. **Efficient**: Push and pop operations are O(1). -3. **Versatile**: Useful in diverse algorithms like DFS, backtracking, and expression evaluation. +1. **Simple to Use**: Offers a straightforward way to manage LIFO behavior. +2. **Efficient**: Push and pop operations are O(1). +3. **Versatile**: Useful in diverse algorithms like DFS, backtracking, and expression evaluation. ## Limitations of Stacks @@ -156,7 +156,7 @@ def next_greater_elements(nums): ## When to Use Stacks -1. **Reversible Processes**: Undo/redo operations, tracking states. -2. **Nested Structures**: Parentheses matching, XML/HTML tag validation. -3. **Recursion**: Mimicking recursion with an explicit stack (e.g., DFS). -4. **Order Preservation**: Storing elements temporarily for reversal. +1. **Reversible Processes**: Undo/redo operations, tracking states. +2. **Nested Structures**: Parentheses matching, XML/HTML tag validation. +3. **Recursion**: Mimicking recursion with an explicit stack (e.g., DFS). +4. **Order Preservation**: Storing elements temporarily for reversal. diff --git a/docs/data-structure-and-algorithms/algorithms/tree/_category_.json b/docs/data-structure-and-algorithms/data-structures/tree/_category_.json similarity index 58% rename from docs/data-structure-and-algorithms/algorithms/tree/_category_.json rename to docs/data-structure-and-algorithms/data-structures/tree/_category_.json index b1c5c3f0..d9204914 100644 --- a/docs/data-structure-and-algorithms/algorithms/tree/_category_.json +++ b/docs/data-structure-and-algorithms/data-structures/tree/_category_.json @@ -1,4 +1,4 @@ { "label": "Tree", - "position": 8 + "position": 7 } diff --git a/docs/data-structure-and-algorithms/algorithms/tree/binary-tree.md b/docs/data-structure-and-algorithms/data-structures/tree/binary-tree.md similarity index 100% rename from docs/data-structure-and-algorithms/algorithms/tree/binary-tree.md rename to docs/data-structure-and-algorithms/data-structures/tree/binary-tree.md diff --git a/docs/data-structure-and-algorithms/algorithms/tree/common-algorithms.md b/docs/data-structure-and-algorithms/data-structures/tree/common-algorithms.md similarity index 100% rename from docs/data-structure-and-algorithms/algorithms/tree/common-algorithms.md rename to docs/data-structure-and-algorithms/data-structures/tree/common-algorithms.md diff --git a/docs/data-structure-and-algorithms/algorithms/tree/full-vs-complete-binary-tree.md b/docs/data-structure-and-algorithms/data-structures/tree/full-vs-complete-binary-tree.md similarity index 100% rename from docs/data-structure-and-algorithms/algorithms/tree/full-vs-complete-binary-tree.md rename to docs/data-structure-and-algorithms/data-structures/tree/full-vs-complete-binary-tree.md diff --git a/docs/data-structure-and-algorithms/algorithms/tree/introduction.md b/docs/data-structure-and-algorithms/data-structures/tree/introduction.md similarity index 100% rename from docs/data-structure-and-algorithms/algorithms/tree/introduction.md rename to docs/data-structure-and-algorithms/data-structures/tree/introduction.md diff --git a/docs/data-structure-and-algorithms/algorithms/tree/n-ary-tree.md b/docs/data-structure-and-algorithms/data-structures/tree/n-ary-tree.md similarity index 100% rename from docs/data-structure-and-algorithms/algorithms/tree/n-ary-tree.md rename to docs/data-structure-and-algorithms/data-structures/tree/n-ary-tree.md diff --git a/docs/data-structure-and-algorithms/algorithms/tree/strict-binary-tree.md b/docs/data-structure-and-algorithms/data-structures/tree/strict-binary-tree.md similarity index 100% rename from docs/data-structure-and-algorithms/algorithms/tree/strict-binary-tree.md rename to docs/data-structure-and-algorithms/data-structures/tree/strict-binary-tree.md diff --git a/docs/data-structure-and-algorithms/algorithms/tree/strict-vs-complete-binary-tree.md b/docs/data-structure-and-algorithms/data-structures/tree/strict-vs-complete-binary-tree.md similarity index 100% rename from docs/data-structure-and-algorithms/algorithms/tree/strict-vs-complete-binary-tree.md rename to docs/data-structure-and-algorithms/data-structures/tree/strict-vs-complete-binary-tree.md diff --git a/docs/data-structure-and-algorithms/algorithms/tree/tree-representation.md b/docs/data-structure-and-algorithms/data-structures/tree/tree-representation.md similarity index 100% rename from docs/data-structure-and-algorithms/algorithms/tree/tree-representation.md rename to docs/data-structure-and-algorithms/data-structures/tree/tree-representation.md diff --git a/docs/data-structure-and-algorithms/algorithms/tree/tree-traversal.md b/docs/data-structure-and-algorithms/data-structures/tree/tree-traversal.md similarity index 100% rename from docs/data-structure-and-algorithms/algorithms/tree/tree-traversal.md rename to docs/data-structure-and-algorithms/data-structures/tree/tree-traversal.md diff --git a/docs/data-structure-and-algorithms/time-space-complexity/_category_.json b/docs/data-structure-and-algorithms/time-space-complexity/_category_.json index 7585666d..c2e6d8f1 100644 --- a/docs/data-structure-and-algorithms/time-space-complexity/_category_.json +++ b/docs/data-structure-and-algorithms/time-space-complexity/_category_.json @@ -1,4 +1,4 @@ { "label": "Time and Space Complexity", - "position": 3 + "position": 4 } diff --git a/docs/intro.md b/docs/intro.md index 125dd827..9fd0c9a9 100644 --- a/docs/intro.md +++ b/docs/intro.md @@ -153,10 +153,13 @@ If you come across any issues or errors in the notes, feel free to open an issue ### Data Structure and Algorithms 1. [Data Structure and Algorithms](/docs/data-structure-and-algorithms/introduction.md) + 1. [Data Structures](/docs/data-structure-and-algorithms/data-structures/introduction.md) + 1. [Introduction](/docs/data-structure-and-algorithms/data-structures/introduction.md) + 2. [Arrays](/docs/data-structure-and-algorithms/data-structures/arrays.md) + 3. [Hash Table](/docs/data-structure-and-algorithms/data-structures/hash-table.md) 1. [Algorithms](/docs/data-structure-and-algorithms/algorithms/introduction.md) 1. [Introduction](/docs/data-structure-and-algorithms/algorithms/introduction.md) 2. [Recursion](/docs/data-structure-and-algorithms/algorithms/recursion.md) - 3. [Arrays](/docs/data-structure-and-algorithms/algorithms/arrays.md) 2. [Time and Space Complexity](/docs/data-structure-and-algorithms/introduction.md) ### Operating Systems diff --git a/docusaurus.config.ts b/docusaurus.config.ts index bd86e3b1..4375f471 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -179,7 +179,7 @@ const config: Config = { ], }, ], - copyright: `Copyright © ${new Date().getFullYear()} Abhishek Chatterjee. Built with Docusaurus.`, + copyright: `Copyright © ${new Date().getFullYear()} Abhishek Chatterjee. Last built on ${new Date().toLocaleDateString()}. Built with Docusaurus.`, }, prism: { theme: prismThemes.github,