Skip to content

Restyle update and fix bug #4195

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 6, 2024
Merged
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
1,206 changes: 602 additions & 604 deletions dsa-problems/gfg-problems/easy/0601-0700.md

Large diffs are not rendered by default.

1,205 changes: 602 additions & 603 deletions dsa-problems/gfg-problems/medium/0501-0600.md

Large diffs are not rendered by default.

1,205 changes: 602 additions & 603 deletions dsa-problems/gfg-problems/school/0001-0100.md

Large diffs are not rendered by default.

281 changes: 140 additions & 141 deletions dsa-problems/gfg-problems/school/0101-0123.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,153 +8,152 @@ keywords:
- gfg problems problems
---


export const problems = [
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/automorphic-number4721/1",
"solutionLink": "#",
"problemName": "Automorphic Number"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/triangle-shrinking-downwards0459/1",
"solutionLink": "#",
"problemName": "Triangle shrinking downwards"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/diagonal-sum0158/1",
"solutionLink": "#",
"problemName": "Diagonal sum"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-an-ap1025/1",
"solutionLink": "#",
"problemName": "Sum of an AP"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/area-of-rectange-right-angled-triangle-and-circle2600/1",
"solutionLink": "#",
"problemName": "Area of Rectangle, Right Angled Triangle and Circle"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/find-difference-between-sum-of-diagonals1554/1",
"solutionLink": "#",
"problemName": "Find difference between sum of diagonals"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/front-back-transformation1659/1",
"solutionLink": "#",
"problemName": "Front-Back Transformation - copy"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/addition-of-two-square-matrices4916/1",
"solutionLink": "#",
"problemName": "Addition of two square matrices"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/12-hour-clock-subtraction1708/1",
"solutionLink": "#",
"problemName": "12 hour clock subtraction"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/java-classes-introduction/1",
"solutionLink": "#",
"problemName": "Java Classes Introduction"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/number-of-diagonals1020/1",
"solutionLink": "#",
"problemName": "Number of Diagonals"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/12-hour-clock-addition1206/1",
"solutionLink": "#",
"problemName": "12 hour clock addition"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/checcheck-if-two-given-circles-touch-each-other5038/1",
"solutionLink": "#",
"problemName": "Check if two given circles touch each other"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/combinational-logic1908/1",
"solutionLink": "#",
"problemName": "Combinational Logic"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/java-abstract-keyword/1",
"solutionLink": "#",
"problemName": "Java Abstract keyword"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/compound-interest0235/1",
"solutionLink": "#",
"problemName": "Compound Interest"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/program-to-print-reciprocal-of-letters36233623/1",
"solutionLink": "#",
"problemName": "Program to print reciprocal of letters"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/determine-focal-length-of-a-spherical-mirror5415/1",
"solutionLink": "#",
"problemName": "Determine focal length of a spherical mirror"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/12-hour-clock-multiplication4709/1",
"solutionLink": "#",
"problemName": "12 hour clock Multiplication "
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/number-pattern0517/1",
"solutionLink": "#",
"problemName": "Number Pattern"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/parallel-or-perpendicular4257/1",
"solutionLink": "#",
"problemName": "Parallel or Perpendicular?"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/decimal-to-any-base-conversion2440/1",
"solutionLink": "#",
"problemName": "Decimal to any base conversion"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/time-to-words3728/1",
"solutionLink": "#",
"problemName": "Time to Words"
}
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/automorphic-number4721/1",
"solutionLink": "#",
"problemName": "Automorphic Number"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/triangle-shrinking-downwards0459/1",
"solutionLink": "#",
"problemName": "Triangle shrinking downwards"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/diagonal-sum0158/1",
"solutionLink": "#",
"problemName": "Diagonal sum"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-an-ap1025/1",
"solutionLink": "#",
"problemName": "Sum of an AP"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/area-of-rectange-right-angled-triangle-and-circle2600/1",
"solutionLink": "#",
"problemName": "Area of Rectangle, Right Angled Triangle and Circle"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/find-difference-between-sum-of-diagonals1554/1",
"solutionLink": "#",
"problemName": "Find difference between sum of diagonals"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/front-back-transformation1659/1",
"solutionLink": "#",
"problemName": "Front-Back Transformation - copy"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/addition-of-two-square-matrices4916/1",
"solutionLink": "#",
"problemName": "Addition of two square matrices"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/12-hour-clock-subtraction1708/1",
"solutionLink": "#",
"problemName": "12 hour clock subtraction"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/java-classes-introduction/1",
"solutionLink": "#",
"problemName": "Java Classes Introduction"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/number-of-diagonals1020/1",
"solutionLink": "#",
"problemName": "Number of Diagonals"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/12-hour-clock-addition1206/1",
"solutionLink": "#",
"problemName": "12 hour clock addition"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/checcheck-if-two-given-circles-touch-each-other5038/1",
"solutionLink": "#",
"problemName": "Check if two given circles touch each other"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/combinational-logic1908/1",
"solutionLink": "#",
"problemName": "Combinational Logic"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/java-abstract-keyword/1",
"solutionLink": "#",
"problemName": "Java Abstract keyword"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/compound-interest0235/1",
"solutionLink": "#",
"problemName": "Compound Interest"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/program-to-print-reciprocal-of-letters36233623/1",
"solutionLink": "#",
"problemName": "Program to print reciprocal of letters"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/determine-focal-length-of-a-spherical-mirror5415/1",
"solutionLink": "#",
"problemName": "Determine focal length of a spherical mirror"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/12-hour-clock-multiplication4709/1",
"solutionLink": "#",
"problemName": "12 hour clock Multiplication "
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/number-pattern0517/1",
"solutionLink": "#",
"problemName": "Number Pattern"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/parallel-or-perpendicular4257/1",
"solutionLink": "#",
"problemName": "Parallel or Perpendicular?"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/decimal-to-any-base-conversion2440/1",
"solutionLink": "#",
"problemName": "Decimal to any base conversion"
},
{
"difficulty": "School",
"gfgLink": "https://www.geeksforgeeks.org/problems/time-to-words3728/1",
"solutionLink": "#",
"problemName": "Time to Words"
}
]

