diff --git a/dsa-solutions/lc-solutions/3100-3199/3181-Maximum total rewards using rewards II.md b/dsa-solutions/lc-solutions/3100-3199/3181-Maximum total rewards using rewards II.md index 7204d2a63..853a311db 100644 --- a/dsa-solutions/lc-solutions/3100-3199/3181-Maximum total rewards using rewards II.md +++ b/dsa-solutions/lc-solutions/3100-3199/3181-Maximum total rewards using rewards II.md @@ -1,5 +1,5 @@ --- -id: max-total-reward +id: 3181-max-total-reward title: Maximum Total Reward Using Operations level: hard sidebar_label: Max Total Reward diff --git a/dsa/basic-topics/_category_.json b/dsa/basic-topics/_category_.json new file mode 100644 index 000000000..fa72e2951 --- /dev/null +++ b/dsa/basic-topics/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "Basic Topics", + "position": 2, + "link": { + "type": "generated-index", + "description": "In this section, you will find topics that are essential to understanding the basics of the DSA and how to start your DSA learning journey." + } + } \ No newline at end of file diff --git a/dsa/basic-topics/arrays/_category_.json b/dsa/basic-topics/arrays/_category_.json new file mode 100644 index 000000000..f1be34a65 --- /dev/null +++ b/dsa/basic-topics/arrays/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "Arrays", + "position": 5, + "link": { + "type": "generated-index", + "description": "In this section, you will learn about arrays and how to use them in your programs." + } + } \ No newline at end of file diff --git a/dsa/basic-topics/arrays/introduction.md b/dsa/basic-topics/arrays/introduction.md new file mode 100644 index 000000000..d8e6ee587 --- /dev/null +++ b/dsa/basic-topics/arrays/introduction.md @@ -0,0 +1,6 @@ +--- +id: introduction-to-array +title: Introduction to Arrays +sidebar_label: Introduction to Arrays +sidebar_position: 1 +--- diff --git a/dsa/basic-topics/arrays/multi-dimensional.md b/dsa/basic-topics/arrays/multi-dimensional.md new file mode 100644 index 000000000..e69de29bb diff --git a/dsa/basic-topics/arrays/operations.md b/dsa/basic-topics/arrays/operations.md new file mode 100644 index 000000000..e69de29bb diff --git a/dsa/basic-topics/arrays/practice-problems.md b/dsa/basic-topics/arrays/practice-problems.md new file mode 100644 index 000000000..e69de29bb diff --git a/dsa/basic-topics/backtracking.md b/dsa/basic-topics/backtracking.md new file mode 100644 index 000000000..eb8e5a749 --- /dev/null +++ b/dsa/basic-topics/backtracking.md @@ -0,0 +1,6 @@ +--- +id: backtracking +title: Backtracking +sidebar_label: Backtracking +sidebar_position: 6 +--- diff --git a/dsa/basic-topics/binary-search.md b/dsa/basic-topics/binary-search.md new file mode 100644 index 000000000..64a2529f4 --- /dev/null +++ b/dsa/basic-topics/binary-search.md @@ -0,0 +1,6 @@ +--- +id: binary-search +title: Binary Search +sidebar_label: Binary Search +sidebar_position: 7 +--- diff --git a/dsa/basic-topics/brute-force.md b/dsa/basic-topics/brute-force.md new file mode 100644 index 000000000..0b986289f --- /dev/null +++ b/dsa/basic-topics/brute-force.md @@ -0,0 +1,6 @@ +--- +id: brute-force +title: Brute Force Algorithm +sidebar_label: Brute Force +sidebar_position: 8 +--- diff --git a/dsa/basic-topics/greedy.md b/dsa/basic-topics/greedy.md new file mode 100644 index 000000000..1821d964b --- /dev/null +++ b/dsa/basic-topics/greedy.md @@ -0,0 +1,6 @@ +--- +id: greedy +title: Greedy Algorithms +sidebar_label: Greedy +sidebar_position: 9 +--- diff --git a/dsa/basic-topics/hash-map.md b/dsa/basic-topics/hash-map.md new file mode 100644 index 000000000..e43a7ed84 --- /dev/null +++ b/dsa/basic-topics/hash-map.md @@ -0,0 +1,6 @@ +--- +id: hash-map +title: Hash Map +sidebar_label: Hash Map +sidebar_position: 10 +--- diff --git a/dsa/basic-topics/heap.md b/dsa/basic-topics/heap.md new file mode 100644 index 000000000..b844e2537 --- /dev/null +++ b/dsa/basic-topics/heap.md @@ -0,0 +1,6 @@ +--- +id: heap +title: Heap (Priority Queue) +sidebar_label: Heap +sidebar_position: 11 +--- diff --git a/dsa/basic-topics/introduction.md b/dsa/basic-topics/introduction.md new file mode 100644 index 000000000..bbf168bde --- /dev/null +++ b/dsa/basic-topics/introduction.md @@ -0,0 +1,58 @@ +--- +id: introduction-to-data-structures-and-algorithms +title: Introduction to Data Structures and Algorithms +sidebar_label: Introduction to DSA +sidebar_position: 1 +--- + +Data Structures and Algorithms (DSA) is a fundamental part of computer science. It is the study of data structures and algorithms that are used to solve problems. Data structures are a way of organizing and storing data so that it can be accessed and modified efficiently. Algorithms are a set of instructions that are used to solve problems. + +## Why Study Data Structures and Algorithms? + +Data structures and algorithms are the building blocks of computer programs. They are used to solve complex problems efficiently. Here are some reasons why you should study data structures and algorithms: + +1. **Efficiency**: Data structures and algorithms help you write efficient code. By choosing the right data structure and algorithm, you can reduce the time and space complexity of your code. +2. **Problem Solving**: Data structures and algorithms help you solve complex problems. They provide a systematic way to approach problems and find solutions. +3. **Performance**: Data structures and algorithms help you write code that performs well. By understanding how data structures and algorithms work, you can write code that is fast and efficient. +4. **Interviews**: Data structures and algorithms are an important topic in technical interviews. Many companies ask questions related to data structures and algorithms in their interviews. +5. **Foundation**: Data structures and algorithms are the foundation of computer science. By studying data structures and algorithms, you will develop a strong foundation in computer science. +6. **Learning**: Data structures and algorithms are interesting topics to study. They provide insights into how computers work and how problems can be solved using computers. +7. **Career**: Data structures and algorithms are essential skills for a career in software development. By mastering data structures and algorithms, you can become a better programmer and advance your career. +8. **Problem Solving Skills**: Data structures and algorithms help you develop problem-solving skills. By studying data structures and algorithms, you will learn how to break down complex problems into smaller, more manageable problems. +9. **Creativity**: Data structures and algorithms are a creative field. They require you to think creatively and come up with innovative solutions to problems. + +## Topics in Data Structures and Algorithms + +Data structures and algorithms cover a wide range of topics. Some of the key topics in data structures and algorithms include: + +1. **Arrays**: Arrays are a fundamental data structure that stores a collection of elements in contiguous memory locations. +2. **Linked Lists**: Linked lists are a data structure that consists of a sequence of elements where each element points to the next element in the sequence. +3. **Stacks**: Stacks are a data structure that follows the Last In First Out (LIFO) principle, where the last element added is the first element removed. +4. **Queues**: Queues are a data structure that follows the First In First Out (FIFO) principle, where the first element added is the first element removed. +5. **Trees**: Trees are a hierarchical data structure that consists of nodes connected by edges. They are used to represent hierarchical relationships between elements. +6. **Graphs**: Graphs are a data structure that consists of a set of vertices connected by edges. They are used to represent relationships between elements. +7. **Sorting Algorithms**: Sorting algorithms are algorithms that arrange elements in a specific order. Some common sorting algorithms include Bubble Sort, Selection Sort, Insertion Sort, Merge Sort, Quick Sort, and Heap Sort. +8. **Searching Algorithms**: Searching algorithms are algorithms that find a specific element in a collection of elements. Some common searching algorithms include Linear Search, Binary Search, Depth First Search (DFS), and Breadth First Search (BFS). +9. **Recursion**: Recursion is a programming technique where a function calls itself to solve a problem. It is used to solve problems that can be broken down into smaller, more manageable subproblems. +10. **Dynamic Programming**: Dynamic programming is a method for solving complex problems by breaking them down into simpler subproblems. It is used to solve optimization problems where the solution can be obtained by combining solutions to subproblems. +11. **Greedy Algorithms**: Greedy algorithms are algorithms that make a series of choices that are locally optimal at each step with the hope of finding a global optimum solution. +12. **Divide and Conquer**: Divide and conquer is a problem-solving technique where a problem is divided into smaller subproblems that are solved independently. The solutions to the subproblems are then combined to solve the original problem. +13. **Backtracking**: Backtracking is a problem-solving technique where a solution is built incrementally by making a series of choices. If a choice leads to a dead end, the algorithm backtracks and makes a different choice. +14. **Hashing**: Hashing is a technique that is used to map data to a fixed-size array. It is used to store and retrieve data quickly. +15. **Trie**: Trie is a tree-like data structure that is used to store a dynamic set of strings. It is used to efficiently store and search for strings. +16. **Segment Trees**: Segment trees are a data structure that is used to store information about intervals or segments. They are used to perform range queries efficiently. +17. **Binary Indexed Trees (Fenwick Trees)**: Binary Indexed Trees, also known as Fenwick Trees, are a data structure that is used to perform range queries and updates efficiently. + +These are just a few of the many topics in data structures and algorithms. By studying these topics, you will gain a deeper understanding of how data structures and algorithms work and how they can be used to solve problems. + +## Conclusion + +Data structures and algorithms are essential topics in computer science. They provide a systematic way to solve problems efficiently. By studying data structures and algorithms, you will develop problem-solving skills, improve your coding skills, and advance your career in software development. Whether you are a beginner or an experienced programmer, data structures and algorithms are important topics to study. They will help you become a better programmer and solve complex problems more effectively. + +--- + +