<Table
<Table
title=""
data={problems}
isSorted={false}
collectionLink="https://www.geeksforgeeks.org/"
/>

Now, you can see the list of problems in a table format. You can click on the problem link to view the problem on the GeeksforGeeks website. You can also click on the solution link to view the solution of the problem.
Now, you can see the list of problems in a table format. You can click on the problem link to view the problem on the GeeksforGeeks website. You can also click on the solution link to view the solution of the problem.
4 changes: 1 addition & 3 deletions dsa-problems/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
title: Data Structures and Algorithms Problems
sidebar_label: DSA Problems
sidebar_position: 1

---

DSA Problems are a collection of problems that are frequently asked in coding interviews. These problems are categorized based on the data structures and algorithms they use. The problems are available in multiple programming languages like C++, Java, Python, and JavaScript. The problems are also available in the form of video tutorials and solutions.


## What is Data Structures and Algorithms?

Data Structures and Algorithms are the building blocks of computer science. Data structures are a way of organizing and storing data in a computer so that it can be accessed and modified efficiently. Algorithms are a set of instructions that are used to perform a specific task. Data structures and algorithms are used to solve complex problems in computer science and software development.
Expand Down Expand Up @@ -49,4 +47,4 @@ You can click on the links above to view the problems in each category. You can

## Conclusion

Data Structures and Algorithms are an important part of computer science and software development. By learning and practicing data structures and algorithms, you can improve your problem-solving skills and become a better programmer. The problems available on this website are a great resource for practicing data structures and algorithms and preparing for coding interviews. I hope you find these problems helpful in your journey of learning data structures and algorithms.
Data Structures and Algorithms are an important part of computer science and software development. By learning and practicing data structures and algorithms, you can improve your problem-solving skills and become a better programmer. The problems available on this website are a great resource for practicing data structures and algorithms and preparing for coding interviews. I hope you find these problems helpful in your journey of learning data structures and algorithms.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ tags:
description: "This is a solution to the Excel Sheet Column Number on LeetCode."
---


## Problem Description

Given a string **columnTitle** that represents the column title as appears in an Excel sheet, return its corresponding column number.
Expand All @@ -22,11 +21,10 @@ C -> 3
...
Z -> 26
AA -> 27
AB -> 28
AB -> 28
...
```


### Examples

**Example 1:**
Expand Down Expand Up @@ -54,18 +52,18 @@ AB -> 28
## Solution for Best Time to Buy and Sell Stock Problem

### Intuition

The intuition behind the solution is to treat each letter as a digit in a base-26 number system, where 'A' represents 1, 'B' represents 2, ..., 'Z' represents 26. The solution then iterates through each character in the column title, calculates the numeric value of the corresponding letter, and accumulates the result by considering the positional weight of each letter.

### Approach

- Initialize variables x and ans to keep track of the positional weight and the accumulated result, respectively.
- Iterate through each character s in the columnTitle.
- Convert the character s to its numeric representation by using the ord function (ASCII value) and subtracting 64 (since 'A' corresponds to 65 in ASCII).
- Update the result (ans) by adding the product of the numeric representation, positional weight (26**x), and decrease the positional weight x by 1.
- Update the result (ans) by adding the product of the numeric representation, positional weight (26\*\*x), and decrease the positional weight x by 1.
- Repeat this process for each character in the column title.
- Return the final accumulated result.


### Code in Different languages

#### Code in C++
Expand All @@ -87,7 +85,7 @@ public:
}
};


```

```python
Expand All @@ -102,7 +100,7 @@ class Solution:
x -= 1

return ans

```

### Complexity Analysis
Expand Down
Loading
Loading