Authors:

+ +{['ajay-dhangar'].map(username => ( + +))} diff --git a/dsa/basic-topics/kadane.md b/dsa/basic-topics/kadane.md new file mode 100644 index 000000000..5787a330b --- /dev/null +++ b/dsa/basic-topics/kadane.md @@ -0,0 +1,6 @@ +--- +id: kadane +title: Kadane's Algorithm +sidebar_label: Kadane's +sidebar_position: 12 +--- diff --git a/dsa/basic-topics/linear-search.md b/dsa/basic-topics/linear-search.md new file mode 100644 index 000000000..80fd38b32 --- /dev/null +++ b/dsa/basic-topics/linear-search.md @@ -0,0 +1,6 @@ +--- +id: linear-search +title: Linear Search +sidebar_label: Linear Search +sidebar_position: 13 +--- diff --git a/dsa/basic-topics/linked-list.md b/dsa/basic-topics/linked-list.md new file mode 100644 index 000000000..75dfac664 --- /dev/null +++ b/dsa/basic-topics/linked-list.md @@ -0,0 +1,6 @@ +--- +id: linked-list +title: Linked List +sidebar_label: Linked List +sidebar_position: 14 +--- diff --git a/dsa/basic-topics/sorting/_category_.json b/dsa/basic-topics/sorting/_category_.json new file mode 100644 index 000000000..7cfdabbe4 --- /dev/null +++ b/dsa/basic-topics/sorting/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "Sorting", + "position": 15, + "link": { + "type": "generated-index", + "description": "In this section, you will learn sorting algorithms and how to implement them in different programming languages." + } + } \ No newline at end of file diff --git a/dsa/basic-topics/sorting/bubble-sort.md b/dsa/basic-topics/sorting/bubble-sort.md new file mode 100644 index 000000000..1cec070f3 --- /dev/null +++ b/dsa/basic-topics/sorting/bubble-sort.md @@ -0,0 +1,6 @@ +--- +id: bubble-sort +title: Bubble Sort +sidebar_label: Bubble Sort +sidebar_position: 2 +--- diff --git a/dsa/basic-topics/sorting/cyclic-sort.md b/dsa/basic-topics/sorting/cyclic-sort.md new file mode 100644 index 000000000..2f70b0552 --- /dev/null +++ b/dsa/basic-topics/sorting/cyclic-sort.md @@ -0,0 +1,6 @@ +--- +id: cyclic-sort +title: Cycle Sort +sidebar_label: Cycle Sort +sidebar_position: 3 +--- diff --git a/dsa/basic-topics/sorting/insertion-sort.md b/dsa/basic-topics/sorting/insertion-sort.md new file mode 100644 index 000000000..0a85b9e3e --- /dev/null +++ b/dsa/basic-topics/sorting/insertion-sort.md @@ -0,0 +1,6 @@ +--- +id: insertion-sort +title: Insertion Sort +sidebar_label: Insertion Sort +sidebar_position: 4 +--- diff --git a/dsa/basic-topics/sorting/introduction.md b/dsa/basic-topics/sorting/introduction.md new file mode 100644 index 000000000..631fb5213 --- /dev/null +++ b/dsa/basic-topics/sorting/introduction.md @@ -0,0 +1,6 @@ +--- +id: introduction-to-sorting +title: Introduction to Sorting +sidebar_label: Sorting Intro +sidebar_position: 1 +--- \ No newline at end of file diff --git a/dsa/basic-topics/sorting/merge-sort.md b/dsa/basic-topics/sorting/merge-sort.md new file mode 100644 index 000000000..3db11e978 --- /dev/null +++ b/dsa/basic-topics/sorting/merge-sort.md @@ -0,0 +1,6 @@ +--- +id: merge-sort +title: Merge Sort +sidebar_label: Merge Sort +sidebar_position: 5 +--- diff --git a/dsa/basic-topics/sorting/selection-sort.md b/dsa/basic-topics/sorting/selection-sort.md new file mode 100644 index 000000000..8cec48e56 --- /dev/null +++ b/dsa/basic-topics/sorting/selection-sort.md @@ -0,0 +1,6 @@ +--- +id: selection-sort +title: Selection Sort +sidebar_label: Selection Sort +sidebar_position: 6 +--- diff --git a/dsa/basic-topics/sorting/shell-sort.md b/dsa/basic-topics/sorting/shell-sort.md new file mode 100644 index 000000000..a9e99eaa4 --- /dev/null +++ b/dsa/basic-topics/sorting/shell-sort.md @@ -0,0 +1,6 @@ +--- +id: shell-sort +title: Shell Sort +sidebar_label: Shell Sort +sidebar_position: 7 +--- diff --git a/dsa/basic-topics/sorting/tim-sort.md b/dsa/basic-topics/sorting/tim-sort.md new file mode 100644 index 000000000..a43a33549 --- /dev/null +++ b/dsa/basic-topics/sorting/tim-sort.md @@ -0,0 +1,6 @@ +--- +id: tim-sort +title: Tim Sort +sidebar_label: Tim Sort +sidebar_position: 8 +--- diff --git a/dsa/basic-topics/space-complexity.md b/dsa/basic-topics/space-complexity.md new file mode 100644 index 000000000..98c7fe283 --- /dev/null +++ b/dsa/basic-topics/space-complexity.md @@ -0,0 +1,6 @@ +--- +id: space-complexity +title: Space Complexity +sidebar_label: Space Complexity +sidebar_position: 3 +--- diff --git a/dsa/basic-topics/strings/_category_.json b/dsa/basic-topics/strings/_category_.json new file mode 100644 index 000000000..96e5004d5 --- /dev/null +++ b/dsa/basic-topics/strings/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "Strings", + "position": 5, + "link": { + "type": "generated-index", + "description": "In this section, you will find information about the String class and its methods." + } + } \ No newline at end of file diff --git a/dsa/basic-topics/strings/introduction.md b/dsa/basic-topics/strings/introduction.md new file mode 100644 index 000000000..c0eba9baf --- /dev/null +++ b/dsa/basic-topics/strings/introduction.md @@ -0,0 +1,6 @@ +--- +id: introduction-to-string +title: Introduction to Stirngs +sidebar_label: Introduction to Strings +sidebar_position: 1 +--- diff --git a/dsa/basic-topics/time-complexity.md b/dsa/basic-topics/time-complexity.md new file mode 100644 index 000000000..88ee0d1ee --- /dev/null +++ b/dsa/basic-topics/time-complexity.md @@ -0,0 +1,6 @@ +--- +id: time-complexity +title: Time Complexity +sidebar_label: Time Complexity +sidebar_position: 2 +--- diff --git a/dsa/beginner/_category_.json b/dsa/beginner/_category_.json deleted file mode 100644 index bc9c61a04..000000000 --- a/dsa/beginner/_category_.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "label": "Beginner", - "position": 2, - "link": { - "type": "generated-index", - "description": "Learn the basics of the Data Structures and Algorithms for Beginners track." - } - } \ No newline at end of file diff --git a/dsa/intermediate/_category_.json b/dsa/intermediate/_category_.json deleted file mode 100644 index 63277af45..000000000 --- a/dsa/intermediate/_category_.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "label": "Intermediate", - "position": 2, - "link": { - "type": "generated-index", - "description": "Learn the intermediate of the Data Structures." - } -} \ No newline at end of file diff --git a/src/components/Author/index.tsx b/src/components/Author/index.tsx new file mode 100644 index 000000000..82da41230 --- /dev/null +++ b/src/components/Author/index.tsx @@ -0,0 +1,87 @@ +import React, { useState, useEffect } from 'react'; +import styled from 'styled-components'; + +interface AuthorProps { + username: string; +} + +const AuthorContainer = styled.div` + display: flex; + align-items: center; + margin-bottom: 1rem; +`; + +const AuthorLink = styled.a` + text-decoration: none; + color: inherit; + display: flex; + align-items: center; + + &:hover { + opacity: 0.8; + } +`; + +const Avatar = styled.img` + width: 50px; + height: 50px; + border-radius: 50%; + margin-right: 10px; +`; + +const AuthorName = styled.span` + font-weight: bold; +`; + +const Loading = styled.div` + font-style: italic; + color: #666; +`; + +const Error = styled.div` + color: red; + font-weight: bold; +`; + +const Author: React.FC = ({ username }) => { + const [authorData, setAuthorData] = useState(null); + const [isLoading, setIsLoading] = useState(true); + const [error, setError] = useState(null); + + useEffect(() => { + fetch(`https://api.github.com/users/${username}`) + .then(response => { + if (!response.ok) { + throw new Error('Failed to fetch author data'); + } + return response.json(); + }) + .then(data => { + setAuthorData(data); + setIsLoading(false); + }) + .catch(error => { + setError(error.message); + setIsLoading(false); + }); + }, [username]); + + if (isLoading) { + return Loading...; + } + + if (error) { + return Error: {error}; + } + + return ( + + + + {authorData.name || authorData.login} + + + ); +}; + +export default Author; \ No newline at end of file diff --git a/src/css/custom.css b/src/css/custom.css index e0bd97ce5..10e4a4e6b 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -55,12 +55,6 @@ no-repeat; } -.header-github-link:hover::before { - transform: scale(1.05); - border-radius: 50%; - border: 2px solid green; - box-shadow: 0 4px 8px rgba(0, 255, 0, 0.6); -} [data-theme='dark'] .header-github-link::before { background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='white' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") diff --git a/src/theme/MDXComponents.js b/src/theme/MDXComponents.js index dbfc3317b..584d9d869 100644 --- a/src/theme/MDXComponents.js +++ b/src/theme/MDXComponents.js @@ -21,6 +21,7 @@ import Lesson from '@site/src/components/Lesson'; import Image from '@theme/IdealImage'; import LiteYouTubeEmbed from "react-lite-youtube-embed"; import "react-lite-youtube-embed/dist/LiteYouTubeEmbed.css"; +import Author from '@site/src/components/Author'; export default { // Re-use the default mapping @@ -46,5 +47,6 @@ export default { File, Lesson, Image, - LiteYouTubeEmbed + LiteYouTubeEmbed, + Author }; \ No newline at end of file