diff --git a/.github/workflows/lighthouse-report.yml b/.github/workflows/lighthouse-report.yml
index 458152b6b..fa834a4bf 100644
--- a/.github/workflows/lighthouse-report.yml
+++ b/.github/workflows/lighthouse-report.yml
@@ -44,10 +44,6 @@ jobs:
http://localhost:3000/docs/category/javascript
http://localhost:3000/courses
http://localhost:3000/courses/category/reactjs
- http://localhost:3000/dsa-problems
- http://localhost:3000/dsa-problems/category/leetcode-problems
- http://localhost:3000/dsa-solutions
- http://localhost:3000/dsa-solutions/category/leetcode-solutions
http://localhost:3000/blog
http://localhost:3000/showcase
http://localhost:3000/community
diff --git a/docusaurus.config.js b/docusaurus.config.js
index 37e7cbdf5..d8984f1c1 100644
--- a/docusaurus.config.js
+++ b/docusaurus.config.js
@@ -176,10 +176,10 @@ const config = {
{
type: "html",
value: `
`,
},
@@ -304,11 +304,11 @@ const config = {
},
{
label: "DSA Problems",
- to: "/dsa-problems/",
+ to: "#",
},
{
label: "DSA Solutions",
- to: "/dsa-solutions/",
+ to: "#",
},
],
},
@@ -525,20 +525,20 @@ const config = {
showLastUpdateTime: true,
},
],
- [
- "@docusaurus/plugin-content-docs",
- /** @type {import('@docusaurus/plugin-content-docs').Options} */
- {
- id: "dsa",
- path: "dsa",
- routeBasePath: "dsa",
- sidebarPath: require.resolve("./sidebarsDSA.js"),
- remarkPlugins: [remarkMath],
- rehypePlugins: [rehypeKatex],
- showLastUpdateAuthor: true,
- showLastUpdateTime: true,
- },
- ],
+ // [
+ // "@docusaurus/plugin-content-docs",
+ // /** @type {import('@docusaurus/plugin-content-docs').Options} */
+ // {
+ // id: "dsa",
+ // path: "dsa",
+ // routeBasePath: "dsa",
+ // sidebarPath: require.resolve("./sidebarsDSA.js"),
+ // remarkPlugins: [remarkMath],
+ // rehypePlugins: [rehypeKatex],
+ // showLastUpdateAuthor: true,
+ // showLastUpdateTime: true,
+ // },
+ // ],
[
"@docusaurus/plugin-content-docs",
/** @type {import('@docusaurus/plugin-content-docs').Options} */
@@ -568,35 +568,7 @@ const config = {
showLastUpdateTime: true,
},
],
- [
- "@docusaurus/plugin-content-docs",
- /** @type {import('@docusaurus/plugin-content-docs').Options} */
- {
- id: "dsa-solutions",
- path: "dsa-solutions",
- routeBasePath: "dsa-solutions",
- editUrl: "#",
- sidebarPath: require.resolve("./sidebarsCommunity.js"),
- remarkPlugins: [remarkMath],
- rehypePlugins: [rehypeKatex],
- showLastUpdateAuthor: true,
- showLastUpdateTime: true,
- },
- ],
- [
- "@docusaurus/plugin-content-docs",
- /** @type {import('@docusaurus/plugin-content-docs').Options} */
- {
- id: "dsa-problems",
- path: "dsa-problems",
- routeBasePath: "dsa-problems",
- sidebarPath: require.resolve("./sidebarsCommunity.js"),
- remarkPlugins: [remarkMath],
- rehypePlugins: [rehypeKatex],
- showLastUpdateAuthor: true,
- showLastUpdateTime: true,
- },
- ],
+
[
path.join(__dirname, "/plugins/my-plugin"),
{
diff --git a/dsa-problems/gfg-problems/_category_.json b/dsa-problems/gfg-problems/_category_.json
deleted file mode 100644
index 24c228f0c..000000000
--- a/dsa-problems/gfg-problems/_category_.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "label": "GFG Problems",
- "position": 3,
- "link": {
- "type": "generated-index",
- "description": "You will learn about the GFG Problems of Data Structures and Algorithms."
- }
- }
\ No newline at end of file
diff --git a/dsa-problems/gfg-problems/basic/0001-0100.md b/dsa-problems/gfg-problems/basic/0001-0100.md
deleted file mode 100644
index 92a728d8f..000000000
--- a/dsa-problems/gfg-problems/basic/0001-0100.md
+++ /dev/null
@@ -1,622 +0,0 @@
----
-id: 0001-0100
-title: GFG basic problems 0001-0100
-sidebar_label: 0001-0100
-keywords:
- - gfg problems
- - gfg problems basic
- - gfg problems problems
----
-
-
-export const problems = [
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/binary-search-1587115620/1",
- "solutionLink": "#",
- "problemName": "Binary Search"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/peak-element/1",
- "solutionLink": "#",
- "problemName": "Peak element"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/power-of-2-1587115620/1",
- "solutionLink": "#",
- "problemName": "Power of 2"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/union-of-two-arrays3538/1",
- "solutionLink": "#",
- "problemName": "Union of two arrays"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/reverse-a-string/1",
- "solutionLink": "#",
- "problemName": "Reverse a String"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/search-an-element-in-an-array-1587115621/1",
- "solutionLink": "#",
- "problemName": "Search an Element in an array"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-if-two-arrays-are-equal-or-not3847/1",
- "solutionLink": "#",
- "problemName": "Check if two arrays are equal or not"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/array-subset-of-another-array2317/1",
- "solutionLink": "#",
- "problemName": "Array Subset of another array"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/reverse-array-in-groups0255/1",
- "solutionLink": "#",
- "problemName": "Reverse array in groups"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/cyclically-rotate-an-array-by-one2614/1",
- "solutionLink": "#",
- "problemName": "Cyclically rotate an array by one"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-minimum-and-maximum-element-in-an-array4428/1",
- "solutionLink": "#",
- "problemName": "Find minimum and maximum element in an array"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/prime-number2314/1",
- "solutionLink": "#",
- "problemName": "Prime Number"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/largest-element-in-array4009/1",
- "solutionLink": "#",
- "problemName": "Largest Element in Array"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/print-first-n-fibonacci-numbers1002/1",
- "solutionLink": "#",
- "problemName": "Print first n Fibonacci Numbers"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/who-will-win-1587115621/1",
- "solutionLink": "#",
- "problemName": "Searching an element in a sorted array"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/linked-list-insertion-1587115620/1",
- "solutionLink": "#",
- "problemName": "Linked List Insertion"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-element-in-bst/1",
- "solutionLink": "#",
- "problemName": "Minimum element in BST"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/immediate-smaller-element1142/1",
- "solutionLink": "#",
- "problemName": "Immediate Smaller Element"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/implement-strstr/1",
- "solutionLink": "#",
- "problemName": "Implement strstr"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/implement-stack-using-array/1",
- "solutionLink": "#",
- "problemName": "Implement stack using array"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-nodes-of-linked-list/1",
- "solutionLink": "#",
- "problemName": "Count nodes of linked list"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/preorder-traversal/1",
- "solutionLink": "#",
- "problemName": "Preorder Traversal"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/circular-linked-list/1",
- "solutionLink": "#",
- "problemName": "Check If Circular Linked List"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/inorder-traversal/1",
- "solutionLink": "#",
- "problemName": "Inorder Traversal"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/implement-queue-using-array/1",
- "solutionLink": "#",
- "problemName": "Implement Queue using array"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-squares3649/1",
- "solutionLink": "#",
- "problemName": "Count Squares"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/print-linked-list-elements/1",
- "solutionLink": "#",
- "problemName": "Print Linked List elements"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/implement-stack-using-linked-list/1",
- "solutionLink": "#",
- "problemName": "Implement Stack using Linked List"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/factorial5739/1",
- "solutionLink": "#",
- "problemName": "Factorial"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/identical-linked-lists/1",
- "solutionLink": "#",
- "problemName": "Identical Linked Lists"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/searching-a-number0324/1",
- "solutionLink": "#",
- "problemName": "Searching a number"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sort-the-array0055/1",
- "solutionLink": "#",
- "problemName": "Sort The Array"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/postorder-traversal/1",
- "solutionLink": "#",
- "problemName": "Postorder Traversal"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/lcm-and-gcd4516/1",
- "solutionLink": "#",
- "problemName": "LCM And GCD"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/reversal-algorithm5340/1",
- "solutionLink": "#",
- "problemName": "Rotating an Array"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/binary-array-sorting-1587115620/1",
- "solutionLink": "#",
- "problemName": "Binary Array Sorting"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-leaves-in-binary-tree/1",
- "solutionLink": "#",
- "problemName": "Count Leaves in Binary Tree"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/third-largest-element/1",
- "solutionLink": "#",
- "problemName": "Third largest element"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/insert-in-middle-of-linked-list/1",
- "solutionLink": "#",
- "problemName": "Insert in Middle of Linked List"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-occuring-character-1587115620/1",
- "solutionLink": "#",
- "problemName": "Maximum Occuring Character"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-odd-even/1",
- "solutionLink": "#",
- "problemName": "Count Odd Even"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/implement-queue-using-linked-list/1",
- "solutionLink": "#",
- "problemName": "Implement Queue using Linked List"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/max-min/1",
- "solutionLink": "#",
- "problemName": "Max Min"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/bit-difference-1587115620/1",
- "solutionLink": "#",
- "problemName": "Bit Difference"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-the-smallest-and-second-smallest-element-in-an-array3226/1",
- "solutionLink": "#",
- "problemName": "Find the smallest and second smallest element in an array"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/c-hello-world3402/1",
- "solutionLink": "#",
- "problemName": "C++ Hello World"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/last-index-of-15847/1",
- "solutionLink": "#",
- "problemName": "Last index of One"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/missing-number4257/1",
- "solutionLink": "#",
- "problemName": "Missing number"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/closest-number5728/1",
- "solutionLink": "#",
- "problemName": "Closest Number"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/node-at-a-given-index-in-linked-list/1",
- "solutionLink": "#",
- "problemName": "Node at a given index in linked list"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/uncommon-characters4932/1",
- "solutionLink": "#",
- "problemName": "Uncommon characters"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/search-a-node-in-bst/1",
- "solutionLink": "#",
- "problemName": "Search a node in BST"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/product-of-array-element/1",
- "solutionLink": "#",
- "problemName": "Product of array elements"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/consecutive-elements2306/1",
- "solutionLink": "#",
- "problemName": "Remove Consecutive Characters"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/middle-of-three2926/1",
- "solutionLink": "#",
- "problemName": "Middle of Three"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/replace-all-0s-with-5/1",
- "solutionLink": "#",
- "problemName": "Replace all 0's with 5"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/insert-a-node-in-doubly-linked-list/1",
- "solutionLink": "#",
- "problemName": "Doubly linked list Insertion at given position"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/repeated-character2058/1",
- "solutionLink": "#",
- "problemName": "Repeated Character"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-the-odd-occurence4820/1",
- "solutionLink": "#",
- "problemName": "Exceptionally odd"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-first-n-terms5843/1",
- "solutionLink": "#",
- "problemName": "Sum of first n terms"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/binary-string-1587115620/1",
- "solutionLink": "#",
- "problemName": "Binary String"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/linked-list-length-even-or-odd/1",
- "solutionLink": "#",
- "problemName": "Linked List Length Even or Odd?"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-position-of-set-bit3706/1",
- "solutionLink": "#",
- "problemName": "Find position of set bit"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/remove-common-characters-and-concatenate-1587115621/1",
- "solutionLink": "#",
- "problemName": "Remove common characters and concatenate"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/square-pattern/1",
- "solutionLink": "#",
- "problemName": "Pattern 1"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/anagram-of-string/1",
- "solutionLink": "#",
- "problemName": "Anagram of String"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/number-is-sparse-or-not-1587115620/1",
- "solutionLink": "#",
- "problemName": "Number is sparse or not"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/delete-alternate-nodes/1",
- "solutionLink": "#",
- "problemName": "Delete Alternate Nodes"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/ishaan-loves-chocolates2156/1",
- "solutionLink": "#",
- "problemName": "Ishaan Loves Chocolates"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/binary-number-to-decimal-number3525/1",
- "solutionLink": "#",
- "problemName": "Binary number to decimal number"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-if-a-string-is-isogram-or-not-1587115620/1",
- "solutionLink": "#",
- "problemName": "Check if a string is Isogram or not"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/size-of-binary-tree/1",
- "solutionLink": "#",
- "problemName": "Size of Binary Tree"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/elements-in-the-range2834/1",
- "solutionLink": "#",
- "problemName": "Elements in the Range"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/game-with-nos3123/1",
- "solutionLink": "#",
- "problemName": "Game with nos"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-numbers-in-string-1587115621/1",
- "solutionLink": "#",
- "problemName": "Sum of numbers in string"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/start-coding/1",
- "solutionLink": "#",
- "problemName": "Start Coding"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/angle-between-hour-and-minute-hand0545/1",
- "solutionLink": "#",
- "problemName": "Angle between hour and minute hand"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sorted-matrix2333/1",
- "solutionLink": "#",
- "problemName": "Sorted matrix"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-for-subsequence4930/1",
- "solutionLink": "#",
- "problemName": "Check for subsequence"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/multiply-left-and-right-array-sum1555/1",
- "solutionLink": "#",
- "problemName": "Multiply left and right array sum."
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/leap-year0943/1",
- "solutionLink": "#",
- "problemName": "Leap Year"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-nk-th-node-in-linked-list/1",
- "solutionLink": "#",
- "problemName": "Find n/k th node in Linked list"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/first-and-last-occurrences-of-x2041/1",
- "solutionLink": "#",
- "problemName": "First and last occurrences of X"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-money2855/1",
- "solutionLink": "#",
- "problemName": "Maximum money"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/triangle-pattern/1",
- "solutionLink": "#",
- "problemName": "Pattern 5"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/balanced-array07200720/1",
- "solutionLink": "#",
- "problemName": "Balanced Array"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/product-of-maximum-in-first-array-and-minimum-in-second3943/1",
- "solutionLink": "#",
- "problemName": "Product of maximum in first array and minimum in second"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-the-fine4353/1",
- "solutionLink": "#",
- "problemName": "Find the fine"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/ways-to-tile-a-floor5836/1",
- "solutionLink": "#",
- "problemName": "Ways To Tile A Floor"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/index-of-first-1-in-a-sorted-array-of-0s-and-1s4048/1",
- "solutionLink": "#",
- "problemName": "Index of first 1 in a sorted array of 0s and 1s"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/remove-character3815/1",
- "solutionLink": "#",
- "problemName": "Remove character"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/print-first-letter-of-every-word-in-the-string3632/1",
- "solutionLink": "#",
- "problemName": "Print first letter of every word in the string"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/replace-all-0-with-5-in-an-input-integer/1",
- "solutionLink": "#",
- "problemName": "Replace all 0's with 5"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/triangle-number-1661489840/1",
- "solutionLink": "#",
- "problemName": "Pattern 6"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/set-kth-bit3724/1",
- "solutionLink": "#",
- "problemName": "Set kth bit"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/gcd-of-array0614/1",
- "solutionLink": "#",
- "problemName": "GCD of Array"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/greater-on-right-side4305/1",
- "solutionLink": "#",
- "problemName": "Greater on right side"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/fighting-the-darkness3949/1",
- "solutionLink": "#",
- "problemName": "Fighting the darkness"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/triangle-pattern-1661718013/1",
- "solutionLink": "#",
- "problemName": "Pattern 10"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-all-factorial-numbers-less-than-or-equal-to-n3548/1",
- "solutionLink": "#",
- "problemName": "Find all factorial numbers less than or equal to N"
- }
-]
-
-
-
-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 LeetCode website. You can also click on the solution link to view the solution of the problem.
\ No newline at end of file
diff --git a/dsa-problems/gfg-problems/basic/0101-0200.md b/dsa-problems/gfg-problems/basic/0101-0200.md
deleted file mode 100644
index f31d5b8d8..000000000
--- a/dsa-problems/gfg-problems/basic/0101-0200.md
+++ /dev/null
@@ -1,622 +0,0 @@
----
-id: 0101-0200
-title: GFG basic problems 0101-0200
-sidebar_label: 0101-0200
-keywords:
- - gfg problems
- - gfg problems basic
- - gfg problems problems
----
-
-
-export const problems = [
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-binary-tree/1",
- "solutionLink": "#",
- "problemName": "Sum of Binary Tree"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/triangle-pattern-1661492263/1",
- "solutionLink": "#",
- "problemName": "Pattern 7"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-the-sum-of-last-n-nodes-of-the-linked-list/1",
- "solutionLink": "#",
- "problemName": "Find the Sum of Last N nodes of the Linked List"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-product-of-two-numbers2730/1",
- "solutionLink": "#",
- "problemName": "Maximum product of two numbers"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sort-in-specific-order2422/1",
- "solutionLink": "#",
- "problemName": "Sort in specific order"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/operating-an-array/1",
- "solutionLink": "#",
- "problemName": "Operating an array"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-if-a-number-is-power-of-another-number5442/1",
- "solutionLink": "#",
- "problemName": "Check if a number is power of another number"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-in-struct-array/0",
- "solutionLink": "/dsa-solutions/gfg-solutions/Basic/maximum-in-struct-array",
- "problemName": "Maximum in Struct Array"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/anagram-palindrome4720/1",
- "solutionLink": "#",
- "problemName": "Anagram Palindrome"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/merge-two-strings2736/1",
- "solutionLink": "#",
- "problemName": "Merge two strings"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/print-the-kth-digit3520/1",
- "solutionLink": "#",
- "problemName": "Print the Kth Digit"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/gf-series3535/1",
- "solutionLink": "#",
- "problemName": "G.F Series"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/modular-node/1",
- "solutionLink": "#",
- "problemName": "Modular Node"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-non-leaf-nodes-in-tree/1",
- "solutionLink": "#",
- "problemName": "Count Non-Leaf Nodes in Tree"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/triangle-pattern-1661493231/1",
- "solutionLink": "#",
- "problemName": "Pattern 8"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/extract-maximum2943/1",
- "solutionLink": "#",
- "problemName": "Extract Maximum"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/keypad-typing0119/1",
- "solutionLink": "#",
- "problemName": "Keypad typing"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/doubling-the-value4859/1",
- "solutionLink": "#",
- "problemName": "Doubling the value"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-unique-element2632/1",
- "solutionLink": "#",
- "problemName": "Find unique element"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/smallest-divisible-number/1",
- "solutionLink": "#",
- "problemName": "Smallest divisible number"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/finding-position2223/1",
- "solutionLink": "#",
- "problemName": "Finding Position"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/good-or-bad-string1417/1",
- "solutionLink": "#",
- "problemName": "Good or Bad string"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/zero-converter-python/1",
- "solutionLink": "#",
- "problemName": "Zero Converter - Python"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-number-of-numbers/1",
- "solutionLink": "#",
- "problemName": "Find Number of Numbers"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-set-bits5408/1",
- "solutionLink": "#",
- "problemName": "Check set bits"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/total-count2415/1",
- "solutionLink": "#",
- "problemName": "Total count"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/c-program-to-remove-consonants-from-a-string1945/1",
- "solutionLink": "#",
- "problemName": "Remove consonants from a string"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/change-the-string3541/1",
- "solutionLink": "#",
- "problemName": "Change the string"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/segregate-even-and-odd-numbers4629/1",
- "solutionLink": "#",
- "problemName": "Segregate Even and Odd numbers"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/red-or-green5711/1",
- "solutionLink": "#",
- "problemName": "Red OR Green"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-zeros-in-a-sorted-matrix/1",
- "solutionLink": "#",
- "problemName": "Count zeros in a sorted matrix"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/stack-designer/1",
- "solutionLink": "/dsa-solutions/gfg-solutions/Basic/stack-designer",
- "problemName": "Stack designer"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sort-a-string2943/1",
- "solutionLink": "#",
- "problemName": "Sort a String"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-difference-pair5444/1",
- "solutionLink": "#",
- "problemName": "Minimum difference pair"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-repeating-number4858/1",
- "solutionLink": "#",
- "problemName": "Maximum repeating number"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-the-characters1821/1",
- "solutionLink": "#",
- "problemName": "Count the characters"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/print-an-array-in-pendulum-arrangement4004/1",
- "solutionLink": "#",
- "problemName": "Print an array in Pendulum Arrangement"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/data-type-1666706751/1",
- "solutionLink": "#",
- "problemName": "Data Type"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/triangle-pattern-1661718455/1",
- "solutionLink": "#",
- "problemName": "Pattern 11"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/type-of-array4605/1",
- "solutionLink": "#",
- "problemName": "Type of array"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/string-with-numbers-at-its-end5749/1",
- "solutionLink": "#",
- "problemName": "String with numbers at its end"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-product-of-k-integers2553/1",
- "solutionLink": "#",
- "problemName": "Minimum Product of k Integers"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/the-size-of/1",
- "solutionLink": "#",
- "problemName": "The Size of"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/c-basic-data-types3128/1",
- "solutionLink": "#",
- "problemName": "C++ Basic Data types"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/triangle-pattern-1661718712/1",
- "solutionLink": "#",
- "problemName": "Pattern 13"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/permutations-in-array1747/1",
- "solutionLink": "#",
- "problemName": "Permutations in array"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/queue-designer/1",
- "solutionLink": "#",
- "problemName": "Queue Push & Pop"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/professor-and-parties2000/1",
- "solutionLink": "#",
- "problemName": "Professor and Parties"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sort-and-reverse-vector/1",
- "solutionLink": "#",
- "problemName": "Sort and Reverse Vector"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/play-with-an-array/1",
- "solutionLink": "#",
- "problemName": "Play with an array"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/add-two-fractions/1",
- "solutionLink": "#",
- "problemName": "Add two fractions"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/height-of-heap5025/1",
- "solutionLink": "#",
- "problemName": "Height of Heap"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/matching-pair5320/1",
- "solutionLink": "#",
- "problemName": "Matching Pair"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/longest-substring-containing-1/1",
- "solutionLink": "#",
- "problemName": "longest substring containing '1'"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/circular-linked-list-traversal/1",
- "solutionLink": "#",
- "problemName": "Circular Linked List Traversal"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/java-1-d-and-2-d-array2952/1",
- "solutionLink": "#",
- "problemName": "Java 1-d and 2-d Array"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-pair-sum5956/1",
- "solutionLink": "#",
- "problemName": "Count pair sum"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sort-the-string-in-descending-order3542/1",
- "solutionLink": "#",
- "problemName": "Sort the string in descending order"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/reverse-sub-array5620/1",
- "solutionLink": "#",
- "problemName": "Reverse sub array"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/positive-and-negative-elements4613/1",
- "solutionLink": "#",
- "problemName": "Positive and negative elements"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/remove-duplicates-from-unsorted-array4141/1",
- "solutionLink": "#",
- "problemName": "Remove Duplicates from unsorted array"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/logical-operators/1",
- "solutionLink": "#",
- "problemName": "Logical Operators"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/geek-and-coffee-shop5721/1",
- "solutionLink": "#",
- "problemName": "Half N by M"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/c-stl-set-1-vector/1",
- "solutionLink": "#",
- "problemName": "C++ STL | Set 1 (vector)"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/toggle-bits-given-range0952/1",
- "solutionLink": "#",
- "problemName": "Toggle bits in the given range"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/set-the-rightmost-unset-bit4436/1",
- "solutionLink": "#",
- "problemName": "Set the rightmost unset bit"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/absolute-difference-11156/1",
- "solutionLink": "#",
- "problemName": "Absolute Difference of 1"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-primes0042/1",
- "solutionLink": "#",
- "problemName": "Sum of primes"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/decimal-to-binary-1587115620/1",
- "solutionLink": "#",
- "problemName": "Decimal to binary"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/thief-try-to-excape0710/1",
- "solutionLink": "#",
- "problemName": "Thief trying to escape"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/anshumans-favourite-number2029/1",
- "solutionLink": "#",
- "problemName": "Anshuman's Favourite Number"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/alternative-sorting1311/1",
- "solutionLink": "#",
- "problemName": "Alternative Sorting"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/product-is-even-or-odd3020/1",
- "solutionLink": "#",
- "problemName": "Product is even or odd?"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/remove-repeated-digits-in-a-given-number4014/1",
- "solutionLink": "#",
- "problemName": "Remove repeated digits in a given number"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/odd-to-even0537/1",
- "solutionLink": "#",
- "problemName": "Odd to Even"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/front-to-back/1",
- "solutionLink": "#",
- "problemName": "Front to Back"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/pairwise-consecutive-elements/1",
- "solutionLink": "#",
- "problemName": "Pairwise Consecutive Elements"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-distinct-elements4801/1",
- "solutionLink": "#",
- "problemName": "Sum of distinct elements"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/repetitive-addition-of-digits2221/1",
- "solutionLink": "#",
- "problemName": "Repetitive Addition Of Digits"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-duplicates-under-given-constraints0856/1",
- "solutionLink": "#",
- "problemName": "Find duplicates under given constraints"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-if-the-door-is-open-or-closed2013/1",
- "solutionLink": "#",
- "problemName": "Check if the door is open or closed"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/remainder-with-7/1",
- "solutionLink": "#",
- "problemName": "Remainder with 7"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/the-penalty-shootout3810/1",
- "solutionLink": "#",
- "problemName": "The Penalty Shootout"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-fai-aj-over-all-pairs-in-an-array-of-n-integers4057/1",
- "solutionLink": "#",
- "problemName": "Sum of f(a[i], a[j]) over all pairs in an array of n integers"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/middle-pattern/1",
- "solutionLink": "#",
- "problemName": "Middle Pattern"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/welcome-aboard-python/1",
- "solutionLink": "#",
- "problemName": "Welcome aboard - Python"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-if-divisible-by-43813/1",
- "solutionLink": "#",
- "problemName": "Check if divisible by 4"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-difference-among-k5805/1",
- "solutionLink": "#",
- "problemName": "Minimum Difference among K"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/squares-in-a-matrix5716/1",
- "solutionLink": "#",
- "problemName": "Squares in a Matrix"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/nth-even-fibonacci-number1119/1",
- "solutionLink": "#",
- "problemName": "Nth Even Fibonacci Number"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/last-index-of-a-character-in-the-string4516/1",
- "solutionLink": "#",
- "problemName": "Last index of a character in the string"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/inverse-permutation0344/1",
- "solutionLink": "#",
- "problemName": "Inverse Permutation"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/unique-numbers3019/1",
- "solutionLink": "#",
- "problemName": "Unique Numbers"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sums-of-i-th-row-and-i-th-column3054/1",
- "solutionLink": "#",
- "problemName": "Sums of i-th row and i-th column"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/midori-and-chocolates2438/1",
- "solutionLink": "#",
- "problemName": "Midori and chocolates"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/power-of-four/1",
- "solutionLink": "#",
- "problemName": "Power of Four"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-if-the-number-is-fibonacci4654/1",
- "solutionLink": "#",
- "problemName": "Check if the number is Fibonacci"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/encrypt-the-string-10337/1",
- "solutionLink": "#",
- "problemName": "Encrypt the string - 1"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/remove-all-characters-other-than-alphabets4923/1",
- "solutionLink": "#",
- "problemName": "Remove all characters other than alphabets"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/rearrange-the-array5802/1",
- "solutionLink": "#",
- "problemName": "Rearrange the array"
- }
-]
-
-
-
-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 LeetCode website. You can also click on the solution link to view the solution of the problem.
\ No newline at end of file
diff --git a/dsa-problems/gfg-problems/basic/0201-0300.md b/dsa-problems/gfg-problems/basic/0201-0300.md
deleted file mode 100644
index 70b793275..000000000
--- a/dsa-problems/gfg-problems/basic/0201-0300.md
+++ /dev/null
@@ -1,623 +0,0 @@
----
-id: 0201-0300
-title: GFG basic problems 0201-0300
-sidebar_label: 0201-0300
-keywords:
- - gfg problems
- - gfg problems basic
- - gfg problems problems
----
-
-
-export const problems = [
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimize-string-value1010/1",
- "solutionLink": "#",
- "problemName": "Minimize string value"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-product-of-x-and-y-with-floornx-y3711/1",
- "solutionLink": "#",
- "problemName": "Sum of product of x and y with floor(n/x) = y"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/form-largest-number-from-digits5430/1",
- "solutionLink": "#",
- "problemName": "Form largest number from digits"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/pairs-of-prime-number2612/1",
- "solutionLink": "#",
- "problemName": "Pairs of prime number"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-n-th-term-in-the-series3926/1",
- "solutionLink": "#",
- "problemName": "Find N-th term in the series"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/pattern-jumping4855/1",
- "solutionLink": "#",
- "problemName": "Pattern Jumping"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/java-operatorsarithmetic-set-12417/1",
- "solutionLink": "#",
- "problemName": "Java Operators(Arithmetic) | Set 1"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/length-of-last-word5721/1",
- "solutionLink": "#",
- "problemName": "Length of Last word"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-array-puzzle/1",
- "solutionLink": "#",
- "problemName": "Sum Array Puzzle"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-the-number-which-contain-the-digit-d4144/1",
- "solutionLink": "#",
- "problemName": "Find the Number which contain the digit d"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/the-problem-of-identical-arrays3229/1",
- "solutionLink": "#",
- "problemName": "The problem of identical arrays"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/longest-increasing-subarray3811/1",
- "solutionLink": "#",
- "problemName": "Longest increasing subarray"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-arithmetic-progression1842/1",
- "solutionLink": "#",
- "problemName": "Check Arithmetic Progression"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/three-distinct-factors5613/1",
- "solutionLink": "#",
- "problemName": "Three distinct factors"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/difference-series4345/1",
- "solutionLink": "#",
- "problemName": "Difference series"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/mega-sale1431/1",
- "solutionLink": "#",
- "problemName": "Mega Sale"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/substrings-with-similar-first-and-last-characters3644/1",
- "solutionLink": "#",
- "problemName": "Substrings with same first and last characters"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/doctors-clinic0431/1",
- "solutionLink": "#",
- "problemName": "Doctors Clinic"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-number-of-elements-between-two-given-elements-in-array4044/1",
- "solutionLink": "#",
- "problemName": "Count number of elements between two given elements in array"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/c-call-by-reference/1",
- "solutionLink": "#",
- "problemName": "C++ Call by reference"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/fibonacci-to-n0811/1",
- "solutionLink": "#",
- "problemName": "Fibonacci to N"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-triplet-sum-in-array0129/1",
- "solutionLink": "#",
- "problemName": "Maximum triplet sum in array"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/c-stl-set-5-queue/1",
- "solutionLink": "#",
- "problemName": "C++ STL | Set 5 (queue)"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-perfect-square5253/1",
- "solutionLink": "#",
- "problemName": "Check perfect square"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sorting-employees5907/1",
- "solutionLink": "#",
- "problemName": "Sorting Employees"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-if-divisible-by-114724/1",
- "solutionLink": "#",
- "problemName": "Check if divisible by 11"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/triplet-family/1",
- "solutionLink": "#",
- "problemName": "Triplet Family"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-if-a-number-can-be-expressed-as-xy1606/1",
- "solutionLink": "#",
- "problemName": "Check if a number can be expressed as x^y"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/string-reversalunpublished-for-now5324/1",
- "solutionLink": "#",
- "problemName": "String Reversal"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-if-given-four-points-form-a-square3026/1",
- "solutionLink": "#",
- "problemName": "Check if given four points form a square"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/c-stl-set-3-map/1",
- "solutionLink": "#",
- "problemName": "C++ STL | Set 3 (map)"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/the-lazy-caterers-problem2527/1",
- "solutionLink": "#",
- "problemName": "The Lazy Caterer's Problem"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/perfect-squares-in-a-range2253/1",
- "solutionLink": "#",
- "problemName": "Perfect Squares in a Range"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/snake-case0219/1",
- "solutionLink": "#",
- "problemName": "Snake Case"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-the-numbers2359/1",
- "solutionLink": "#",
- "problemName": "Digits in a set"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/map-operations/1",
- "solutionLink": "#",
- "problemName": "Map Operations"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-product-pair3608/1",
- "solutionLink": "#",
- "problemName": "Minimum product pair"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/jays-apples2724/1",
- "solutionLink": "#",
- "problemName": "Jay's Apples"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/difference-between-highest-and-lowest-occurrence4613/1",
- "solutionLink": "#",
- "problemName": "Difference between highest and lowest occurrence"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/rock-paper-scissors2830/1",
- "solutionLink": "#",
- "problemName": "Rock Paper Scissors!"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/replace-the-bit3212/1",
- "solutionLink": "#",
- "problemName": "Replace the Bit"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/change-all-even-bits-in-a-number-to-03253/1",
- "solutionLink": "#",
- "problemName": "Change all even bits in a number to 0"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/message-spreading4258/1",
- "solutionLink": "#",
- "problemName": "Message Spreading"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/make-a-distinct-digit-array2007/1",
- "solutionLink": "#",
- "problemName": "Make a Distinct Digit Array"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/mind-game3637/1",
- "solutionLink": "#",
- "problemName": "Mind Game"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/smallest-number-repeating-k-times3239/1",
- "solutionLink": "#",
- "problemName": "Smallest number repeating K times"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/last-duplicate-element-in-a-sorted-array5539/1",
- "solutionLink": "#",
- "problemName": "Last duplicate element in a sorted array"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/java-arraylist5312/1",
- "solutionLink": "#",
- "problemName": "Java Collection | Set 1 (ArrayList) Part-1"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-out-the-team0025/1",
- "solutionLink": "#",
- "problemName": "Binary Shift to Divide"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-perfect-square2503/1",
- "solutionLink": "#",
- "problemName": "Check perfect square"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/set-operations/1",
- "solutionLink": "#",
- "problemName": "Set Operations"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/c-a-speed-breaker5249/1",
- "solutionLink": "#",
- "problemName": "C++ | A Speed Breaker"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/strong-numbers4336/1",
- "solutionLink": "#",
- "problemName": "Strong Numbers"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/the-amazing-number0459/1",
- "solutionLink": "#",
- "problemName": "The amazing number"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-distinct-elements-15115/1",
- "solutionLink": "#",
- "problemName": "Sum of distinct elements for a limited range"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/strong-numbers3315/1",
- "solutionLink": "#",
- "problemName": "Strong Numbers"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sort-the-half-sorted2157/1",
- "solutionLink": "#",
- "problemName": "Sort the Half Sorted"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/print-k-smallest-elements-in-their-original-order5407/1",
- "solutionLink": "#",
- "problemName": "Print K smallest elements in their original order"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/average-count-array2215/1",
- "solutionLink": "#",
- "problemName": "Average Count Array"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/merge-and-sort5821/1",
- "solutionLink": "#",
- "problemName": "Merge and Sort"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/rearranging-array1648/1",
- "solutionLink": "#",
- "problemName": "Rearranging array"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/confused-pappu5749/1",
- "solutionLink": "#",
- "problemName": "Confused pappu"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/zero-number2158/1",
- "solutionLink": "#",
- "problemName": "Duck Number"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/java-anagram-strings3549/1",
- "solutionLink": "#",
- "problemName": "Anagram Strings"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/compare-two-large-numbers3413/1",
- "solutionLink": "#",
- "problemName": "Compare two Large Numbers"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/regex-python/1",
- "solutionLink": "#",
- "problemName": "Regex - Python"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/reverse-a-string-with-spaces-intact5213/1",
- "solutionLink": "#",
- "problemName": "Reverse a string with spaces intact"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-digits-divisibility5311/1",
- "solutionLink": "#",
- "problemName": "Sum of Digits Divisibility"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/smallest-power-of-2-greater-than-or-equal-to-n2630/1",
- "solutionLink": "#",
- "problemName": "Smallest power of 2 greater than or equal to n"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-area2642/1",
- "solutionLink": "#",
- "problemName": "Maximum Area"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/shortest-un-ordered-subarray3634/1",
- "solutionLink": "#",
- "problemName": "Shortest un-ordered subarray"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/parties-and-seats/1",
- "solutionLink": "/dsa-solutions/gfg-solutions/Basic/parties-and-seats",
- "problemName": "Parties and seats"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/reducing-walls4443/1",
- "solutionLink": "#",
- "problemName": "Reducing Walls"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-sorted-rows2702/1",
- "solutionLink": "#",
- "problemName": "Count Sorted Rows"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/missing-number-in-shuffled-array0938/1",
- "solutionLink": "#",
- "problemName": "Missing number in shuffled array"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/krishnamurthy-number1323/1",
- "solutionLink": "#",
- "problemName": "Krishnamurthy number"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/area-of-a-triangle5739/1",
- "solutionLink": "#",
- "problemName": "Area of a triangle"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/celsius-to-fahrenheit-conversion5212/1",
- "solutionLink": "/dsa-solutions/gfg-solutions/Basic/celsius-to-fahrenheit-conversion",
- "problemName": "Celsius to Fahrenheit Conversion"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/largest-product/1",
- "solutionLink": "#",
- "problemName": "Largest product"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/good-string5712/1",
- "solutionLink": "#",
- "problemName": "Good String"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/c-inheritance-introduction/1",
- "solutionLink": "#",
- "problemName": "C++ Inheritance introduction"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/riyas-test1450/1",
- "solutionLink": "#",
- "problemName": "Same frequency in two halves"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/shortest-direction4201/1",
- "solutionLink": "#",
- "problemName": "Shortest direction"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-numbers-divisible-by-m1524/1",
- "solutionLink": "#",
- "problemName": "Count numbers divisible by M"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-a-integer-is-power-of-3-or-not3850/1",
- "solutionLink": "#",
- "problemName": "Check an Integer is power of 3 or not"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/series-x14741/1",
- "solutionLink": "#",
- "problemName": "Series X1"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/the-spider-steps3600/1",
- "solutionLink": "#",
- "problemName": "The Spider Steps"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimize-sum-of-alternate-product2033/1",
- "solutionLink": "#",
- "problemName": "Minimize sum of alternate product"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/factors-sum2016/1",
- "solutionLink": "#",
- "problemName": "Factors Sum"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/finger-game1755/1",
- "solutionLink": "#",
- "problemName": "Finger Game"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-fifth-powers-of-the-first-n-natural-numbers3415/1",
- "solutionLink": "#",
- "problemName": "Sum of fifth powers of the first n natural numbers"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/c-classes-introduction/1",
- "solutionLink": "/dsa-solutions/gfg-solutions/Basic/cpp-classes-introduction",
- "problemName": "C++ Classes Introduction"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/fake-profile3906/1",
- "solutionLink": "#",
- "problemName": "Fake Profile"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/xor-of-all-elements0736/1",
- "solutionLink": "#",
- "problemName": "XOR of all elements"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/product-sum3012/1",
- "solutionLink": "#",
- "problemName": "Product Sum"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/magical-string3653/1",
- "solutionLink": "#",
- "problemName": "Magical String[Duplicate Problem]"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/java-collection-set-3-hashmap/1",
- "solutionLink": "#",
- "problemName": "HashMap Operations"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/student-record1752/1",
- "solutionLink": "#",
- "problemName": "Student record"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/making-elements-distinct3139/1",
- "solutionLink": "#",
- "problemName": "Making elements distinct"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-integer-value1434/1",
- "solutionLink": "#",
- "problemName": "Maximum Integer Value "
- }
-]
-
-
-
-
-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.
\ No newline at end of file
diff --git a/dsa-problems/gfg-problems/basic/0301-0400.md b/dsa-problems/gfg-problems/basic/0301-0400.md
deleted file mode 100644
index 4e7517b52..000000000
--- a/dsa-problems/gfg-problems/basic/0301-0400.md
+++ /dev/null
@@ -1,623 +0,0 @@
----
-id: 0301-0400
-title: GFG basic problems 0301-0400
-sidebar_label: 0301-0400
-keywords:
- - gfg problems
- - gfg problems basic
- - gfg problems problems
----
-
-
-export const problems = [
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/ishaans-internship4400/1",
- "solutionLink": "#",
- "problemName": "Ishaan's Internship"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sort-first-half-in-ascending-and-second-half-in-descending1714/1",
- "solutionLink": "#",
- "problemName": "Sort first half in ascending and second half in descending"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sandwiched-vowels5158/1",
- "solutionLink": "#",
- "problemName": "Sandwiched_Vowels"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/repeated-ids0116/1",
- "solutionLink": "#",
- "problemName": "Repeated IDs"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/countries-at-war2936/1",
- "solutionLink": "#",
- "problemName": "Countries at war"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/special-series-sum0903/1",
- "solutionLink": "#",
- "problemName": "Special Series Sum"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/perfect-square-string5914/1",
- "solutionLink": "#",
- "problemName": "Perfect Square String"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/parity-of-unsigned-integer4247/1",
- "solutionLink": "#",
- "problemName": "Parity of unsigned integer"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/common-divisors4712/1",
- "solutionLink": "#",
- "problemName": "Common Divisors"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/multiply-2-matrices4144/1",
- "solutionLink": "#",
- "problemName": "Multiply 2 matrices"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/fibonacci-in-the-array5817/1",
- "solutionLink": "#",
- "problemName": "Fibonacci in the array"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-zero3710/1",
- "solutionLink": "#",
- "problemName": "Count zero"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/java-hashmap1033/1",
- "solutionLink": "#",
- "problemName": "Java Collection | Set 3 (HashMap) Part-1"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/how-many-pizzas4832/1",
- "solutionLink": "#",
- "problemName": "How many pizzas ?"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/why-is-melody-so-chocolaty0446/1",
- "solutionLink": "#",
- "problemName": "Why is Melody so chocolaty?"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/squares-difference0939/1",
- "solutionLink": "#",
- "problemName": "Squares Difference"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/perfect-reversible-string4828/1",
- "solutionLink": "#",
- "problemName": "Perfect Reversible String"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/java-iterator2702/1",
- "solutionLink": "#",
- "problemName": "Java Iterator"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-if-divisible-by-52730/1",
- "solutionLink": "#",
- "problemName": "Check if divisible by 5"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-perimeter-of-triangle-from-array4322/1",
- "solutionLink": "#",
- "problemName": "Maximum Perimeter of Triangle from array"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/repeated-sum-of-digits3955/1",
- "solutionLink": "#",
- "problemName": "Repeated sum of digits"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/tough-competitors0540/1",
- "solutionLink": "#",
- "problemName": "Tough Competitors"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/equal-sum-and-xor/1",
- "solutionLink": "#",
- "problemName": "Equal Sum and XOR"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-divisors3601/1",
- "solutionLink": "#",
- "problemName": "Sum of divisors"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/a-guy-with-a-mental-problem1604/1",
- "solutionLink": "#",
- "problemName": "A guy with a mental problem"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/perfect-array2344/1",
- "solutionLink": "#",
- "problemName": "Perfect Array"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-the-position-of-m-th-item1723/1",
- "solutionLink": "#",
- "problemName": "Find the position of M-th item"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/c-stl-set-6-set/1",
- "solutionLink": "#",
- "problemName": "C++ STL | Set 6 (set)"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/the-or-gate3122/1",
- "solutionLink": "#",
- "problemName": "The OR Gate"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/c-stl-set-8-unordered-set/1",
- "solutionLink": "#",
- "problemName": "C++ STL | Set 8 (unordered set)"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/c-stl-set-4-stack/1",
- "solutionLink": "#",
- "problemName": "C++ STL | Set 4 (stack)"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-diagonals-1587115621/1",
- "solutionLink": "#",
- "problemName": "Sum of diagonals"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/pattern-13116/1",
- "solutionLink": "#",
- "problemName": "Pattern-1"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/even-occurring-elements4332/1",
- "solutionLink": "#",
- "problemName": "Even occurring elements"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-binary-string0402/1",
- "solutionLink": "#",
- "problemName": "Check Binary String"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/elements-before-which-no-element-is-bigger0602/1",
- "solutionLink": "#",
- "problemName": "Elements before which no element is bigger"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/product-of-factors-of-number4757/1",
- "solutionLink": "#",
- "problemName": "Product of factors of number"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/disarium-number1045/1",
- "solutionLink": "#",
- "problemName": "Disarium Number"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/multiples-power2816/1",
- "solutionLink": "#",
- "problemName": "Multiples Power"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/friendly-array2009/1",
- "solutionLink": "#",
- "problemName": "Friendly Array"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-sum-of-even-factors-of-a-number1725/1",
- "solutionLink": "#",
- "problemName": "Find sum of even factors of a number"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-pairs-odd-xor0308/1",
- "solutionLink": "#",
- "problemName": "Count Pairs Odd Xor"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-digits-prime-non-prime1935/1",
- "solutionLink": "#",
- "problemName": "Sum of Digits Prime/Non-Prime "
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-if-divisible-by-363149/1",
- "solutionLink": "#",
- "problemName": "Check if divisible by 36"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/pronic-number0729/1",
- "solutionLink": "#",
- "problemName": "Pronic Number"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-the-sequence1346/1",
- "solutionLink": "#",
- "problemName": "Find The Sequence"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-sum-of-two-elements-from-two-arrays0253/1",
- "solutionLink": "#",
- "problemName": "Minimum sum of two elements from two arrays"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/max-min-conversion5257/1",
- "solutionLink": "#",
- "problemName": "Max-Min conversion"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-the-remainder1439/1",
- "solutionLink": "#",
- "problemName": "Find the remainder "
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/the-and-gate1231/1",
- "solutionLink": "#",
- "problemName": "The AND Gate"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/square-divisors4319/1",
- "solutionLink": "#",
- "problemName": "Square Divisors"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/ones-complement5928/1",
- "solutionLink": "#",
- "problemName": "One's Complement"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/lcm-of-given-array-elements3919/1",
- "solutionLink": "#",
- "problemName": "LCM of given array elements"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/tiger-zinda-hai5531/1",
- "solutionLink": "#",
- "problemName": "Tiger Zinda Hai"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/composite-series1258/1",
- "solutionLink": "#",
- "problemName": "Composite Series"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/special-odd-series-sum1235/1",
- "solutionLink": "#",
- "problemName": "Special Odd Series Sum"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/jumpy-ball1449/1",
- "solutionLink": "#",
- "problemName": "Jumpy Ball"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-the-characters-in-each-word-in-a-given-sentence3451/1",
- "solutionLink": "#",
- "problemName": "Count the characters in each word in a given sentence"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-substring-from-last-of-the-given-string3440/1",
- "solutionLink": "#",
- "problemName": "Find Substring from last of the Given String"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/ishaans-weight0106/1",
- "solutionLink": "#",
- "problemName": "Geek's Weight"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/factor-or-multiple1128/1",
- "solutionLink": "#",
- "problemName": "Factor OR Multiple"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/2s-complement3124/1",
- "solutionLink": "#",
- "problemName": "2's Complement"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/difference-between-sums-of-odd-and-even-digits2837/1",
- "solutionLink": "#",
- "problemName": "Difference between sums of odd and even digits"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/factorial-number2446/1",
- "solutionLink": "#",
- "problemName": "Factorial Number"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/triangle-growing-downwards2344/1",
- "solutionLink": "#",
- "problemName": "Triangle growing downwards"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-large-numbers5827/1",
- "solutionLink": "#",
- "problemName": "Sum of large numbers"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/wrong-ball5239/1",
- "solutionLink": "#",
- "problemName": "Wrong Ball"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-number-of-days-between-two-given-dates5400/1",
- "solutionLink": "#",
- "problemName": "Find number of days between two given dates"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/the-xor-gate0918/1",
- "solutionLink": "#",
- "problemName": "The XOR Gate"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/perfect-cubes-in-a-range3933/1",
- "solutionLink": "#",
- "problemName": "Perfect Cubes in a Range"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/gray-code4907/1",
- "solutionLink": "#",
- "problemName": "Gray Code "
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/java-interface/1",
- "solutionLink": "#",
- "problemName": "Java Interface"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/java-collection-set-4-treemap/1",
- "solutionLink": "#",
- "problemName": "TreeMap Operations"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/the-modulo-task1736/1",
- "solutionLink": "#",
- "problemName": "The Modulo Task"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-weight-difference5036/1",
- "solutionLink": "#",
- "problemName": "Maximum weight difference"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/evaluate-the-expression0307/1",
- "solutionLink": "#",
- "problemName": "Evaluate the expression"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/total-distance-travelled-in-an-array3628/1",
- "solutionLink": "#",
- "problemName": "Total distance travelled in an array"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/k-th-distinct-element4510/1",
- "solutionLink": "#",
- "problemName": "K-th distinct element"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/kings-war2448/1",
- "solutionLink": "#",
- "problemName": "King's War"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/xor-play1544/1",
- "solutionLink": "#",
- "problemName": "XOR play"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/stuffs-division5735/1",
- "solutionLink": "#",
- "problemName": "Stuffs Division"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/trimorphic-number3553/1",
- "solutionLink": "#",
- "problemName": "Trimorphic Number"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-the-common-elements/1",
- "solutionLink": "#",
- "problemName": "Sum the common elements"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/strange-sort4316/1",
- "solutionLink": "#",
- "problemName": "Strange Sort - copy"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-consecutives1030/1",
- "solutionLink": "#",
- "problemName": "Sum of Consecutives"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/interesting-patterns1430/1",
- "solutionLink": "#",
- "problemName": "Interesting Patterns"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/string-of-commons4503/1",
- "solutionLink": "#",
- "problemName": "String of Commons"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/c-stl-set-7-unordered-map/1",
- "solutionLink": "#",
- "problemName": "C++ STL | Set 7 (unordered map)"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/tracks0436/1",
- "solutionLink": "#",
- "problemName": "Tracks"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-whether-two-numbers-differ-at-one-bit-position-only3415/1",
- "solutionLink": "#",
- "problemName": "Check whether two numbers differ at one bit position only"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/the-muskteers3519/1",
- "solutionLink": "#",
- "problemName": "The Muskteers"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/is-digital-root-of-n-a-prime2522/1",
- "solutionLink": "#",
- "problemName": "Is digital root of N a prime?"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/crazy-string1157/1",
- "solutionLink": "#",
- "problemName": "Crazy String"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/corner-digits1317/1",
- "solutionLink": "#",
- "problemName": "Corner Digits Sum"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/floating-point-number-even-or-odd0146/1",
- "solutionLink": "#",
- "problemName": "Floating point number even or odd"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/got-tv-series3124/1",
- "solutionLink": "#",
- "problemName": "set-bits and number"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/modulus-of-two-double-numbers5159/1",
- "solutionLink": "#",
- "problemName": "Modulus of two double numbers"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/distinct-elements-in-a-stream1557/1",
- "solutionLink": "#",
- "problemName": "Distinct Elements in a Stream"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/multiple-in-table-tennis3310/1",
- "solutionLink": "#",
- "problemName": "Face off Tournament"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/message-decoding4305/1",
- "solutionLink": "#",
- "problemName": "Message decoding"
- }
-]
-
-
-
-
-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 LeetCode website. You can also click on the solution link to view the solution of the problem.
\ No newline at end of file
diff --git a/dsa-problems/gfg-problems/basic/0401-0500.md b/dsa-problems/gfg-problems/basic/0401-0500.md
deleted file mode 100644
index 49d542060..000000000
--- a/dsa-problems/gfg-problems/basic/0401-0500.md
+++ /dev/null
@@ -1,623 +0,0 @@
----
-id: 0401-0500
-title: GFG basic problems 0401-0500
-sidebar_label: 0401-0500
-keywords:
- - gfg problems
- - gfg problems basic
- - gfg problems problems
----
-
-
-export const problems = [
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/c-stl-deque/1",
- "solutionLink": "#",
- "problemName": "C++ STL Deque"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sort-the-fest0016/1",
- "solutionLink": "#",
- "problemName": "Sort the fest"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-terms-nth-row3128/1",
- "solutionLink": "#",
- "problemName": "Sum Terms Nth Row"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/ladoo-problem2929/1",
- "solutionLink": "#",
- "problemName": "Ladoo problem"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/tywins-war-strategy0527/1",
- "solutionLink": "#",
- "problemName": "Tywin's War Strategy"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-all-sub-sequences-of-a-number3437/1",
- "solutionLink": "#",
- "problemName": "Sum of all sub-sequences of a number"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/prime-number-validation-java-regex0450/1",
- "solutionLink": "#",
- "problemName": "Prime number validation-JAVA regex"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/tidy-number0519/1",
- "solutionLink": "#",
- "problemName": "Tidy Number"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/xor-count-zero-and-one2724/1",
- "solutionLink": "#",
- "problemName": "XOR Count Zero and One"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/extraction-of-secret-message0616/1",
- "solutionLink": "#",
- "problemName": "Extraction of secret message"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/max-odd-sum0651/1",
- "solutionLink": "#",
- "problemName": "Max Odd Sum"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/no-of-carry-operations0456/1",
- "solutionLink": "#",
- "problemName": "No of Carry Operations "
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/reading-books3803/1",
- "solutionLink": "#",
- "problemName": "Reading books"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/longest-equal-prefix3139/1",
- "solutionLink": "#",
- "problemName": "Longest Equal Prefix"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/ishwar-and-his-proposals1140/1",
- "solutionLink": "#",
- "problemName": "Ishwar and his proposals"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/number-of-integer-solutions2458/1",
- "solutionLink": "#",
- "problemName": "Number of Integer solutions"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/swapping-triangles5209/1",
- "solutionLink": "#",
- "problemName": "Swapping Triangles"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/stable-sort-and-position1359/1",
- "solutionLink": "#",
- "problemName": "Stable Sort and Position"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/repated-sum-and-then-multiply1046/1",
- "solutionLink": "#",
- "problemName": "Repeated Sum and then Multiply"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/dull-jack1909/1",
- "solutionLink": "#",
- "problemName": "Dull Jack"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-triangle-for-given-array1159/1",
- "solutionLink": "#",
- "problemName": "Sum Triangle for given array"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sophie-germain-prime2014/1",
- "solutionLink": "#",
- "problemName": "Sophie Germain Prime"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/just-one-mismatch1714/1",
- "solutionLink": "#",
- "problemName": "Just One Mismatch"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/total-digits4030/1",
- "solutionLink": "#",
- "problemName": "Total digits"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/distinct-adjacent-element2121/1",
- "solutionLink": "#",
- "problemName": "Distinct Adjacent Element"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/nth-digit-of-fibonacci1449/1",
- "solutionLink": "#",
- "problemName": "nth digit of Fibonacci "
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-the-maximum-number-of-handshakes2349/1",
- "solutionLink": "#",
- "problemName": "Maximum Handshakes"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/narcissistic-number4852/1",
- "solutionLink": "#",
- "problemName": "Narcissistic number"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-sum-of-factors5829/1",
- "solutionLink": "#",
- "problemName": "Minimum sum of factors"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/prime-palindrome-sum3700/1",
- "solutionLink": "#",
- "problemName": "Prime Palindrome Sum"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/convert-from-any-base-to-decimal3736/1",
- "solutionLink": "#",
- "problemName": "Convert from any base to decimal"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/learning-output4058/1",
- "solutionLink": "#",
- "problemName": "Learning Output"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/java-collections-set-9-queue/1",
- "solutionLink": "#",
- "problemName": "Java Collections | Set 9 (Queue)"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/weak-maths0559/1",
- "solutionLink": "#",
- "problemName": "Smallest number with maximum and minimum divisor in an array"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/first-and-last-bit2357/1",
- "solutionLink": "#",
- "problemName": "First and last Bit"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/java-collection-set-5-linkedhash-set/1",
- "solutionLink": "#",
- "problemName": "Java Collection | Set 5 (LinkedHash Set)"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-digit-modified1409/1",
- "solutionLink": "#",
- "problemName": "Sum of Digit Modified"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/even-odd-turn-game1832/1",
- "solutionLink": "#",
- "problemName": "Even-Odd turn game"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/odd-divisors5347/1",
- "solutionLink": "#",
- "problemName": "Odd Divisors"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/adam-number2650/1",
- "solutionLink": "#",
- "problemName": "Adam Number"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/powers-game3701/1",
- "solutionLink": "#",
- "problemName": "Powers game"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-move-to-front-operations2232/1",
- "solutionLink": "#",
- "problemName": "Minimum move to front operations"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-digits-in-given-number-n-which-divide-n3331/1",
- "solutionLink": "#",
- "problemName": "Count digits in given number N which divide N"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/demonitisation0013/1",
- "solutionLink": "#",
- "problemName": "Demonitisation"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/azad-and-chocolates4845/1",
- "solutionLink": "#",
- "problemName": "Buy chocolates and save N rupees"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/finding-pairs2835/1",
- "solutionLink": "#",
- "problemName": "Finding-Pairs"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/make-coprime-array3058/1",
- "solutionLink": "#",
- "problemName": "Make Co-prime Array"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/long-long-decimal4552/1",
- "solutionLink": "#",
- "problemName": "Long Long Decimal"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-distance3248/1",
- "solutionLink": "#",
- "problemName": "Maximum distance"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/equalization-of-an-array1656/1",
- "solutionLink": "#",
- "problemName": "Equalization of an array"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/java-date-and-day5024/1",
- "solutionLink": "#",
- "problemName": "Java Date and Day"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/java-generic-class/1",
- "solutionLink": "#",
- "problemName": "Java Generic Class"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/cricket-average2031/1",
- "solutionLink": "#",
- "problemName": "Cricket Average"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/mrs-s-java-bits-set-1/1",
- "solutionLink": "#",
- "problemName": "Mrs. S- JAVA Bits Set 1"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-number-of-equal-pairs-in-a-string0520/1",
- "solutionLink": "#",
- "problemName": "Count number of equal pairs in a string"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-if-date-is-valid0050/1",
- "solutionLink": "#",
- "problemName": "Check if date is valid"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/jumping-geek3420/1",
- "solutionLink": "#",
- "problemName": "Jumping Geek"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-x-and-y-in-linear-equation1334/1",
- "solutionLink": "#",
- "problemName": "Find X and Y in Linear Equation"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/an-easy-problem0811/1",
- "solutionLink": "#",
- "problemName": "An Easy problem"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/divide-the-number5320/1",
- "solutionLink": "#",
- "problemName": "Divide the number"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/rahul-lucky-unlucky5101/1",
- "solutionLink": "#",
- "problemName": "Rahul lucky-unlucky"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/product-of-digits4348/1",
- "solutionLink": "#",
- "problemName": "Numbers having alternate bits"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/carol-number4645/1",
- "solutionLink": "#",
- "problemName": "Carol Number"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/set-all-odd-bits1900/1",
- "solutionLink": "#",
- "problemName": "Set all odd bits"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/starting-point0909/1",
- "solutionLink": "#",
- "problemName": "Starting Point"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/ishaans-sum-problem0934/1",
- "solutionLink": "#",
- "problemName": "Ishaan's Sum Problem"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/the-remaining-cake1349/1",
- "solutionLink": "#",
- "problemName": "The Remaining Cake"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/dr-stranges-powers3333/1",
- "solutionLink": "#",
- "problemName": "Binary Addition of 1"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/binary-representation-of-previous-number0638/1",
- "solutionLink": "#",
- "problemName": "Binary representation of previous number"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/c-sets5648/1",
- "solutionLink": "#",
- "problemName": "C++ Sets"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/weird-number0933/1",
- "solutionLink": "#",
- "problemName": "Weird Number"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-the-nth-number-in-the-sequence2245/1",
- "solutionLink": "#",
- "problemName": "Find the nth number in the sequence "
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/numbers-containing-0s-from-1-to-n4704/1",
- "solutionLink": "#",
- "problemName": "Numbers containing 0's from 1 to N"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/rectangle-number4650/1",
- "solutionLink": "#",
- "problemName": "Rectangle Number"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/evaluate-the-x-a-b-statement0744/1",
- "solutionLink": "#",
- "problemName": "Evaluate the x + a = b statement"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/flying-jet4644/1",
- "solutionLink": "#",
- "problemName": "Flying Jet"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-for-three-consecutive-numbers5729/1",
- "solutionLink": "#",
- "problemName": "Check for three consecutive numbers"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/point-lies-or-not0417/1",
- "solutionLink": "#",
- "problemName": "Point lies or not"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/gcd-lcm-and-distributive-property4419/1",
- "solutionLink": "#",
- "problemName": "GCD, LCM and Distributive Property"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/invert-the-bits2942/1",
- "solutionLink": "#",
- "problemName": "Invert the Bits"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/chocolate-lengths0332/1",
- "solutionLink": "#",
- "problemName": "Chocolate lengths"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/smallest-k-digit-number-divisible-by-x2351/1",
- "solutionLink": "#",
- "problemName": "Smallest K digit number divisible by X"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/the-cycle-game4441/1",
- "solutionLink": "#",
- "problemName": "The Cycle Game"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/number-series3015/1",
- "solutionLink": "#",
- "problemName": "Number Series"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/different-ways-to-spell-a-number4014/1",
- "solutionLink": "#",
- "problemName": "Spell a Number"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/the-number-system4241/1",
- "solutionLink": "#",
- "problemName": "Decimal to Base K conversion"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/help-joey5246/1",
- "solutionLink": "#",
- "problemName": "Help Joey"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-squares2421/1",
- "solutionLink": "#",
- "problemName": "Check squares"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/palindrome-in-both-decimal-and-binary4517/1",
- "solutionLink": "#",
- "problemName": "Palindrome in both Decimal and Binary"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/indias-unique-railway-track0906/1",
- "solutionLink": "#",
- "problemName": "India's unique railway tracks"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/encoding-names1310/1",
- "solutionLink": "#",
- "problemName": "Encoding names"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/extended-euclidean-algorithm3848/1",
- "solutionLink": "#",
- "problemName": "Extended Euclidean Algorithm"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/largest-subarray-with-gcd-one4535/1",
- "solutionLink": "#",
- "problemName": "Largest subarray with GCD one"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximize-or0509/1",
- "solutionLink": "#",
- "problemName": "Maximize OR"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/c-nega-bit2019/1",
- "solutionLink": "#",
- "problemName": "C++ Nega Bit"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/pattern-for-reverse-character-bridge5738/1",
- "solutionLink": "#",
- "problemName": "Pattern for Reverse Character Bridge"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/min-value-of-x2252/1",
- "solutionLink": "#",
- "problemName": "Min value of x"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/base-conversion0924/1",
- "solutionLink": "#",
- "problemName": "Base Conversion"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/akash-and-friend5145/1",
- "solutionLink": "#",
- "problemName": "Akash and Friend"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/difficult-problems1303/1",
- "solutionLink": "#",
- "problemName": "Difficult Problems"
- }
-]
-
-
-
-
-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.
\ No newline at end of file
diff --git a/dsa-problems/gfg-problems/basic/0501-0525.md b/dsa-problems/gfg-problems/basic/0501-0525.md
deleted file mode 100644
index c21555010..000000000
--- a/dsa-problems/gfg-problems/basic/0501-0525.md
+++ /dev/null
@@ -1,173 +0,0 @@
----
-id: 0501-0525
-title: GFG basic problems 0501-0525
-sidebar_label: 0501-0525
-keywords:
- - gfg problems
- - gfg problems basic
- - gfg problems problems
----
-
-
-export const problems = [
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/multiple-of-x-closest-to-n1719/1",
- "solutionLink": "#",
- "problemName": "Multiple of N closest to X"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/java-collections-set-8-treeset/1",
- "solutionLink": "#",
- "problemName": "Java Collections | Set 8 (TreeSet)"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/biggest-integer-having-maximum-digit-sum1704/1",
- "solutionLink": "#",
- "problemName": "Biggest integer having maximum digit sum"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/lucky-number-and-a-sum0329/1",
- "solutionLink": "#",
- "problemName": "Lucky number and a sum"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/metro-problem3513/1",
- "solutionLink": "#",
- "problemName": "Metro Problem"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/gray-to-binary-and-binary-to-gray5518/1",
- "solutionLink": "#",
- "problemName": "Gray to Binary and Binary to Gray "
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-the-number-of-elements-in-array-1-for-each-element-of-the-array-22903/1",
- "solutionLink": "#",
- "problemName": "Numbers having two adjacent set bits"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/nth-multiple/1",
- "solutionLink": "#",
- "problemName": "Nth Multiple"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-all-subsets-formed-by-first-n-natural-numbers0603/1",
- "solutionLink": "#",
- "problemName": "Sum of all subsets formed by first N natural numbers"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/finding-dory3455/1",
- "solutionLink": "#",
- "problemName": "Finding Dory"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/make-the-hit-in-power-game3729/1",
- "solutionLink": "#",
- "problemName": "Make the hit in power game !"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/line-passing-through-2-points5031/1",
- "solutionLink": "#",
- "problemName": "Line passing through 2 points"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/human-and-the-tower5254/1",
- "solutionLink": "#",
- "problemName": "Human and the tower"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/generate-all-cyclic-permutations-of-a-number2921/1",
- "solutionLink": "#",
- "problemName": "Generate all cyclic permutations of a number"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-rotations-divisible-by-43523/1",
- "solutionLink": "#",
- "problemName": "Count rotations divisible by 4"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/euler-totient-sum-and-divisors5501/1",
- "solutionLink": "#",
- "problemName": "Euler Totient Sum and Divisors"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/distance-and-displacement4145/1",
- "solutionLink": "#",
- "problemName": "Distance and Displacement"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/search-for-traitor5950/1",
- "solutionLink": "#",
- "problemName": "Find the safe position"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/binary-fraction-to-decimal4656/1",
- "solutionLink": "#",
- "problemName": "Binary fraction to decimal"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/product-of-complex-numbers1426/1",
- "solutionLink": "#",
- "problemName": "Product of Complex Numbers"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/number-of-unique-rectangles1849/1",
- "solutionLink": "#",
- "problemName": "Number of unique rectangles"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-number-of-digits-after-decimal1516/1",
- "solutionLink": "#",
- "problemName": "Count number of digits after decimal"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/rotate-page0923/1",
- "solutionLink": "#",
- "problemName": "Rotate Page"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/frobenius-coin-problem5532/1",
- "solutionLink": "#",
- "problemName": "Frobenius coin problem"
- },
- {
- "difficulty": "Basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/lucky-number-22638/1",
- "solutionLink": "#",
- "problemName": "Lucky Number-2"
- }
-]
-
-
-
-
-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.
\ No newline at end of file
diff --git a/dsa-problems/gfg-problems/basic/problems.md b/dsa-problems/gfg-problems/basic/problems.md
deleted file mode 100644
index 3482553ed..000000000
--- a/dsa-problems/gfg-problems/basic/problems.md
+++ /dev/null
@@ -1,81 +0,0 @@
----
-id: problems
-title: GFG basic problems
-sidebar_label: problems
-keywords:
- - gfg problems
- - gfg problems basic
- - gfg problems problems
----
-
-export const problems = [
- {
- "problemName": "1. Inorder Traversal",
- "difficulty": "basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/inorder-traversal/0",
- "solutionLink": "#"
- },
- {
- "problemName": "2. Preorder Traversal",
- "difficulty": "basic",
- "gfgLink": "https://geeksforgeeks.org/problems/preorder-traversal/0",
- "solutionLink": "#"
- },
- {
- "problemName": "3. Peak element",
- "difficulty": "basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/peak-element/0",
- "solutionLink": "#"
- },
- {
- "problemName": "4. Minimum-element-in-bst",
- "difficulty": "basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-element-in-bst/0",
- "solutionLink": "#"
- },
- {
- "problemName": "5. Find-nk-th-node-in-linked-list",
- "difficulty": "basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-nk-th-node-in-linked-list/0",
- "solutionLink": "#"
- },
- {
- "problemName": "6. Power-of-2",
- "difficulty": "basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/power-of-2-1587115620/0",
- "solutionLink": "#"
- },
- {
- "problemName": "7. Search-an-element-in-an-array",
- "difficulty": "basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/search-an-element-in-an-array-1587115621/0",
- "solutionLink": "#"
- },
- {
- "problemName": "8. Print-first-n-fibonacci-numbers",
- "difficulty": "basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/print-first-n-fibonacci-numbers1002/0",
- "solutionLink": "#"
- },
- {
- "problemName": "9. Find minimum and maximum element in an array",
- "difficulty": "basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-minimum-and-maximum-element-in-an-array4428/0",
- "solutionLink": "#"
- },
- {
- "problemName": "10. Factorial-number",
- "difficulty": "basic",
- "gfgLink": "https://www.geeksforgeeks.org/problems/factorial-number2446/0",
- "solutionLink": "#"
- }
-]
-
-
-
-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 GFG website. You can also click on the solution link to view the solution of the problem.
\ No newline at end of file
diff --git a/dsa-problems/gfg-problems/easy/0001-0100.md b/dsa-problems/gfg-problems/easy/0001-0100.md
deleted file mode 100644
index e303db607..000000000
--- a/dsa-problems/gfg-problems/easy/0001-0100.md
+++ /dev/null
@@ -1,622 +0,0 @@
----
-id: 0001-0100
-title: GFG easy problems 0001-0100
-sidebar_label: 0001-0100
-keywords:
- - gfg problems
- - gfg problems easy
- - gfg problems problems
----
-
-
-export const problems = [
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/missing-number-in-array1416/1",
- "solutionLink": "#",
- "problemName": "Missing number in array"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-duplicates-in-an-array/1",
- "solutionLink": "#",
- "problemName": "Find duplicates in an array"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/leaders-in-an-array-1587115620/1",
- "solutionLink": "#",
- "problemName": "Leaders in an array"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/equilibrium-point-1587115620/1",
- "solutionLink": "#",
- "problemName": "Equilibrium Point"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/parenthesis-checker2744/1",
- "solutionLink": "#",
- "problemName": "Parenthesis Checker"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/second-largest3735/1",
- "solutionLink": "#",
- "problemName": "Second Largest"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-for-bst/1",
- "solutionLink": "#",
- "problemName": "Check for BST"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/left-view-of-binary-tree/1",
- "solutionLink": "#",
- "problemName": "Left View of Binary Tree"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-pairs-with-given-sum5022/1",
- "solutionLink": "#",
- "problemName": "Count pairs with given sum"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/nth-node-from-end-of-linked-list/1",
- "solutionLink": "#",
- "problemName": "Nth node from end of linked list"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/common-elements1132/1",
- "solutionLink": "#",
- "problemName": "Common elements"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/bfs-traversal-of-graph/1",
- "solutionLink": "#",
- "problemName": "BFS of graph"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/palindrome-string0817/1",
- "solutionLink": "#",
- "problemName": "Palindrome String"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/rotate-array-by-n-elements-1587115621/1",
- "solutionLink": "#",
- "problemName": "Rotate Array"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/finding-middle-element-in-a-linked-list/1",
- "solutionLink": "#",
- "problemName": "Finding middle element in a linked list"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/nth-fibonacci-number1335/1",
- "solutionLink": "#",
- "problemName": "Nth Fibonacci Number"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/anagram-1587115620/1",
- "solutionLink": "#",
- "problemName": "Anagram"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/reverse-words-in-a-given-string5459/1",
- "solutionLink": "#",
- "problemName": "Reverse words in a given string"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-for-balanced-tree/1",
- "solutionLink": "#",
- "problemName": "Check for Balanced Tree"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/reverse-a-linked-list/1",
- "solutionLink": "#",
- "problemName": "Reverse a linked list"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/remove-duplicate-element-from-sorted-linked-list/1",
- "solutionLink": "#",
- "problemName": "Remove duplicate element from sorted Linked List"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/height-of-binary-tree/1",
- "solutionLink": "#",
- "problemName": "Height of Binary Tree"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/key-pair5616/1",
- "solutionLink": "#",
- "problemName": "Key Pair"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-transition-point-1587115620/1",
- "solutionLink": "#",
- "problemName": "Find Transition Point"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/determine-if-two-trees-are-identical/1",
- "solutionLink": "#",
- "problemName": "Determine if Two Trees are Identical"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/frequency-of-array-elements-1587115620/1",
- "solutionLink": "#",
- "problemName": "Frequencies of Limited Range Array Elements"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/longest-common-prefix-in-an-array5129/1",
- "solutionLink": "#",
- "problemName": "Longest Common Prefix in an Array"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/depth-first-traversal-for-a-graph/1",
- "solutionLink": "#",
- "problemName": "DFS of Graph"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/wave-array-1587115621/1",
- "solutionLink": "#",
- "problemName": "Wave Array"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/first-repeating-element4018/1",
- "solutionLink": "#",
- "problemName": "First Repeating Element"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-pair-given-difference1559/1",
- "solutionLink": "#",
- "problemName": "Find Pair Given Difference"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-distance-between-two-numbers/1",
- "solutionLink": "#",
- "problemName": "Minimum distance between two numbers"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/floor-in-a-sorted-array-1587115620/1",
- "solutionLink": "#",
- "problemName": "Floor in a Sorted Array"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/remove-duplicate-elements-from-sorted-array/1",
- "solutionLink": "#",
- "problemName": "Remove duplicate elements from sorted Array"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/remove-duplicates-from-an-unsorted-linked-list/1",
- "solutionLink": "#",
- "problemName": "Remove duplicates from an unsorted linked list"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/n-meetings-in-one-room-1587115620/1",
- "solutionLink": "#",
- "problemName": "N meetings in one room"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/chocolate-distribution-problem3825/1",
- "solutionLink": "#",
- "problemName": "Chocolate Distribution Problem"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximize-arrii-of-an-array0026/1",
- "solutionLink": "#",
- "problemName": "Maximize sum(arr[i]*i) of an Array"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-if-string-is-rotated-by-two-places-1587115620/1",
- "solutionLink": "#",
- "problemName": "Check if string is rotated by two places"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/non-repeating-character-1587115620/1",
- "solutionLink": "#",
- "problemName": "Non Repeating Character"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/level-order-traversal-in-spiral-form/1",
- "solutionLink": "#",
- "problemName": "Level order traversal in spiral form"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/product-array-puzzle4525/1",
- "solutionLink": "#",
- "problemName": "Product array puzzle"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/delete-without-head-pointer/1",
- "solutionLink": "#",
- "problemName": "Delete without head pointer"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/level-order-traversal/1",
- "solutionLink": "#",
- "problemName": "Level order traversal"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/delete-a-node-in-single-linked-list/1",
- "solutionLink": "#",
- "problemName": "Delete a Node in Single Linked List"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/first-element-to-occur-k-times5150/1",
- "solutionLink": "#",
- "problemName": "First element to occur k times"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-the-triplets4615/1",
- "solutionLink": "#",
- "problemName": "Count the triplets"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-if-an-array-is-sorted0701/1",
- "solutionLink": "#",
- "problemName": "Check if array is sorted"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/square-root/1",
- "solutionLink": "#",
- "problemName": "Square root of a number"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/intersection-of-two-arrays2404/1",
- "solutionLink": "#",
- "problemName": "Intersection of two arrays"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-cost-of-ropes-1587115620/1",
- "solutionLink": "#",
- "problemName": "Minimum Cost of ropes"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/move-all-zeroes-to-end-of-array0751/1",
- "solutionLink": "#",
- "problemName": "Move all zeroes to end of array"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/isomorphic-strings-1587115620/1",
- "solutionLink": "#",
- "problemName": "Isomorphic Strings"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/mirror-tree/1",
- "solutionLink": "#",
- "problemName": "Mirror Tree"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/arithmetic-number2815/1",
- "solutionLink": "#",
- "problemName": "Arithmetic Number"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/print-all-nodes-that-dont-have-sibling/1",
- "solutionLink": "#",
- "problemName": "Print all nodes that don't have sibling"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/right-view-of-binary-tree/1",
- "solutionLink": "#",
- "problemName": "Right View of Binary Tree"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/bubble-sort/1",
- "solutionLink": "#",
- "problemName": "Bubble Sort"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/given-a-linked-list-of-0s-1s-and-2s-sort-it/1",
- "solutionLink": "#",
- "problemName": "Given a linked list of 0s, 1s and 2s, sort it."
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/roman-number-to-integer3201/1",
- "solutionLink": "#",
- "problemName": "Roman Number to Integer"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/array-of-alternate-ve-and-ve-nos1401/1",
- "solutionLink": "#",
- "problemName": "Alternate positive and negative numbers"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/perfect-numbers3207/1",
- "solutionLink": "#",
- "problemName": "Perfect Numbers"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/rotation4723/1",
- "solutionLink": "#",
- "problemName": "Rotation"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-digits5716/1",
- "solutionLink": "#",
- "problemName": "Count Digits"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-if-strings-are-rotations-of-each-other-or-not-1587115620/1",
- "solutionLink": "#",
- "problemName": "Check if strings are rotations of each other or not"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/three-way-partitioning/1",
- "solutionLink": "#",
- "problemName": "Three way partitioning"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-whether-k-th-bit-is-set-or-not-1587115620/1",
- "solutionLink": "#",
- "problemName": "Check whether K-th bit is set or not"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-first-set-bit-1587115620/1",
- "solutionLink": "#",
- "problemName": "Find first set bit"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/insert-a-node-in-a-bst/1",
- "solutionLink": "#",
- "problemName": "Insert a node in a BST"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/implement-two-stacks-in-an-array/1",
- "solutionLink": "#",
- "problemName": "Implement two stacks in an array"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-all-pairs-whose-sum-is-x5808/1",
- "solutionLink": "#",
- "problemName": "Find all pairs with a given sum"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/kth-largest-element-in-bst/1",
- "solutionLink": "#",
- "problemName": "Kth largest element in BST"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/symmetric-tree/1",
- "solutionLink": "#",
- "problemName": "Symmetric Tree"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/lowest-common-ancestor-in-a-bst/1",
- "solutionLink": "#",
- "problemName": "Lowest Common Ancestor in a BST"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/max-sum-subarray-of-size-k5313/1",
- "solutionLink": "#",
- "problemName": "Max Sum Subarray of size K"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-number-of-hops-1587115620/1",
- "solutionLink": "#",
- "problemName": "Count number of hops"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-length-of-loop/1",
- "solutionLink": "#",
- "problemName": "Find length of Loop"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/stack-using-two-queues/1",
- "solutionLink": "#",
- "problemName": "Stack using two queues"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/delete-nodes-having-greater-value-on-right/1",
- "solutionLink": "#",
- "problemName": "Delete nodes having greater value on right"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/intersection-of-two-sorted-linked-lists/1",
- "solutionLink": "#",
- "problemName": "Intersection of two sorted Linked lists"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/reverse-level-order-traversal/1",
- "solutionLink": "#",
- "problemName": "Reverse Level Order Traversal"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/largest-number-possible5028/1",
- "solutionLink": "#",
- "problemName": "Largest number possible"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/set-bits0143/1",
- "solutionLink": "#",
- "problemName": "Number of 1 Bits"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/insertion-sort/1",
- "solutionLink": "#",
- "problemName": "Insertion Sort"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/delete-middle-element-of-a-stack/1",
- "solutionLink": "#",
- "problemName": "Delete middle element of a stack"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/queue-using-two-stacks/1",
- "solutionLink": "#",
- "problemName": "Queue using two Stacks"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/insert-in-a-sorted-list/1",
- "solutionLink": "#",
- "problemName": "Insert in a Sorted List"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/unsorted-array4925/1",
- "solutionLink": "#",
- "problemName": "Element with left side smaller and right side greater"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/search-in-a-matrix17201720/1",
- "solutionLink": "#",
- "problemName": "Search in a matrix"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-value-in-a-bitonic-array3001/1",
- "solutionLink": "#",
- "problemName": "Bitonic Point"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/pairwise-swap-elements-of-a-linked-list-by-swapping-data/1",
- "solutionLink": "#",
- "problemName": "Pairwise swap elements of a linked list"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/delete-middle-of-linked-list/1",
- "solutionLink": "#",
- "problemName": "Delete Middle of Linked List"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/reverse-first-k-elements-of-queue/1",
- "solutionLink": "#",
- "problemName": "Reverse First K elements of Queue"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/print-adjacency-list-1587115620/1",
- "solutionLink": "#",
- "problemName": "Print adjacency list"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/smallest-subarray-with-sum-greater-than-x5651/1",
- "solutionLink": "#",
- "problemName": "Smallest subarray with sum greater than x"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/leaf-at-same-level/1",
- "solutionLink": "#",
- "problemName": "Check if all leaves are at same level"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/move-all-negative-elements-to-end1813/1",
- "solutionLink": "#",
- "problemName": "Move all negative elements to end"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/longest-distinct-characters-in-string5848/1",
- "solutionLink": "#",
- "problemName": "Longest Distinct characters in string"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/convert-array-into-zig-zag-fashion1638/1",
- "solutionLink": "#",
- "problemName": "Convert array into Zig-Zag fashion"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/queue-reversal/1",
- "solutionLink": "#",
- "problemName": "Queue Reversal"
- }
-]
-
-
-
-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 GFG website. You can also click on the solution link to view the solution of the problem.
\ No newline at end of file
diff --git a/dsa-problems/gfg-problems/easy/0101-0200.md b/dsa-problems/gfg-problems/easy/0101-0200.md
deleted file mode 100644
index 425d799e6..000000000
--- a/dsa-problems/gfg-problems/easy/0101-0200.md
+++ /dev/null
@@ -1,622 +0,0 @@
----
-id: 0101-0200
-title: GFG easy problems 0101-0200
-sidebar_label: 0101-0200
-keywords:
- - gfg problems
- - gfg problems easy
- - gfg problems problems
----
-
-
-export const problems = [
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-distinct-elements-in-every-window/1",
- "solutionLink": "/dsa-solutions/gfg-solutions/easy/count-distinct-elements-in-every-window",
- "problemName": "Count distinct elements in every window"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/inorder-successor-in-bst/1",
- "solutionLink": "/dsa-solutions/gfg-solutions/easy/inorder-successor-in-bst",
- "problemName": "Inorder Successor in BST"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/index-of-an-extra-element/1",
- "solutionLink": "/dsa-solutions/gfg-solutions/easy/index-of-an-extra-element",
- "problemName": "Index of an Extra Element"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/armstrong-numbers2727/1",
- "solutionLink": "/dsa-solutions/gfg-solutions/easy/armstrong-numbers",
- "problemName": "Armstrong Numbers"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/reverse-a-doubly-linked-list/1",
- "solutionLink": "/dsa-solutions/gfg-solutions/easy/reverse-a-doubly-linked-list",
- "problemName": "Reverse a Doubly Linked List"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/rightmost-different-bit-1587115621/1",
- "solutionLink": "/dsa-solutions/gfg-solutions/easy/rightmost-different-bit",
- "problemName": "Rightmost different bit"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/remove-duplicates3034/1",
- "solutionLink": "/dsa-solutions/gfg-solutions/easy/remove-duplicates",
- "problemName": "Remove Duplicates"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-the-zeros2550/1",
- "solutionLink": "/dsa-solutions/gfg-solutions/easy/count-the-zeros",
- "problemName": "Count the Zeros"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-pairs-whose-sum-is-equal-to-x/1",
- "solutionLink": "/dsa-solutions/gfg-solutions/easy/count-pairs-whose-sum-is-equal-to-x",
- "problemName": "Count Pairs whose sum is equal to X"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/is-binary-number-multiple-of-30654/1",
- "solutionLink": "/dsa-solutions/gfg-solutions/easy/is-binary-number-multiple-of-3",
- "problemName": "Is Binary Number Multiple of 3"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/k-distance-from-root/1",
- "solutionLink": "/dsa-solutions/gfg-solutions/easy/k-distance-from-root",
- "problemName": "K distance from root"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-element-occurences/1",
- "solutionLink": "#",
- "problemName": "Count More than n/k Occurences"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-element-in-a-sorted-and-rotated-array3611/1",
- "solutionLink": "#",
- "problemName": "Minimum element in a sorted and rotated array"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/josephus-problem/1",
- "solutionLink": "#",
- "problemName": "Josephus problem"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/non-repeating-element3958/1",
- "solutionLink": "#",
- "problemName": "Non-Repeating Element"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/selection-sort/1",
- "solutionLink": "#",
- "problemName": "Selection Sort"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-nth-root-of-m5843/1",
- "solutionLink": "#",
- "problemName": "Find Nth root of M"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/root-to-leaf-path-sum/1",
- "solutionLink": "#",
- "problemName": "Root to leaf path sum"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/boundary-traversal-of-matrix-1587115620/1",
- "solutionLink": "#",
- "problemName": "Boundary traversal of matrix"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-optimum-operation4504/1",
- "solutionLink": "#",
- "problemName": "Minimum Operations"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/transpose-of-matrix-1587115621/1",
- "solutionLink": "#",
- "problemName": "Transpose of Matrix"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/reverse-a-string-using-stack/1",
- "solutionLink": "#",
- "problemName": "Reverse a string using Stack"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/precise-fomat-java/1",
- "solutionLink": "#",
- "problemName": "Precise Format - Java"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/trailing-zeroes-in-factorial5134/1",
- "solutionLink": "#",
- "problemName": "Trailing zeroes in factorial"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/remove-all-duplicates-from-a-given-string4321/1",
- "solutionLink": "#",
- "problemName": "Remove all duplicates from a given string"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-all-divisors-from-1-to-n4738/1",
- "solutionLink": "#",
- "problemName": "Sum of all divisors from 1 to n"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/in-first-but-second5423/1",
- "solutionLink": "#",
- "problemName": "Find missing in second array"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-the-element-that-appears-once-in-sorted-array0624/1",
- "solutionLink": "#",
- "problemName": "Find the element that appears once in sorted array"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/median-of-bst/1",
- "solutionLink": "#",
- "problemName": "Median of BST"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-bst-nodes-that-lie-in-a-given-range/1",
- "solutionLink": "#",
- "problemName": "Count BST nodes that lie in a given range"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimize-the-sum-of-product1525/1",
- "solutionLink": "#",
- "problemName": "Minimize the sum of product"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/reverse-coding2452/1",
- "solutionLink": "#",
- "problemName": "Reverse Coding"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/winner-of-an-election-where-votes-are-represented-as-candidate-names-1587115621/1",
- "solutionLink": "#",
- "problemName": "Winner of an election"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/remove-every-kth-node/1",
- "solutionLink": "#",
- "problemName": "Remove every kth node"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/need-some-change/1",
- "solutionLink": "#",
- "problemName": "Swap the array elements"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/delete-node-in-doubly-linked-list/1",
- "solutionLink": "#",
- "problemName": "Delete node in Doubly Linked List"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/largest-subarray-of-0s-and-1s/1",
- "solutionLink": "#",
- "problemName": "Largest subarray of 0's and 1's"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-all-possible-paths-from-top-left-to-bottom-right3011/1",
- "solutionLink": "#",
- "problemName": "Count all possible paths from top left to bottom right"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/special-stack/1",
- "solutionLink": "#",
- "problemName": "Special Stack"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/print-pattern3549/1",
- "solutionLink": "#",
- "problemName": "Print Pattern"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-indexed-character-1587115620/1",
- "solutionLink": "#",
- "problemName": "Minimum indexed character"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/rotate-bits4524/1",
- "solutionLink": "#",
- "problemName": "Rotate Bits"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/evaluation-of-postfix-expression1735/1",
- "solutionLink": "#",
- "problemName": "Evaluation of Postfix Expression"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/shortest-path-from-1-to-n0156/1",
- "solutionLink": "#",
- "problemName": "Shortest path from 1 to n"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/alone-in-couple5507/1",
- "solutionLink": "#",
- "problemName": "Party of Couples"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-the-closest-number5513/1",
- "solutionLink": "#",
- "problemName": "Find the closest number"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/segregate-0s-and-1s5106/1",
- "solutionLink": "#",
- "problemName": "Segregate 0s and 1s"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-first-repeated-character4108/1",
- "solutionLink": "#",
- "problemName": "Find first repeated character"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximize-toys0331/1",
- "solutionLink": "#",
- "problemName": "Maximize Toys"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/level-order-traversal-line-by-line/1",
- "solutionLink": "#",
- "problemName": "Level order traversal Line by Line"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/rotate-by-90-degree-1587115621/1",
- "solutionLink": "#",
- "problemName": "Rotate by 90 degree"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/form-a-number-divisible-by-3-using-array-digits0717/1",
- "solutionLink": "#",
- "problemName": "Form a number divisible by 3 using array digits"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/start-coding-java/1",
- "solutionLink": "#",
- "problemName": "Start Coding - Java"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/binary-tree-to-bst/1",
- "solutionLink": "#",
- "problemName": "Binary Tree to BST"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-width-of-tree/1",
- "solutionLink": "#",
- "problemName": "Maximum Width of Tree"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/predict-the-column/1",
- "solutionLink": "#",
- "problemName": "Predict the Column"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/pangram-checking-1587115620/1",
- "solutionLink": "#",
- "problemName": "Panagram Checking"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/series-gp4646/1",
- "solutionLink": "#",
- "problemName": "Series GP"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/reach-the-nth-point5433/1",
- "solutionLink": "#",
- "problemName": "Reach the Nth point"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/modular-multiplicative-inverse-1587115620/1",
- "solutionLink": "#",
- "problemName": "Modular Multiplicative Inverse"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximize-sum-after-k-negations1149/1",
- "solutionLink": "#",
- "problemName": "Maximize sum after K negations"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/shop-in-candy-store1145/1",
- "solutionLink": "#",
- "problemName": "Shop in Candy Store"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-number-in-a-sorted-rotated-array-1587115620/1",
- "solutionLink": "#",
- "problemName": "Minimum Number in a sorted rotated array"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-first-and-last-occurrence-of-x0849/1",
- "solutionLink": "#",
- "problemName": "Left most and right most index"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-the-frequency/1",
- "solutionLink": "#",
- "problemName": "Find the Frequency"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-the-status/1",
- "solutionLink": "#",
- "problemName": "Check the status - Python"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/decimal-equivalent-of-binary-linked-list/1",
- "solutionLink": "#",
- "problemName": "Decimal Equivalent of Binary Linked List"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/-minimum-number-of-coins4426/1",
- "solutionLink": "#",
- "problemName": "Minimum number of Coins"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/transform-to-sum-tree/1",
- "solutionLink": "#",
- "problemName": "Transform to Sum Tree"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/the-new-line/1",
- "solutionLink": "#",
- "problemName": "The New Line"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-depth-of-a-binary-tree/1",
- "solutionLink": "#",
- "problemName": "Minimum Depth of a Binary Tree"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/second-most-repeated-string-in-a-sequence0534/1",
- "solutionLink": "#",
- "problemName": "Second most repeated string in a sequence"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/plus-one/1",
- "solutionLink": "#",
- "problemName": "Plus One"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-the-highest-number2259/1",
- "solutionLink": "#",
- "problemName": "Find the Highest number"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/print-matrix-in-snake-pattern-1587115621/1",
- "solutionLink": "#",
- "problemName": "Print Matrix in snake Pattern"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-if-a-number-is-divisible-by-83957/1",
- "solutionLink": "#",
- "problemName": "Check if a number is divisible by 8"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/reverse-bits3556/1",
- "solutionLink": "#",
- "problemName": "Reverse Bits"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-upper-and-lower-triangles-1587115621/1",
- "solutionLink": "#",
- "problemName": "Sum of upper and lower triangles"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/taking-input-java/1",
- "solutionLink": "#",
- "problemName": "Taking input - Java"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/search-insert-position-of-k-in-a-sorted-array/1",
- "solutionLink": "#",
- "problemName": "Search insert position of K in a sorted array"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-ways-to-nth-stairorder-does-not-matter1322/1",
- "solutionLink": "#",
- "problemName": "Count ways to N'th Stair"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/the-new-line-java/1",
- "solutionLink": "#",
- "problemName": "The New Line - Java"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/play-with-or5515/1",
- "solutionLink": "#",
- "problemName": "Play With OR"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/row-with-minimum-number-of-1s5430/1",
- "solutionLink": "#",
- "problemName": "Row with minimum number of 1's"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-the-closest-pair-from-two-arrays4215/1",
- "solutionLink": "#",
- "problemName": "Find the closest pair from two arrays"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/k-largest-elements3736/1",
- "solutionLink": "#",
- "problemName": "K largest elements"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/longest-consecutive-1s-1587115620/1",
- "solutionLink": "#",
- "problemName": "Longest Consecutive 1's"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-integer--170647/1",
- "solutionLink": "#",
- "problemName": "Minimum Integer"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/for-loop-primechecl/1",
- "solutionLink": "#",
- "problemName": "For Loop- primeCheck"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/reach-a-given-score-1587115621/1",
- "solutionLink": "#",
- "problemName": "Reach a given score"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/brothers-from-different-root/1",
- "solutionLink": "#",
- "problemName": "Brothers From Different Roots"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/does-array-represent-heap4345/1",
- "solutionLink": "#",
- "problemName": "Does array represent Heap"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-the-elements1529/1",
- "solutionLink": "#",
- "problemName": "Count the elements"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/intersection-of-two-linked-list/1",
- "solutionLink": "#",
- "problemName": "Intersection of Two Linked Lists"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/get-min-at-pop/1",
- "solutionLink": "#",
- "problemName": "Get min at pop"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/learn-to-comment/1",
- "solutionLink": "#",
- "problemName": "Learn to Comment"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-if-two-strings-are-k-anagrams-or-not/1",
- "solutionLink": "#",
- "problemName": "Check if two strings are k-anagrams or not"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/for-loop-primecheck-java/1",
- "solutionLink": "#",
- "problemName": "For Loop- primeCheck - Java"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/run-length-encoding/1",
- "solutionLink": "#",
- "problemName": "Run Length Encoding"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/equal-to-product3836/1",
- "solutionLink": "#",
- "problemName": "Product Pair"
- }
-]
-
-
-
-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 GFG website. You can also click on the solution link to view the solution of the problem.
diff --git a/dsa-problems/gfg-problems/easy/0201-0300.md b/dsa-problems/gfg-problems/easy/0201-0300.md
deleted file mode 100644
index ce9ebb267..000000000
--- a/dsa-problems/gfg-problems/easy/0201-0300.md
+++ /dev/null
@@ -1,622 +0,0 @@
----
-id: 0201-0300
-title: GFG easy problems 0201-0300
-sidebar_label: 0201-0300
-keywords:
- - gfg problems
- - gfg problems easy
- - gfg problems problems
----
-
-
-export const problems = [
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/occurence-of-an-integer-in-a-linked-list/1",
- "solutionLink": "#",
- "problemName": "Occurence of an integer in a Linked List"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-all-prime-numbers-between-1-and-n4404/1",
- "solutionLink": "#",
- "problemName": "Sum of all prime numbers between 1 and N."
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-sum-problem2211/1",
- "solutionLink": "#",
- "problemName": "Maximum Sum Problem"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/learn-to-comment-java/1",
- "solutionLink": "#",
- "problemName": "Learn to Comment - Java"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/number-of-open-doors1552/1",
- "solutionLink": "#",
- "problemName": "Number Of Open Doors"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sieve-of-eratosthenes5242/1",
- "solutionLink": "#",
- "problemName": "Sieve of Eratosthenes"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-if-it-is-possible-to-survive-on-island4922/1",
- "solutionLink": "#",
- "problemName": "Check if it is possible to survive on Island"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/four-elements2452/1",
- "solutionLink": "#",
- "problemName": "Four Elements"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/copy-set-bits-in-range0623/1",
- "solutionLink": "#",
- "problemName": "Copy Set Bits in Range"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/three-great-candidates0515/1",
- "solutionLink": "#",
- "problemName": "Three Great Candidates"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/split-a-circular-linked-list-into-two-halves/1",
- "solutionLink": "#",
- "problemName": "Split a Circular Linked List into two halves"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/print-bst-elements-in-given-range/1",
- "solutionLink": "#",
- "problemName": "Print BST elements in given range"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/smallest-window-containing-0-1-and-2--170637/1",
- "solutionLink": "#",
- "problemName": "Smallest window containing 0, 1 and 2"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/roof-top-1587115621/1",
- "solutionLink": "#",
- "problemName": "Roof Top"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/numbers-containing-1-2-and-32555/1",
- "solutionLink": "#",
- "problemName": "Numbers containing 1, 2 and 3"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/right-triangle/1",
- "solutionLink": "#",
- "problemName": "Pattern 2"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/inorder-traversal-and-bst5855/1",
- "solutionLink": "#",
- "problemName": "Inorder Traversal and BST"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/delete-n-nodes-after-m-nodes-of-a-linked-list/1",
- "solutionLink": "#",
- "problemName": "Delete N nodes after M nodes of a linked list"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/frogs-and-jumps--170647/1",
- "solutionLink": "#",
- "problemName": "Frogs and Jumps"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/largest-number-with-given-sum-1587115620/1",
- "solutionLink": "#",
- "problemName": "Largest number with given sum"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/recursive-sequence1611/1",
- "solutionLink": "#",
- "problemName": "Recursive sequence"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sort-by-set-bit-count1153/1",
- "solutionLink": "#",
- "problemName": "Sort by Set Bit Count"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/make-the-array-beautiful--170647/1",
- "solutionLink": "#",
- "problemName": "Make the array beautiful"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/pair-with-given-sum-in-a-sorted-array4940/1",
- "solutionLink": "#",
- "problemName": "Pair with given sum in a sorted array"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/closest-neighbor-in-bst/1",
- "solutionLink": "#",
- "problemName": "Closest Neighbour in BST"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/smallest-subset-with-greater-sum/1",
- "solutionLink": "#",
- "problemName": "Smallest Subset with Greater Sum"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/fibonacci-series-up-to-nth-term/1",
- "solutionLink": "#",
- "problemName": "Fibonacci series up to Nth term"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/unique-rows-in-boolean-matrix/1",
- "solutionLink": "#",
- "problemName": "Unique rows in boolean matrix"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/ceil-the-floor2802/1",
- "solutionLink": "#",
- "problemName": "Ceil The Floor"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/min-number-of-flips3210/1",
- "solutionLink": "#",
- "problemName": "Min Number of Flips"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-of-strings-that-can-be-formed-using-a-b-and-c-under-given-constraints1135/1",
- "solutionLink": "#",
- "problemName": "String's Count"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-dependencies-in-a-graph5311/1",
- "solutionLink": "#",
- "problemName": "Sum of dependencies in a graph"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/search-in-a-rotated-array0959/1",
- "solutionLink": "#",
- "problemName": "Search an element in sorted and rotated array"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-leaf-nodes-in-bst/1",
- "solutionLink": "#",
- "problemName": "Sum of leaf nodes in BST"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/triangle-number/1",
- "solutionLink": "#",
- "problemName": "Pattern 3"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/chinky-and-diamonds3340/1",
- "solutionLink": "#",
- "problemName": "Maximum Diamonds"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/facing-the-sun2126/1",
- "solutionLink": "#",
- "problemName": "Facing the sun"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/searching-in-an-array-where-adjacent-differ-by-at-most-k0456/1",
- "solutionLink": "#",
- "problemName": "Searching in an array where adjacent differ by at most k"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/adding-ones3628/1",
- "solutionLink": "#",
- "problemName": "Adding Ones"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/multiply-two-linked-lists/1",
- "solutionLink": "#",
- "problemName": "Multiply two linked lists"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/swap-all-odd-and-even-bits-1587115621/1",
- "solutionLink": "#",
- "problemName": "Swap all odd and even bits"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/unique-frequencies-of-not/1",
- "solutionLink": "#",
- "problemName": "Unique Number of Occurrences"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/seating-arrangement--170647/1",
- "solutionLink": "#",
- "problemName": "Seating Arrangement"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/leaf-under-budget/1",
- "solutionLink": "#",
- "problemName": "Leaf under budget"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-pairs-sum-in-matrices4332/1",
- "solutionLink": "#",
- "problemName": "Count pairs Sum in matrices"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/convert-an-array-to-reduced-form1101/1",
- "solutionLink": "#",
- "problemName": "Convert an array to reduced form"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/generate-binary-numbers-1587115620/1",
- "solutionLink": "#",
- "problemName": "Generate Binary Numbers"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-the-first-node-of-loop-in-linked-list--170645/1",
- "solutionLink": "#",
- "problemName": "Find the first node of loop in linked list"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/page-faults-in-lru5603/1",
- "solutionLink": "#",
- "problemName": "Page Faults in LRU"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/max-distance-between-same-elements/1",
- "solutionLink": "#",
- "problemName": "Max distance between same elements"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/nextline-and-next/1",
- "solutionLink": "#",
- "problemName": "nextLine and next"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/surround-the-1s2505/1",
- "solutionLink": "#",
- "problemName": "Surround the 1's"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/merge-two-binary-max-heap0144/1",
- "solutionLink": "#",
- "problemName": "Merge two binary Max heaps"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/common-elements5420/1",
- "solutionLink": "#",
- "problemName": "Common Elements"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/overlapping-rectangles1924/1",
- "solutionLink": "#",
- "problemName": "Overlapping rectangles"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-elements-between-k1th-and-k2th-smallest-elements3133/1",
- "solutionLink": "#",
- "problemName": "Sum of elements between k1'th and k2'th smallest elements"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/swap-two-nibbles-in-a-byte0446/1",
- "solutionLink": "#",
- "problemName": "Swap two nibbles in a byte"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/min-sum-formed-by-digits3551/1",
- "solutionLink": "#",
- "problemName": "Min sum formed by digits"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/recamans-sequence4856/1",
- "solutionLink": "#",
- "problemName": "Recamans sequence"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/triangle-number-1661428795/1",
- "solutionLink": "#",
- "problemName": "Pattern 4"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/counting-sort/1",
- "solutionLink": "#",
- "problemName": "Counting Sort"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/primes-sum5827/1",
- "solutionLink": "#",
- "problemName": "Primes sum"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/data-types-java/1",
- "solutionLink": "#",
- "problemName": "Data Types - Java"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/juggler-sequence3930/1",
- "solutionLink": "#",
- "problemName": "Juggler Sequence"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-no-of-1s-row3027/1",
- "solutionLink": "#",
- "problemName": "Maximum no of 1's row"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/taking-input/1",
- "solutionLink": "#",
- "problemName": "Taking input"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/intersection-of-two-sorted-array-1587115620/1",
- "solutionLink": "#",
- "problemName": "Intersection of two sorted arrays"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sort-by-absolute-difference-1587115621/1",
- "solutionLink": "#",
- "problemName": "Sort by Absolute Difference"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/step-by-step-condition-java/1",
- "solutionLink": "#",
- "problemName": "Step by Step Condition - Java"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/frequency-game/1",
- "solutionLink": "#",
- "problemName": "Frequency Game"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/ancestors-in-binary-tree/1",
- "solutionLink": "#",
- "problemName": "Ancestors in Binary Tree"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/twice-counter4236/1",
- "solutionLink": "#",
- "problemName": "Twice Counter"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/you-and-your-books/1",
- "solutionLink": "#",
- "problemName": "You and your books"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/help-nobita0532/1",
- "solutionLink": "#",
- "problemName": "Odd Even Problem"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/insert-an-element-at-the-bottom-of-a-stack/1",
- "solutionLink": "#",
- "problemName": "Insert an Element at the Bottom of a Stack"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/remainder-on-dividing-by-11--170647/1",
- "solutionLink": "#",
- "problemName": "Remainder on dividing by 11"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/if-loop-python/1",
- "solutionLink": "#",
- "problemName": "If conditional statement- Python"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/nearest-multiple-of-102437/1",
- "solutionLink": "#",
- "problemName": "Nearest multiple of 10"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/adding-array-element4756/1",
- "solutionLink": "#",
- "problemName": "Adding Array Elements"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/ease-the-array0633/1",
- "solutionLink": "#",
- "problemName": "Ease the Array"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/xoring-and-clearing/1",
- "solutionLink": "#",
- "problemName": "Xoring and Clearing"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/missing-element-of-ap2228/1",
- "solutionLink": "#",
- "problemName": "Missing element of AP"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/queue-operations/1",
- "solutionLink": "#",
- "problemName": "Queue Operations"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/remaining-string3515/1",
- "solutionLink": "#",
- "problemName": "Remaining String"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/print-diagonally4331/1",
- "solutionLink": "#",
- "problemName": "Print Diagonally"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/two-mirror-trees/1",
- "solutionLink": "#",
- "problemName": "Two Mirror Trees"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/closest-strings0611/1",
- "solutionLink": "#",
- "problemName": "Closest Strings"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/step-by-step-condition/1",
- "solutionLink": "#",
- "problemName": "Step by Step Condition"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/positive-negative-pair5209/1",
- "solutionLink": "#",
- "problemName": "Positive Negative Pair"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/learning-to-be-precise/1",
- "solutionLink": "#",
- "problemName": "Learning to be precise"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-leaf-nodes/1",
- "solutionLink": "#",
- "problemName": "Sum of Leaf Nodes"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-odd-even-java/1",
- "solutionLink": "#",
- "problemName": "Count Odd Even - Java"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/move-last-element-to-front-of-a-linked-list/1",
- "solutionLink": "#",
- "problemName": "Move Last Element to Front of a Linked List"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/while-loop-printtable-java/1",
- "solutionLink": "#",
- "problemName": "While loop- printTable - Java"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/remove-duplicates-in-small-prime-array/1",
- "solutionLink": "#",
- "problemName": "Remove duplicates in small prime array"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/max-level-sum-in-binary-tree/1",
- "solutionLink": "#",
- "problemName": "Max Level Sum in Binary Tree"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/vertical-width-of-a-binary-tree/1",
- "solutionLink": "#",
- "problemName": "Vertical Width of a Binary Tree"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/print-n-to-1-without-loop/1",
- "solutionLink": "#",
- "problemName": "Print N to 1 without loop"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/make-array-elements-equal--170647/1",
- "solutionLink": "#",
- "problemName": "Make Array Elements Equal"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/dominant-pairs/1",
- "solutionLink": "#",
- "problemName": "Dominant Pairs"
- }
-]
-
-
-
-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 GFG website. You can also click on the solution link to view the solution of the problem.
\ No newline at end of file
diff --git a/dsa-problems/gfg-problems/easy/0301-0400.md b/dsa-problems/gfg-problems/easy/0301-0400.md
deleted file mode 100644
index 63d861375..000000000
--- a/dsa-problems/gfg-problems/easy/0301-0400.md
+++ /dev/null
@@ -1,623 +0,0 @@
----
-id: 0301-0400
-title: GFG easy problems 0301-0400
-sidebar_label: 0301-0400
-keywords:
- - gfg problems
- - gfg problems easy
- - gfg problems problems
----
-
-
-export const problems = [
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/make-array-elements-equal--170647/1",
- "solutionLink": "#",
- "problemName": "Make Array Elements Equal"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/dominant-pairs/1",
- "solutionLink": "#",
- "problemName": "Dominant Pairs"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/least-prime-factor5216/1",
- "solutionLink": "#",
- "problemName": "Least Prime Factor"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/print-gfg-n-times/1",
- "solutionLink": "#",
- "problemName": "Print GFG n times"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/array-operations--170648/1",
- "solutionLink": "#",
- "problemName": "Array Operations"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/pairs-with-specific-difference1533/1",
- "solutionLink": "#",
- "problemName": "Pairs with certain difference"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/even-odd/1",
- "solutionLink": "#",
- "problemName": "Even Odd"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/convert-to-roman-no/1",
- "solutionLink": "#",
- "problemName": "Convert to Roman No"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/tom-and-jerry1325/1",
- "solutionLink": "#",
- "problemName": "Tom and Jerry"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-the-paths4332/1",
- "solutionLink": "#",
- "problemName": "Count the paths"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/equal-left-and-right-subarray-sum--170647/1",
- "solutionLink": "#",
- "problemName": "Equal Left and Right Subarray Sum"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/binary-modulo--170648/1",
- "solutionLink": "#",
- "problemName": "Binary Modulo"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/logical-operators-java/1",
- "solutionLink": "#",
- "problemName": "logical Operators - Java"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/c-letters-collection4552/1",
- "solutionLink": "#",
- "problemName": "Letters Collection"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/make-palindrome--170647/1",
- "solutionLink": "#",
- "problemName": "Make Palindrome"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/swap-and-maximize5859/1",
- "solutionLink": "#",
- "problemName": "Swap and Maximize"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/wifi-range--170647/1",
- "solutionLink": "#",
- "problemName": "Wifi Range"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/learning-macros/1",
- "solutionLink": "#",
- "problemName": "Learning Macros"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/total-traversal-time/1",
- "solutionLink": "#",
- "problemName": "Total Traversal Time"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-left-leaf-nodes/1",
- "solutionLink": "#",
- "problemName": "Sum of Left Leaf Nodes"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/reversing-the-equation2205/1",
- "solutionLink": "#",
- "problemName": "Reversing the equation"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/convert-a-sentence-into-its-equivalent-mobile-numeric-keypad-sequence0547/1",
- "solutionLink": "#",
- "problemName": "Convert a sentence into its equivalent mobile numeric keypad sequence"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/ticket-counter-2731/1",
- "solutionLink": "#",
- "problemName": "Ticket Counter"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/insert-in-sorted-way-in-a-sorted-dll/1",
- "solutionLink": "#",
- "problemName": "Insert in Sorted way in a Sorted DLL"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/max-and-min-element-in-binary-tree/1",
- "solutionLink": "#",
- "problemName": "Max and min element in Binary Tree"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/odd-even-level-difference/1",
- "solutionLink": "#",
- "problemName": "Odd even level difference"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/mark-even-and-odd/1",
- "solutionLink": "#",
- "problemName": "Mark Even and Odd - Python"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/extract-the-number-from-the-string3428/1",
- "solutionLink": "#",
- "problemName": "Extract the Number from the String"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/deque-implementations/1",
- "solutionLink": "#",
- "problemName": "Deque Implementations"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/getline-and-ignore/1",
- "solutionLink": "#",
- "problemName": "GetLine and Ignore"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-pairs-with-given-sum-in-doubly-linked-list/1",
- "solutionLink": "#",
- "problemName": "Find pairs with given sum in doubly linked list"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-depth-of-binary-tree/1",
- "solutionLink": "#",
- "problemName": "Maximum Depth Of Binary Tree"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/reorganize-the-array4810/1",
- "solutionLink": "#",
- "problemName": "Reorganize The Array"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/expression-tree/1",
- "solutionLink": "#",
- "problemName": "Expression Tree"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-sum-of-absolute-differences-of-pairs/1",
- "solutionLink": "#",
- "problemName": "Minimum Sum of Absolute Differences of Pairs"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/pairs-with-positive-negative-values3719/1",
- "solutionLink": "#",
- "problemName": "Pairs with Positive Negative values"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/squares-in-nn-chessboard1801/1",
- "solutionLink": "#",
- "problemName": "Squares in N*N Chessboard"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/trace-path3840/1",
- "solutionLink": "#",
- "problemName": "Trace Path"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/geek-jump/1",
- "solutionLink": "#",
- "problemName": "Geek Jump"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/print-bracket-number4058/1",
- "solutionLink": "#",
- "problemName": "Print Bracket Number"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/string-mirror--170647/1",
- "solutionLink": "#",
- "problemName": "String Mirror"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/divisor-game-1664432414/1",
- "solutionLink": "#",
- "problemName": "Divisor Game"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/fitting-the-array1514/1",
- "solutionLink": "#",
- "problemName": "Fitting The Array"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-number-of-words1500/1",
- "solutionLink": "#",
- "problemName": "Count number of words"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/bit-magic--170648/1",
- "solutionLink": "#",
- "problemName": "Bit Magic"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-identical-bowls--170647/1",
- "solutionLink": "#",
- "problemName": "Maximum Identical Bowls"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/while-loop-printtable/1",
- "solutionLink": "#",
- "problemName": "While loop- printTable"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/bitwise-operators/1",
- "solutionLink": "#",
- "problemName": "Bitwise Operators"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/pattern-searching4145/1",
- "solutionLink": "#",
- "problemName": "Pattern Searching"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/prime-factors5052/1",
- "solutionLink": "#",
- "problemName": "Prime Factors"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/total-cuts--170648/1",
- "solutionLink": "#",
- "problemName": "Total Cuts"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-number--170647/1",
- "solutionLink": "#",
- "problemName": "Minimum Number"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/binary-search-in-forest--141631/1",
- "solutionLink": "#",
- "problemName": "Binary Search in forest"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/root-to-leaf-paths-sum/1",
- "solutionLink": "#",
- "problemName": "Root to leaf paths sum"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/powerfull-integer--170647/1",
- "solutionLink": "#",
- "problemName": "Powerfull Integer"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-k-smallest-elements-in-bst3029/1",
- "solutionLink": "#",
- "problemName": "Sum of k smallest elements in BST"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/k-th-missing-element3635/1",
- "solutionLink": "#",
- "problemName": "K-th missing element"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/deletion-and-reverse-in-linked-list/1",
- "solutionLink": "#",
- "problemName": "Deletion and Reverse in Linked List"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/license-key-formatting/1",
- "solutionLink": "#",
- "problemName": "License Key Formatting"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/is-it-fibonacci--170647/1",
- "solutionLink": "#",
- "problemName": "Is it Fibonacci"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sequence-fun5018/1",
- "solutionLink": "#",
- "problemName": "Sequence Fun"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/the-modified-string-1587115621/1",
- "solutionLink": "#",
- "problemName": "The Modified String"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/number-of-subarrays-of-0s--170647/1",
- "solutionLink": "#",
- "problemName": "Number of Subarrays of 0's"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/length-unsorted-subarray3022/1",
- "solutionLink": "#",
- "problemName": "Length Unsorted Subarray"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/level-of-a-node-in-binary-tree/1",
- "solutionLink": "#",
- "problemName": "Level of a Node in Binary Tree"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/consonants-and-vowels-check-java/1",
- "solutionLink": "#",
- "problemName": "Consonants and Vowels check - Java"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-two-numbers-without-using-arithmetic-operators/1",
- "solutionLink": "#",
- "problemName": "Sum of two numbers without using arithmetic operators"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/bbt-counter4914/1",
- "solutionLink": "#",
- "problemName": "BBT counter"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/counts-zeros-xor-pairs0349/1",
- "solutionLink": "#",
- "problemName": "Counts Zeros Xor Pairs"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-weight-node--170645/1",
- "solutionLink": "#",
- "problemName": "Maximum Weight Node"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/chicks-in-a-zoo1159/1",
- "solutionLink": "#",
- "problemName": "Chicks in a Zoo"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/break-a-number5913/1",
- "solutionLink": "#",
- "problemName": "Break a number"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/next-greater-number-set-digits3503/1",
- "solutionLink": "#",
- "problemName": "Next greater number set digits"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/compare-two-linked-lists/1",
- "solutionLink": "#",
- "problemName": "Compare two linked lists"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/taxi-booking--170647/1",
- "solutionLink": "#",
- "problemName": "Taxi Booking"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-numbers-containing-43022/1",
- "solutionLink": "#",
- "problemName": "Count numbers containing 4"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/disjoint-set-union-find/1",
- "solutionLink": "#",
- "problemName": "Disjoint set (Union-Find)"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-indexed-character0221/1",
- "solutionLink": "#",
- "problemName": "Minimum indexed character"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/queue-using-stack/1",
- "solutionLink": "#",
- "problemName": "Queue using stack"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/cutting-rectangles--170647/1",
- "solutionLink": "#",
- "problemName": "Cutting Rectangles"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/balloon-everywhere--170646/1",
- "solutionLink": "#",
- "problemName": "Balloon Everywhere"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/number-to-words0335/1",
- "solutionLink": "#",
- "problemName": "Integer to Words"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/smallest-greater-elements-in-whole-array2751/1",
- "solutionLink": "#",
- "problemName": "Smallest greater elements in whole array"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/buildings-receiving-sunlight3032/1",
- "solutionLink": "#",
- "problemName": "Buildings receiving sunlight"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/the-pattern-matcher-java/1",
- "solutionLink": "#",
- "problemName": "The Pattern Matcher - Java"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/split-the-binary-string-into-substrings-with-equal-number-of-0s-and-1s/1",
- "solutionLink": "#",
- "problemName": "Split the binary string into substrings with equal number of 0s and 1s"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-the-specials/1",
- "solutionLink": "#",
- "problemName": "Count the Specials"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-number-of-zeroes4048/1",
- "solutionLink": "#",
- "problemName": "Maximum number of zeroes"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-two-numbers-represented-as-arrays3110/1",
- "solutionLink": "#",
- "problemName": "Sum of two numbers represented as arrays"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-if-array-contains-contiguous-integers-with-duplicates-allowed2046/1",
- "solutionLink": "#",
- "problemName": "Check if array contains contiguous integers with duplicates allowed"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/single-number1014/1",
- "solutionLink": "#",
- "problemName": "Single Number"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/binary-matrix-having-maximum-number-of-1s--170647/1",
- "solutionLink": "#",
- "problemName": "Binary matrix having maximum number of 1s"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/help-ishaan5837/1",
- "solutionLink": "#",
- "problemName": "Help Ishaan"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/triangle-pattern-1662286302/1",
- "solutionLink": "#",
- "problemName": "Pattern 18"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/full-binary-tree/1",
- "solutionLink": "#",
- "problemName": "Full Binary Tree"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/almost-equal-java/1",
- "solutionLink": "#",
- "problemName": "Almost Equal -Java"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/matrix-interchange-java/1",
- "solutionLink": "#",
- "problemName": "Matrix Interchange - Java"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/rectangles-in-nn-board5930/1",
- "solutionLink": "#",
- "problemName": "Rectangles in N*N Board"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/make-zeroes4042/1",
- "solutionLink": "#",
- "problemName": "Make Zeroes"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-node-level/1",
- "solutionLink": "#",
- "problemName": "Maximum Node Level"
- }
-]
-
-
-
-
-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.
\ No newline at end of file
diff --git a/dsa-problems/gfg-problems/easy/0401-0500.md b/dsa-problems/gfg-problems/easy/0401-0500.md
deleted file mode 100644
index 12f066969..000000000
--- a/dsa-problems/gfg-problems/easy/0401-0500.md
+++ /dev/null
@@ -1,623 +0,0 @@
----
-id: 0401-0500
-title: GFG easy problems 0401-0500
-sidebar_label: 0401-0500
-keywords:
- - gfg problems
- - gfg problems easy
- - gfg problems problems
----
-
-
-export const problems = [
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-node-level/1",
- "solutionLink": "#",
- "problemName": "Maximum Node Level"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/triangle-pattern-1662284916/1",
- "solutionLink": "#",
- "problemName": "Pattern 14"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/equilibrium-index-of-an-array/1",
- "solutionLink": "#",
- "problemName": "Equilibrium index of an array"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/type-it--170645/1",
- "solutionLink": "#",
- "problemName": "Type it!"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/next-right-node/1",
- "solutionLink": "#",
- "problemName": "Next Right Node"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimize-the-sum--170645/1",
- "solutionLink": "#",
- "problemName": "Minimize the sum"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-the-substrings--141634/1",
- "solutionLink": "#",
- "problemName": "Count the Substrings"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/match-specific-pattern/1",
- "solutionLink": "#",
- "problemName": "Match specific pattern"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-if-the-number-is-balanced3014/1",
- "solutionLink": "#",
- "problemName": "Check if the number is balanced"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/even-and-odd/1",
- "solutionLink": "#",
- "problemName": "Even and Odd"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/square-pattern-1662287714/1",
- "solutionLink": "#",
- "problemName": "Pattern 21"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/bus-conductor--170647/1",
- "solutionLink": "#",
- "problemName": "Bus Conductor"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-number-of-free-cell--170646/1",
- "solutionLink": "#",
- "problemName": "Count number of free cell"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/k-pangrams0909/1",
- "solutionLink": "#",
- "problemName": "K-Pangrams"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/deletion-in-a-binary-tree/1",
- "solutionLink": "#",
- "problemName": "Deletion in a Binary Tree"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-the-node-with-maximum-gcd-of-the-siblings-of-a-binary-tree/1",
- "solutionLink": "#",
- "problemName": "Find the Node with maximum GCD of the siblings of a Binary Tree"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/bitwise-operators-java/1",
- "solutionLink": "#",
- "problemName": "Bitwise Operators - Java"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/magic-in-cpp/1",
- "solutionLink": "#",
- "problemName": "Magic in CPP"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/triangle-pattern-1662285196/1",
- "solutionLink": "#",
- "problemName": "Pattern 15"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/remove-b-and-ac-from-a-given-string4336/1",
- "solutionLink": "#",
- "problemName": "Remove b and ac from a given string"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-steps-to-make-product-equal-to-one/1",
- "solutionLink": "#",
- "problemName": "Minimum steps to make product equal to one"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-substrings0427/1",
- "solutionLink": "#",
- "problemName": "Count Substrings"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/101-pattern-count1341/1",
- "solutionLink": "#",
- "problemName": "1[0]1 Pattern Count"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/max-level-sum-in-binary-tree--170647/1",
- "solutionLink": "#",
- "problemName": "Max Level Sum in Binary Tree"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/pair-cube-count4132/1",
- "solutionLink": "#",
- "problemName": "Pair cube count"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/arraylist-operation/1",
- "solutionLink": "#",
- "problemName": "ArrayList Operation"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-if-it-is-possible-to-convert-one-string-into-another-with-given-constraints4116/1",
- "solutionLink": "#",
- "problemName": "Check if it is possible to convert one string into another with given constraints"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-sum-lcm3025/1",
- "solutionLink": "#",
- "problemName": "Maximum Sum LCM"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/double-triangle-pattern-1662664259/1",
- "solutionLink": "#",
- "problemName": "Pattern 12"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-height-of-the-staircase5755/1",
- "solutionLink": "#",
- "problemName": "Maximum height of the staircase"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/min-operations--170645/1",
- "solutionLink": "#",
- "problemName": "Min operations"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/jumping-through-while-python/1",
- "solutionLink": "#",
- "problemName": "Jumping through While - Python"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/triangle-pattern-1662285334/1",
- "solutionLink": "#",
- "problemName": "Pattern 16"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/remove-half-nodes/1",
- "solutionLink": "#",
- "problemName": "Remove Half Nodes"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/start-elements3447/1",
- "solutionLink": "#",
- "problemName": "Star elements"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/even-odd-java/1",
- "solutionLink": "#",
- "problemName": "Even Odd - Java"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/rearrange-a-string4100/1",
- "solutionLink": "#",
- "problemName": "Rearrange a string"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/linked-list-of-strings-forms-a-palindrome/1",
- "solutionLink": "#",
- "problemName": "linked list of strings forms a palindrome"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/union-find/1",
- "solutionLink": "#",
- "problemName": "Union-Find"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/reverse-both-parts--170647/1",
- "solutionLink": "#",
- "problemName": "Reverse both parts"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/add-two-numbers-represented-by-two-arrays2408/1",
- "solutionLink": "#",
- "problemName": "Add two numbers represented by two arrays"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/last-cell-in-a-matrix/1",
- "solutionLink": "#",
- "problemName": "Last cell in a Matrix"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/need-some-change-java/1",
- "solutionLink": "#",
- "problemName": "Need Some Change - Java"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/linked-list-in-zig-zag-fashion/1",
- "solutionLink": "#",
- "problemName": "Linked List in Zig-Zag fashion"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-the-minimum-time0253/1",
- "solutionLink": "#",
- "problemName": "Find the minimum time"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/transform-to-sum-tree--170645/1",
- "solutionLink": "#",
- "problemName": "Transform to Sum Tree"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-equals-to-sum4006/1",
- "solutionLink": "#",
- "problemName": "Sum equals to Sum"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/jumping-caterpillars4412/1",
- "solutionLink": "#",
- "problemName": "Jumping Caterpillars"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/introduction-to-linked-list/1",
- "solutionLink": "#",
- "problemName": "Introduction to Linked List"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/two-dimensional-world/1",
- "solutionLink": "#",
- "problemName": "Two Dimensional World"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/help-the-old-man3848/1",
- "solutionLink": "#",
- "problemName": "Help the Old Man!!!"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/delete-array/1",
- "solutionLink": "#",
- "problemName": "Delete Array"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/magical-number-1587115620/1",
- "solutionLink": "#",
- "problemName": "Magical Number"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/longest-consecutive-sequence-in-binary-tree/1",
- "solutionLink": "#",
- "problemName": "Longest consecutive sequence in Binary tree"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/the-nth-fibonnaci3150/1",
- "solutionLink": "#",
- "problemName": "The Nth Fibonnaci"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/largest-fibonacci-subsequence2206/1",
- "solutionLink": "#",
- "problemName": "Largest Fibonacci Subsequence"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-equal-point-in-string-of-brackets2542/1",
- "solutionLink": "#",
- "problemName": "Equal point in a string of brackets"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/easy-string2212/1",
- "solutionLink": "#",
- "problemName": "Easy string"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/last-modified-ball--170645/1",
- "solutionLink": "#",
- "problemName": "Last modified ball"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/move-all-zeros-to-the-front-of-the-linked-list/1",
- "solutionLink": "#",
- "problemName": "Move all zeros to the front of the linked list"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/smallest-number-with-sum-of-digits-as-n-and-divisible-by-10n4032/1",
- "solutionLink": "#",
- "problemName": "Smallest number with sum of digits as N and divisible by 10^N"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/right-most-non-zero-digit1834/1",
- "solutionLink": "#",
- "problemName": "Right most non zero digit"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/special-array-reversal2328/1",
- "solutionLink": "#",
- "problemName": "Special array reversal"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/is-square1846/1",
- "solutionLink": "#",
- "problemName": "Is Square"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/double-triangle-pattern-1662287416/1",
- "solutionLink": "#",
- "problemName": "Pattern 20"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/nth-number-made-of-prime-digits4319/1",
- "solutionLink": "#",
- "problemName": "Nth number made of prime digits"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/balanced-string1627/1",
- "solutionLink": "#",
- "problemName": "Balanced string"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/string-manipulation3706/1",
- "solutionLink": "#",
- "problemName": "String Manipulation"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/pair-in-array-whose-sum-is-closest-to-x1124/1",
- "solutionLink": "#",
- "problemName": "Sum Pair closest to X"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/predict-the-column-java/1",
- "solutionLink": "#",
- "problemName": "Predict the Column - Java"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/nodes-at-odd-levels/1",
- "solutionLink": "#",
- "problemName": "Nodes at Odd Levels"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/all-divisors-of-a-number/1",
- "solutionLink": "#",
- "problemName": "All divisors of a Number"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/pairs-which-are-divisible-by-41920/1",
- "solutionLink": "#",
- "problemName": "Pairs which are Divisible by 4"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/for-loop-python/1",
- "solutionLink": "#",
- "problemName": "For loop - Python"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/abset-25327/1",
- "solutionLink": "#",
- "problemName": "Exponentiation (Set 2)"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-number-of-22-squares/1",
- "solutionLink": "#",
- "problemName": "Maximum number of 2X2 squares"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-leaf-nodes-at-min-level/1",
- "solutionLink": "#",
- "problemName": "Sum of Leaf Nodes at Min Level"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/back-to-front/1",
- "solutionLink": "#",
- "problemName": "Back to Front"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-gap3845/1",
- "solutionLink": "#",
- "problemName": "Maximum Gap"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/pairs-with-difference-k1713/1",
- "solutionLink": "#",
- "problemName": "Pairs with difference k"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-the-specials-java/1",
- "solutionLink": "#",
- "problemName": "Count the Specials - Java"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-right-leaf-nodes/1",
- "solutionLink": "#",
- "problemName": "Sum of Right Leaf Nodes"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/triangle-pattern-1662285911/1",
- "solutionLink": "#",
- "problemName": "Pattern 17"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/summed-matrix5834/1",
- "solutionLink": "#",
- "problemName": "Summed Matrix"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/subarray-range-with-given-sum2804/1",
- "solutionLink": "#",
- "problemName": "Subarrays with given sum"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/the-bit-game2313/1",
- "solutionLink": "#",
- "problemName": "The Bit Game"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/k-sorted-array1610/1",
- "solutionLink": "#",
- "problemName": "k sorted array"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/largest-value-in-each-level/1",
- "solutionLink": "#",
- "problemName": "Largest value in each level"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/divisible-by-73224/1",
- "solutionLink": "#",
- "problemName": "Divisible by 7"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/learning-structs/1",
- "solutionLink": "#",
- "problemName": "Learning Structs"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/double-triangle-pattern/1",
- "solutionLink": "#",
- "problemName": "Pattern 19"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/perfect-binary-tree/1",
- "solutionLink": "#",
- "problemName": "Perfect Binary Tree"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/while-loop-in-python/1",
- "solutionLink": "#",
- "problemName": "While loop in Python"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/meta-strings5713/1",
- "solutionLink": "#",
- "problemName": "Meta Strings"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/nth-item-through-sum3544/1",
- "solutionLink": "#",
- "problemName": "Nth item through sum"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/addition-of-submatrix5835/1",
- "solutionLink": "#",
- "problemName": "Addition of submatrix"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/stacks-operations/1",
- "solutionLink": "#",
- "problemName": "Stack Operations"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/consonants-and-vowels-check/1",
- "solutionLink": "#",
- "problemName": "Consonants and Vowels check"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/almost-equal/1",
- "solutionLink": "#",
- "problemName": "Almost Equal"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/final-destination4628/1",
- "solutionLink": "#",
- "problemName": "Final Destination"
- }
-]
-
-
-
-
-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.
\ No newline at end of file
diff --git a/dsa-problems/gfg-problems/easy/0501-0600.md b/dsa-problems/gfg-problems/easy/0501-0600.md
deleted file mode 100644
index 13f4d706b..000000000
--- a/dsa-problems/gfg-problems/easy/0501-0600.md
+++ /dev/null
@@ -1,623 +0,0 @@
----
-id: 0501-0600
-title: GFG easy problems 0501-0600
-sidebar_label: 0501-0600
-keywords:
- - gfg problems
- - gfg problems easy
- - gfg problems problems
----
-
-
-export const problems = [
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/bit-manipulation-1666686020/1",
- "solutionLink": "#",
- "problemName": "Bit Manipulation"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/transform-the-array4344/1",
- "solutionLink": "#",
- "problemName": "Transform the array"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/aryas-long-string5840/1",
- "solutionLink": "#",
- "problemName": "Arya's Long String"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/even-and-odd-elements-at-even-and-odd-positions1342/1",
- "solutionLink": "#",
- "problemName": "Even and odd elements at even and odd positions"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/modified-numbers-and-queries0904/1",
- "solutionLink": "#",
- "problemName": "Modified Numbers and Queries"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/length-of-longest-subarray0440/1",
- "solutionLink": "#",
- "problemName": "Length of longest subarray"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/pair-sum-in-vector/1",
- "solutionLink": "#",
- "problemName": "Pair Sum in Vector"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/the-pattern-matcher/1",
- "solutionLink": "#",
- "problemName": "The Pattern Matcher"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/padovan-sequence2855/1",
- "solutionLink": "#",
- "problemName": "Padovan Sequence"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/merge-list-alternatingly/1",
- "solutionLink": "#",
- "problemName": "Merge Lists Alternatingly"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/merging-two-unsorted-arrays-in-sorted-order1020/1",
- "solutionLink": "#",
- "problemName": "Merging two unsorted arrays in sorted order"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/largest-odd-number-in-string/1",
- "solutionLink": "#",
- "problemName": "Largest odd number in string"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-average-subarray5859/1",
- "solutionLink": "#",
- "problemName": "Maximum average subarray"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/pattern-searching5231/1",
- "solutionLink": "#",
- "problemName": "Pattern searching"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/max-value1205/1",
- "solutionLink": "#",
- "problemName": "Max value"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/ball-coloring3450/1",
- "solutionLink": "#",
- "problemName": "Ball coloring"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/for-loop-2-python/1",
- "solutionLink": "#",
- "problemName": "For Loop 2- Python"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-steps-to-minimize-n-as-per-given-condition0618/1",
- "solutionLink": "#",
- "problemName": "Minimum steps to minimize n as per given condition"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/rearrange-geek-and-his-classmates--141630/1",
- "solutionLink": "#",
- "problemName": "Rearrange Geek and his Classmates"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/distributing-question-papers2513/1",
- "solutionLink": "#",
- "problemName": "Minimum Exchange"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/encrypt-the-string-21117/1",
- "solutionLink": "#",
- "problemName": "Encrypt the string - 2"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/construct-bst-from-post-order/1",
- "solutionLink": "#",
- "problemName": "Construct BST from Postorder"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/closing-bracket-index5900/1",
- "solutionLink": "#",
- "problemName": "Closing bracket index"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/remove-duplicates-from-a-sorted-doubly-linked-list/1",
- "solutionLink": "#",
- "problemName": "Remove duplicates from a sorted doubly linked list"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/linked-list-matrix/1",
- "solutionLink": "#",
- "problemName": "Linked List Matrix"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/triangular-number2850/1",
- "solutionLink": "#",
- "problemName": "Triangular Number"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-xor-of-numbers-from-l-to-r/1",
- "solutionLink": "#",
- "problemName": "Find XOR of numbers from L to R."
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/slicing-in-string-python/1",
- "solutionLink": "#",
- "problemName": "Slicing in String - Python"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/biginteger-multiply/1",
- "solutionLink": "#",
- "problemName": "BigInteger Multiply"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-shift-for-longest-common-prefix0759/1",
- "solutionLink": "#",
- "problemName": "Longest common prefix"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/string-comparison5858/1",
- "solutionLink": "#",
- "problemName": "String comparison"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/introduction-to-doubly-linked-list/1",
- "solutionLink": "#",
- "problemName": "Introduction to Doubly Linked List"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/split-singly-linked-list-alternatingly/1",
- "solutionLink": "#",
- "problemName": "Split Singly Linked List Alternatingly"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/delete-array-elements-which-are-smaller-than-next-or-become-smaller3115/1",
- "solutionLink": "#",
- "problemName": "Delete array elements which are smaller than next or become smaller"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/k-palindrome/1",
- "solutionLink": "#",
- "problemName": "K-Palindrome"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/punish-the-students5726/1",
- "solutionLink": "#",
- "problemName": "Punish the Students"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/pass-by-reference-and-value/1",
- "solutionLink": "#",
- "problemName": "Pass by Reference and Value"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/excel-sheet-part-21138/1",
- "solutionLink": "#",
- "problemName": "Excel Sheet | Part - 2"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/string-functions-ii/1",
- "solutionLink": "#",
- "problemName": "String Functions - II - Python"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-big-integers/1",
- "solutionLink": "#",
- "problemName": "Sum of Big Integers"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/change-bits1538/1",
- "solutionLink": "#",
- "problemName": "Change Bits"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/word-with-maximum-frequency0120/1",
- "solutionLink": "#",
- "problemName": "Word with maximum frequency"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/binary-search-trees/1",
- "solutionLink": "#",
- "problemName": "Binary Search Trees"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/ishaan-and-sticks0542/1",
- "solutionLink": "#",
- "problemName": "Ishaan and Sticks"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/distinct-absolute-array-elements4529/1",
- "solutionLink": "#",
- "problemName": "Distinct absolute array elements"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-changes-to-make-all-substrings-distinct4722/1",
- "solutionLink": "#",
- "problemName": "Minimum changes to make all substrings distinct"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/number-game0303/1",
- "solutionLink": "#",
- "problemName": "Number Game"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/square-pattern-1662666141/1",
- "solutionLink": "#",
- "problemName": "Pattern 22"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-lengths-of-non-overlapping-subarrays2237/1",
- "solutionLink": "#",
- "problemName": "Sum of Lengths of Non-Overlapping SubArrays"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/string-palindromic-ignoring-spaces4723/1",
- "solutionLink": "#",
- "problemName": "Palindrome Sentence"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/binary-tree-k-level-sum3857/1",
- "solutionLink": "#",
- "problemName": "Binary Tree K level sum"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/drive-the-car2541/1",
- "solutionLink": "#",
- "problemName": "Drive the car"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/even-fibonacci-numbers-sum1455/1",
- "solutionLink": "#",
- "problemName": "Even Fibonacci Numbers Sum"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/tilt-of-binary-tree/1",
- "solutionLink": "#",
- "problemName": "Tilt of Binary Tree"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-sum-bitonic-subsequence1857/1",
- "solutionLink": "#",
- "problemName": "Maximum Sum Bitonic Subsequence"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/height-of-spiral-tree/1",
- "solutionLink": "#",
- "problemName": "Height of Spiral Tree"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/earthquake-and-the-paint-shop4518/1",
- "solutionLink": "#",
- "problemName": "Earthquake and the Paint Shop"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/swap-the-objects/1",
- "solutionLink": "#",
- "problemName": "Swap the objects"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/introduction-to-trees/1",
- "solutionLink": "#",
- "problemName": "Introduction to Trees"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/palindrome-numbers0942/1",
- "solutionLink": "#",
- "problemName": "Palindrome numbers"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/roll-the-characters-of-a-string2127/1",
- "solutionLink": "#",
- "problemName": "Roll the characters of a String"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-alphabets3649/1",
- "solutionLink": "#",
- "problemName": "Count Alphabets"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/operations-on-arraylist/1",
- "solutionLink": "#",
- "problemName": "Operations on ArrayList"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-area-rectangle/1",
- "solutionLink": "#",
- "problemName": "Maximum Area Rectangle"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sort-the-given-array-after-applying-the-given-equation0304/1",
- "solutionLink": "#",
- "problemName": "Sort the given array after applying the given equation"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/min-subsets-with-consecutive-numbers0601/1",
- "solutionLink": "#",
- "problemName": "Min Subsets with Consecutive Numbers"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/divisible-by-82732/1",
- "solutionLink": "#",
- "problemName": "Divisible by 8"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/duplicate-elements/1",
- "solutionLink": "#",
- "problemName": "Duplicate Elements"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/number-of-factors1435/1",
- "solutionLink": "#",
- "problemName": "Number of factors"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/day-of-the-week1637/1",
- "solutionLink": "#",
- "problemName": "Day of the week"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/toppers-of-class3826/1",
- "solutionLink": "#",
- "problemName": "Toppers Of Class"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/biginteger-mod/1",
- "solutionLink": "#",
- "problemName": "BigInteger mod"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/amend-the-sentence3235/1",
- "solutionLink": "#",
- "problemName": "Amend The Sentence"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/generate-binary-string3642/1",
- "solutionLink": "#",
- "problemName": "Generate binary string"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/subarray-with-least-average5031/1",
- "solutionLink": "#",
- "problemName": "Subarray with least average"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-primes-in-range1604/1",
- "solutionLink": "#",
- "problemName": "Count Primes In Range"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-sum-of-subarray-less-than-or-equal-to-x4033/1",
- "solutionLink": "#",
- "problemName": "Maximum sum of subarray less than or equal to x"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/pangram-strings3155/1",
- "solutionLink": "#",
- "problemName": "Pangram Strings"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/prime-string3953/1",
- "solutionLink": "#",
- "problemName": "Prime String"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/repeat-the-strings/1",
- "solutionLink": "#",
- "problemName": "Repeat the Strings - Python"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/common-subsequence4049/1",
- "solutionLink": "#",
- "problemName": "Common Subsequence"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/min-cost-climbing-stairs/1",
- "solutionLink": "#",
- "problemName": "Min Cost Climbing Stairs"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/karatsuba-algorithm0135/1",
- "solutionLink": "#",
- "problemName": "Karatsuba Algorithm"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/string-functions-i/1",
- "solutionLink": "#",
- "problemName": "String Functions I - Python"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/love-for-the-twins2623/1",
- "solutionLink": "#",
- "problemName": "Love For The Twins"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/fill-array-by-1s0920/1",
- "solutionLink": "#",
- "problemName": "Fill array with 1's"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/first-come-first-serve1328/1",
- "solutionLink": "#",
- "problemName": "First Come First Serve"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/part-sort2851/1",
- "solutionLink": "#",
- "problemName": "Part Sort"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/difficulty-of-sentence5856/1",
- "solutionLink": "#",
- "problemName": "Difficulty of sentence"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/operations-on-priorityqueue/1",
- "solutionLink": "#",
- "problemName": "Operations on PriorityQueue"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/adjacents-are-not-allowed3528/1",
- "solutionLink": "#",
- "problemName": "Adjacents are not allowed"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/last-two-digit-fibonacci3353/1",
- "solutionLink": "#",
- "problemName": "Last two digit Fibonacci"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/magic-numbers3143/1",
- "solutionLink": "#",
- "problemName": "Magic numbers"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-energy1107/1",
- "solutionLink": "#",
- "problemName": "Minimum Energy"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-distinct-elements-after-removing-k-elements5906/1",
- "solutionLink": "#",
- "problemName": "Maximum distinct elements after removing K elements"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/multiply-two-polynomals0721/1",
- "solutionLink": "#",
- "problemName": "Multiply two polynomials"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/rearrange-array-such-that-even-positioned-are-greater-than-odd4804/1",
- "solutionLink": "#",
- "problemName": "Rearrange array such that even positioned are greater than odd"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/adding-one2529/1",
- "solutionLink": "#",
- "problemName": "Adding One"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/remove-minimum-elements4612/1",
- "solutionLink": "#",
- "problemName": "Remove minimum elements"
- },
- {
- "difficulty": "Easy",
- "gfgLink": "https://www.geeksforgeeks.org/problems/partition-a-number-into-two-divisible-parts3605/1",
- "solutionLink": "#",
- "problemName": "Partition a number into two divisible parts"
- }
-]
-
-
-
-
-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.
\ No newline at end of file
diff --git a/dsa-problems/gfg-problems/easy/0601-0700.md b/dsa-problems/gfg-problems/easy/0601-0700.md
deleted file mode 100644
index 293206d71..000000000
--- a/dsa-problems/gfg-problems/easy/0601-0700.md
+++ /dev/null
@@ -1,621 +0,0 @@
----
-id: 0601-0700
-title: GFG easy problems 0601-0700
-sidebar_label: 0601-0700
-keywords:
- - gfg problems
- - gfg problems easy
- - gfg problems problems
----
-
-export const problems = [
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/maximum-possible-sum-of-products3637/1",
-"solutionLink": "#",
-"problemName": "Maximum Possible Sum of Products"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/exchange-the-leaf-nodes/1",
-"solutionLink": "#",
-"problemName": "Exchange the Leaf Nodes"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/c-exception-handling3103/1",
-"solutionLink": "#",
-"problemName": "C++ Exception Handling"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/print-the-pattern1025/1",
-"solutionLink": "#",
-"problemName": "Print the pattern"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/twisted-prime-number0500/1",
-"solutionLink": "#",
-"problemName": "Twisted Prime Number"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/unique-binary-tree-requirements/1",
-"solutionLink": "#",
-"problemName": "Unique Binary Tree Requirements"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/student-of-the-year/1",
-"solutionLink": "#",
-"problemName": "Student of the Year"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/multiply-by-111820/1",
-"solutionLink": "#",
-"problemName": "Multiply by 11"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/check-if-a-integer-is-power-of-8-or-not2537/1",
-"solutionLink": "#",
-"problemName": "Check if a Integer is power of 8 or not"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/crack-the-series0304/1",
-"solutionLink": "#",
-"problemName": "Crack the series"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/prime-number-of-set-bits4632/1",
-"solutionLink": "#",
-"problemName": "Prime number of set bits"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/hungry-pizza-lovers3148/1",
-"solutionLink": "#",
-"problemName": "Hungry Pizza Lovers"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/rearrange-an-array-such-that-arri-i3618/1",
-"solutionLink": "#",
-"problemName": "Rearrange an array such that arr[i] = i"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/c-matrix-rotation-by-180-degree0745/1",
-"solutionLink": "#",
-"problemName": "C++ Matrix Rotation by 180 degree"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/c-template/1",
-"solutionLink": "#",
-"problemName": "C++ Template"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/minimum-swaps-required-to-group-all-1s-together2451/1",
-"solutionLink": "#",
-"problemName": "Minimum Swaps required to group all 1s together"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/xor-of-a-given-range/1",
-"solutionLink": "#",
-"problemName": "XOR of a given range"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/good-pairs4519/1",
-"solutionLink": "#",
-"problemName": "Good Pairs"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/numbers-with-same-first-and-last-digit4228/1",
-"solutionLink": "#",
-"problemName": "Numbers with same first and last digit"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/java-collection-set-1-arraylist/1",
-"solutionLink": "#",
-"problemName": "Java Collection | Set 1 (ArrayList) Part-2"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/left-out-candies5652/1",
-"solutionLink": "#",
-"problemName": "Left out candies"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/pair-sum-existence/1",
-"solutionLink": "#",
-"problemName": "Pair Sum Existence"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/min-manipulations-to-make-strings-anagram1421/1",
-"solutionLink": "#",
-"problemName": "Min Manipulations to make Strings Anagram"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/generate-grey-code-sequences/1",
-"solutionLink": "#",
-"problemName": "Generate Grey Code Sequences"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/increasing-sub-sequence1712/1",
-"solutionLink": "#",
-"problemName": "Increasing Sub Sequence"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/dictionary-in-python-ii/1",
-"solutionLink": "#",
-"problemName": "Dictionary in Python - II"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/carry-counter0937/1",
-"solutionLink": "#",
-"problemName": "Carry counter"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/rearrange-linked-list-in-place/1",
-"solutionLink": "#",
-"problemName": "Rearrange linked list in-place"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/c-function-overloading-1587115620/1",
-"solutionLink": "#",
-"problemName": "C++ Function overloading"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/geek-and-his-tricky-series2207/1",
-"solutionLink": "#",
-"problemName": "Geek and his Tricky Series"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/huffman-decoding-1/1",
-"solutionLink": "#",
-"problemName": "Huffman Decoding-1"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/inverted-triangle-of-stars0110/1",
-"solutionLink": "#",
-"problemName": "Inverted triangle of stars"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/gadgets-of-doraland--141631/1",
-"solutionLink": "#",
-"problemName": "Gadgets of Doraland"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/mean-of-range-in-array2123/1",
-"solutionLink": "#",
-"problemName": "Mean of range in array"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/multiset-operations/1",
-"solutionLink": "#",
-"problemName": "Multiset Operations"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/postorder-traversal-from-given-inorder-and-preorder-traversals/1",
-"solutionLink": "#",
-"problemName": "Postorder traversal from given Inorder and Preorder traversals"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/bitonic-generator-sort3343/1",
-"solutionLink": "#",
-"problemName": "Bitonic Generator Sort"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/depth-of-node/1",
-"solutionLink": "#",
-"problemName": "Depth of node"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/outermost-parentheses/1",
-"solutionLink": "#",
-"problemName": "Outermost Parentheses"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/boundary-elements-of-matrix1102/1",
-"solutionLink": "#",
-"problemName": "Boundary Elements of Matrix"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/c-corresponding-position-in-the-two-strings-that-hold-exactly-the-same-characters5013/1",
-"solutionLink": "#",
-"problemName": "Same characters in two strings"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/rope-cutting3334/1",
-"solutionLink": "#",
-"problemName": "Rope Cutting"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/geek-and-his-binary-strings1951/1",
-"solutionLink": "#",
-"problemName": "Geek and his Binary Strings"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/faithful-numbers0014/1",
-"solutionLink": "#",
-"problemName": "Faithful Numbers"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/dictionary-in-python-iii/1",
-"solutionLink": "#",
-"problemName": "Dictionary in Python - III"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/amicable-pair0804/1",
-"solutionLink": "#",
-"problemName": "Amicable Pair"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/count-odd-factors0844/1",
-"solutionLink": "#",
-"problemName": "Count Odd Factors"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/check-if-a-given-string-is-a-rotation-of-a-palindrome0317/1",
-"solutionLink": "#",
-"problemName": "Check if a given string is a rotation of a palindrome"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/rotate-matrix-elements-clockwise2336/1",
-"solutionLink": "#",
-"problemName": "Rotate matrix elements clockwise"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/kth-distance3757/1",
-"solutionLink": "#",
-"problemName": "Kth distance"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/multimap-operations/1",
-"solutionLink": "#",
-"problemName": "Multimap Operations"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/consecutive-array-elements2711/1",
-"solutionLink": "#",
-"problemName": "Consecutive Array Elements"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/next-greater-even-number0828/1",
-"solutionLink": "#",
-"problemName": "Next Greater Even Number"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/missing-ranges-of-numbers1019/1",
-"solutionLink": "#",
-"problemName": "Missing ranges of numbers"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/assign-mice-holes3053/1",
-"solutionLink": "#",
-"problemName": "Assign Mice Holes"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/find-sum-of-divisors5636/1",
-"solutionLink": "#",
-"problemName": "Find sum of divisors "
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/ordering-of-strings5527/1",
-"solutionLink": "#",
-"problemName": "Ordering of strings"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/lucky-number0707/1",
-"solutionLink": "#",
-"problemName": "Lucky Number"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/cross-character2630/1",
-"solutionLink": "#",
-"problemName": "Cross character"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/string-modification-1587115621/1",
-"solutionLink": "#",
-"problemName": "String Modification"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/check-if-actual-binary-representation-of-a-number-is-palindrome0624/1",
-"solutionLink": "#",
-"problemName": "Check if actual binary representation of a number is palindrome"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/largest-zigzag-sequence5416/1",
-"solutionLink": "#",
-"problemName": "Largest zigzag sequence"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/minimal-moves-to-form-a-string4331/1",
-"solutionLink": "#",
-"problemName": "Minimal moves to form a string"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/happy-number1408/1",
-"solutionLink": "#",
-"problemName": "Happy Number"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/subtraction-and-two-numbers0816/1",
-"solutionLink": "#",
-"problemName": "Subtraction and two numbers"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/structs-and-objects/1",
-"solutionLink": "#",
-"problemName": "Structs and Objects"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/even-subsets/1",
-"solutionLink": "#",
-"problemName": "Even Subsets"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/magic-number4431/1",
-"solutionLink": "#",
-"problemName": "Magic Number"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/c-stl-priority-queue/1",
-"solutionLink": "#",
-"problemName": "C++ STL Priority Queue"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/find-the-most-frequent-digit4432/1",
-"solutionLink": "#",
-"problemName": "Find the most frequent digit"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/find-maximum-value/1",
-"solutionLink": "#",
-"problemName": "Find Maximum value"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/swap-bits5726/1",
-"solutionLink": "#",
-"problemName": "Swap bits"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/product-of-prime-factors5121/1",
-"solutionLink": "#",
-"problemName": "Product of Prime Factors"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/kth-prime-factor-of-a-number0132/1",
-"solutionLink": "#",
-"problemName": "Kth Prime Factor"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/xor-linked-list/1",
-"solutionLink": "#",
-"problemName": "XOR Linked List"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/triangle-and-square--170637/1",
-"solutionLink": "#",
-"problemName": "Triangle and Square"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/maximum-number-of-characters-between-any-two-same-character4552/1",
-"solutionLink": "#",
-"problemName": "Maximum number of characters between any two same character"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/print-this-pattern0709/1",
-"solutionLink": "#",
-"problemName": "Print this pattern!"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/distinct-substrings2516/1",
-"solutionLink": "#",
-"problemName": "Distinct Substrings"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/c-multi-level-inheritance/1",
-"solutionLink": "#",
-"problemName": "C++ Multi-level inheritance"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/adding-one2529/1",
-"solutionLink": "#",
-"problemName": "Adding One"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/remove-minimum-elements4612/1",
-"solutionLink": "#",
-"problemName": "Remove minimum elements"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/partition-a-number-into-two-divisible-parts3605/1",
-"solutionLink": "#",
-"problemName": "Partition a number into two divisible parts"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/does-robot-moves-circular0414/1",
-"solutionLink": "#",
-"problemName": "Does robot moves circular"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/minimum-number-of-deletions-to-make-a-sorted-sequence3248/1",
-"solutionLink": "#",
-"problemName": "Minimum number of deletions to make a sorted sequence"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/maximum-sum-of-increasing-order-elements-from-n-arrays4848/1",
-"solutionLink": "#",
-"problemName": "Maximum sum of increasing order elements from n arrays"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/number-that-are-not-divisible4541/1",
-"solutionLink": "#",
-"problemName": "Number that are not divisible"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/deficient-number1612/1",
-"solutionLink": "#",
-"problemName": "Deficient Number"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/minimum-distinct-ids3251/1",
-"solutionLink": "#",
-"problemName": "Minimum Distinct Ids"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/k-ary-tree1235/1",
-"solutionLink": "#",
-"problemName": "K-Ary Tree"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/find-the-highest-occurring-digit-in-prime-numbers-in-a-range3634/1",
-"solutionLink": "#",
-"problemName": "Find the highest occurring digit in prime numbers in a range"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/c-stl-set-2-pair/1",
-"solutionLink": "#",
-"problemName": "C++ STL | Set 2 (pair)"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/largest-even-number3821/1",
-"solutionLink": "#",
-"problemName": "Largest Even Number"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/pair-with-greatest-product-in-array3342/1",
-"solutionLink": "#",
-"problemName": "Pair with greatest product in array"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/chocolate-station2951/1",
-"solutionLink": "#",
-"problemName": "Chocolate Station"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/regular-expressions-2-python/1",
-"solutionLink": "#",
-"problemName": "Regular Expressions 2 - Python"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/find-all-possible-paths-from-top-to-bottom/1",
-"solutionLink": "#",
-"problemName": "Find all possible paths from top to bottom"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/find-maximum-number2152/1",
-"solutionLink": "#",
-"problemName": "Find maximum number"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/binary-tree-representation/1",
-"solutionLink": "#",
-"problemName": "Binary Tree Representation"
-},
-{
-"difficulty": "Easy",
-"gfgLink": "https://www.geeksforgeeks.org/problems/count-digits-in-a-factorial3957/1",
-"solutionLink": "#",
-"problemName": "Count digits in a factorial"
-}
-]
-
-
-
-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.
diff --git a/dsa-problems/gfg-problems/hard/0001-0100.md b/dsa-problems/gfg-problems/hard/0001-0100.md
deleted file mode 100644
index 059646818..000000000
--- a/dsa-problems/gfg-problems/hard/0001-0100.md
+++ /dev/null
@@ -1,622 +0,0 @@
----
-id: 0001-0100
-title: GFG hard problems 0001-0100
-sidebar_label: 0001-0100
-keywords:
- - gfg problems
- - gfg problems hard
- - gfg problems problems
----
-
-
-export const problems = [
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/merge-two-sorted-arrays-1587115620/1",
- "solutionLink": "#",
- "problemName": "Merge Without Extra Space"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/reverse-a-linked-list-in-groups-of-given-size/1",
- "solutionLink": "#",
- "problemName": "Reverse a Linked List in groups of given size"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/edit-distance3702/1",
- "solutionLink": "#",
- "problemName": "Edit Distance"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-path-sum/1",
- "solutionLink": "#",
- "problemName": "Maximum Path Sum between 2 Special Nodes"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-rectangular-area-in-a-histogram-1587115620/1",
- "solutionLink": "#",
- "problemName": "Maximum Rectangular Area in a Histogram"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-sum-partition3317/1",
- "solutionLink": "#",
- "problemName": "Minimum sum partition"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/lru-cache/1",
- "solutionLink": "#",
- "problemName": "LRU Cache"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/palindromic-patitioning4845/1",
- "solutionLink": "#",
- "problemName": "Palindromic Partitioning"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/smallest-window-in-a-string-containing-all-the-characters-of-another-string-1587115621/1",
- "solutionLink": "#",
- "problemName": "Smallest window in a string containing all the characters of another string"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/binary-tree-to-dll/1",
- "solutionLink": "#",
- "problemName": "Binary Tree to DLL"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-median-in-a-stream-1587115620/1",
- "solutionLink": "#",
- "problemName": "Find median in a stream"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/boolean-parenthesization5610/1",
- "solutionLink": "#",
- "problemName": "Boolean Parenthesization"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/median-of-2-sorted-arrays-of-different-sizes/1",
- "solutionLink": "#",
- "problemName": "Median of 2 Sorted Arrays of Different Sizes"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/matrix-chain-multiplication0303/1",
- "solutionLink": "#",
- "problemName": "Matrix Chain Multiplication"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/longest-prefix-suffix2527/1",
- "solutionLink": "#",
- "problemName": "Longest Prefix Suffix"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/the-painters-partition-problem1535/1",
- "solutionLink": "#",
- "problemName": "The Painter's Partition Problem-II"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/max-rectangle/1",
- "solutionLink": "#",
- "problemName": "Max rectangle"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/max-circular-subarray-sum-1587115620/1",
- "solutionLink": "#",
- "problemName": "Max Circular Subarray Sum"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/alien-dictionary/1",
- "solutionLink": "#",
- "problemName": "Alien Dictionary"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/median-in-a-row-wise-sorted-matrix1527/1",
- "solutionLink": "#",
- "problemName": "Median in a row-wise sorted Matrix"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/solve-the-sudoku-1587115621/1",
- "solutionLink": "#",
- "problemName": "Solve the Sudoku"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/longest-valid-parentheses5657/1",
- "solutionLink": "#",
- "problemName": "Longest valid Parentheses"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/form-a-palindrome1455/1",
- "solutionLink": "#",
- "problemName": "Form a palindrome"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-cost-path3833/1",
- "solutionLink": "#",
- "problemName": "Minimum Cost Path"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/nodes-at-given-distance-in-binary-tree/1",
- "solutionLink": "#",
- "problemName": "Nodes at given distance in binary tree"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/subtraction-in-linked-list/1",
- "solutionLink": "#",
- "problemName": "Subtraction in Linked List"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/n-queen-problem0315/1",
- "solutionLink": "#",
- "problemName": "N-Queen Problem"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/clone-a-linked-list-with-next-and-random-pointer/1",
- "solutionLink": "#",
- "problemName": "Clone a linked list with next and random pointer"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/distinct-occurrences/1",
- "solutionLink": "#",
- "problemName": "Distinct occurrences"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/number-of-distinct-subsequences0909/1",
- "solutionLink": "#",
- "problemName": "Number of distinct subsequences"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/next-smallest-palindrome4740/1",
- "solutionLink": "#",
- "problemName": "Next Smallest Palindrome"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/permutations-of-a-given-string-1587115620/1",
- "solutionLink": "#",
- "problemName": "String Permutations"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/wildcard-string-matching1126/1",
- "solutionLink": "#",
- "problemName": "Wildcard string matching"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/reorder-list/1",
- "solutionLink": "#",
- "problemName": "Reorder List"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/merge-two-bst-s/1",
- "solutionLink": "#",
- "problemName": "Merge two BST 's"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/aggressive-cows/1",
- "solutionLink": "#",
- "problemName": "Aggressive Cows"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/circle-of-strings4530/1",
- "solutionLink": "#",
- "problemName": "Circle of strings"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/burning-tree/1",
- "solutionLink": "#",
- "problemName": "Burning Tree"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/wildcard-pattern-matching/1",
- "solutionLink": "#",
- "problemName": "Wildcard Pattern Matching"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/nth-natural-number/1",
- "solutionLink": "#",
- "problemName": "Nth Natural Number"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-pairs-in-an-array4145/1",
- "solutionLink": "#",
- "problemName": "Count Pairs in an Array"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/articulation-point-1/1",
- "solutionLink": "#",
- "problemName": "Articulation Point - I"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-smaller-elements2214/1",
- "solutionLink": "#",
- "problemName": "Count Smaller elements"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimize-max-distance-to-gas-station/1",
- "solutionLink": "#",
- "problemName": "Minimize Max Distance to Gas Station"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/generalised-fibonacci-numbers1820/1",
- "solutionLink": "#",
- "problemName": "Generalised Fibonacci numbers"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/split-array-largest-sum--141634/1",
- "solutionLink": "#",
- "problemName": "Split Array Largest Sum"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/better-string/1",
- "solutionLink": "#",
- "problemName": "Better String"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/fixed-two-nodes-of-a-bst/1",
- "solutionLink": "#",
- "problemName": "Fixing Two nodes of a BST"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/convert-to-strictly-increasing-array3351/1",
- "solutionLink": "#",
- "problemName": "Strictly Increasing Array"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/longest-repeating-and-non-overlapping-substring3421/1",
- "solutionLink": "#",
- "problemName": "Longest repeating and non-overlapping substring"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-sum-of-different-corresponding-bits-for-all-pairs4652/1",
- "solutionLink": "#",
- "problemName": "Bit Difference"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/closest-palindrome4519/1",
- "solutionLink": "#",
- "problemName": "Closest Palindrome"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-points-to-reach-destination0540/1",
- "solutionLink": "#",
- "problemName": "Minimum Points To Reach Destination"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/avl-tree-insertion/1",
- "solutionLink": "#",
- "problemName": "AVL Tree Insertion"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/word-wrap1646/1",
- "solutionLink": "#",
- "problemName": "Word Wrap"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/merge-sort-on-doubly-linked-list/1",
- "solutionLink": "#",
- "problemName": "Merge Sort on Doubly Linked List"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/word-ladder/1",
- "solutionLink": "#",
- "problemName": "Word Ladder I"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/phone-directory4628/1",
- "solutionLink": "#",
- "problemName": "Phone directory"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/smallest-positive-integer-that-can-not-be-represented-as-sum--141631/1",
- "solutionLink": "#",
- "problemName": "Smallest Positive Integer that can not be represented as Sum"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-of-minimum-for-every-window-size3453/1",
- "solutionLink": "#",
- "problemName": "Maximum of minimum for every window size"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/partition-array-to-k-subsets/1",
- "solutionLink": "#",
- "problemName": "Partition array to K subsets"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/making-a-large-island/1",
- "solutionLink": "#",
- "problemName": "Making A Large Island"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-characters-to-be-added-at-front-to-make-string-palindrome/1",
- "solutionLink": "#",
- "problemName": "Minimum characters to be added at front to make string palindrome"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/avl-tree-deletion/1",
- "solutionLink": "#",
- "problemName": "AVL Tree Deletion"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/candy/1",
- "solutionLink": "#",
- "problemName": "Candy"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/largest-rectangular-sub-matrix-whose-sum-is-0/1",
- "solutionLink": "#",
- "problemName": "Largest rectangular sub-matrix whose sum is 0"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/account-merge/1",
- "solutionLink": "#",
- "problemName": "Account Merge"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/next-happy-number4538/1",
- "solutionLink": "#",
- "problemName": "Next Happy Number"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-profit4657/1",
- "solutionLink": "#",
- "problemName": "Maximum Profit"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/critical-connections/1",
- "solutionLink": "#",
- "problemName": "Find all Critical Connections in the Graph"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/brackets-in-matrix-chain-multiplication1024/1",
- "solutionLink": "#",
- "problemName": "Brackets in Matrix Chain Multiplication"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/return-two-prime-numbers2509/1",
- "solutionLink": "#",
- "problemName": "Return two prime numbers"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-string3151/1",
- "solutionLink": "#",
- "problemName": "Sum-string"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/word-break-part-23249/1",
- "solutionLink": "#",
- "problemName": "Word Break - Part 2"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-xor-subarray--141631/1",
- "solutionLink": "#",
- "problemName": "Maximum XOR subarray"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/box-stacking/1",
- "solutionLink": "#",
- "problemName": "Box Stacking"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-subset-xor/1",
- "solutionLink": "#",
- "problemName": "Maximum subset XOR"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-last-digit-of-ab-for-large-numbers1936/1",
- "solutionLink": "#",
- "problemName": "Find Last Digit Of a^b for Large Numbers"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/distribute-candies-in-a-binary-tree/1",
- "solutionLink": "#",
- "problemName": "Distribute candies in a binary tree"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/geek-collects-the-balls5515/1",
- "solutionLink": "#",
- "problemName": "Geek collects the balls"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/special-digits--170647/1",
- "solutionLink": "#",
- "problemName": "Special Digits"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/word-ladder-ii/1",
- "solutionLink": "#",
- "problemName": "Word Ladder II"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-smallest-range-containing-elements-from-k-lists/1",
- "solutionLink": "#",
- "problemName": "Smallest range in K lists"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/possible-paths--141628/1",
- "solutionLink": "#",
- "problemName": "Possible Paths in a Tree"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/vertex-cover/1",
- "solutionLink": "#",
- "problemName": "Vertex Cover"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/geekina-hate-1s/1",
- "solutionLink": "#",
- "problemName": "Geekina Hate 1s"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-the-string/1",
- "solutionLink": "#",
- "problemName": "Find the String"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/largest-sum-cycle--170645/1",
- "solutionLink": "#",
- "problemName": "Largest Sum Cycle"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-number-of-closed-islands/1",
- "solutionLink": "#",
- "problemName": "Find number of closed islands"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/redundant-parenthesis--170647/1",
- "solutionLink": "#",
- "problemName": "Redundant Parenthesis"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/walls-coloring-ii--170647/1",
- "solutionLink": "#",
- "problemName": "Walls Coloring II"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/strongly-connected-component-tarjanss-algo-1587115621/1",
- "solutionLink": "#",
- "problemName": "Strongly connected component (Tarjans's Algo)"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/distinct-palindromic-substrings5141/1",
- "solutionLink": "#",
- "problemName": "Distinct palindromic substrings"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-binary-strings-with-no-consecutive-1s/1",
- "solutionLink": "#",
- "problemName": "Count Binary Strings With No Consecutive 1s"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/min-time--170648/1",
- "solutionLink": "#",
- "problemName": "Min Time"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/print-all-lcs-sequences3413/1",
- "solutionLink": "#",
- "problemName": "Print all LCS sequences"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sorted-list-to-bst/1",
- "solutionLink": "#",
- "problemName": "Sorted Link List to BST"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/cake-distribution-problem--170647/1",
- "solutionLink": "#",
- "problemName": "Cake Distribution Problem"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-number-of-toys/1",
- "solutionLink": "#",
- "problemName": "Maximum Number of Toys"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/expression-add-operators/1",
- "solutionLink": "#",
- "problemName": "Expression Add Operators"
- }
-]
-
-
-
-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 GFG website. You can also click on the solution link to view the solution of the problem.
\ No newline at end of file
diff --git a/dsa-problems/gfg-problems/hard/0101-0200.md b/dsa-problems/gfg-problems/hard/0101-0200.md
deleted file mode 100644
index 7252944af..000000000
--- a/dsa-problems/gfg-problems/hard/0101-0200.md
+++ /dev/null
@@ -1,634 +0,0 @@
----
-id: 0101-0200
-title: GFG hard problems 0101-0200
-sidebar_label: 0101-0200
-keywords:
- - gfg problems
- - gfg problems hard
- - gfg problems problems
----
-
-
-export const problems = [
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/binary-tree-to-dll/1",
- "solutionLink": "/dsa-solutions/gfg-solutions/Hard/0101-0200/binary-tree-to-dll",
- "problemName": "Binary Tree to DLL"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/lru-cache/1",
- "solutionLink": "/dsa-solutions/gfg-solutions/Hard/0101-0200/lru-cache",
- "problemName": "LRU Cache"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/number-of-turns-in-binary-tree/1",
- "solutionLink": "#",
- "problemName": "Number of Turns in Binary Tree"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-bst-sum-subtree--170647/1",
- "solutionLink": "#",
- "problemName": "Minimum BST Sum Subtree"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/partition-the-array--170647/1",
- "solutionLink": "#",
- "problemName": "Partition the Array"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/shortest-path-by-removing-k-walls/1",
- "solutionLink": "#",
- "problemName": "Shortest Path by Removing K walls"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/scrambled-string/1",
- "solutionLink": "#",
- "problemName": "Scrambled String"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/travelling-salesman-problem2732/1",
- "solutionLink": "#",
- "problemName": "Travelling Salesman Problem"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/divide-in-incremental-groups--170647/1",
- "solutionLink": "#",
- "problemName": "Divide in Incremental Groups"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/game-of-subsets/1",
- "solutionLink": "#",
- "problemName": "Game Of Subsets"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/132-geeky-buildings--141631/1",
- "solutionLink": "#",
- "problemName": "132 Geeky Buildings"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/median-of-the-subarrays--170647/1",
- "solutionLink": "#",
- "problemName": "Median of the Subarrays"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-number-of-coins--170647/1",
- "solutionLink": "#",
- "problemName": "Maximum Number of coins"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/fixing-two-swapped-nodes-of-a-bst--170646/1",
- "solutionLink": "#",
- "problemName": "Fixing Two swapped nodes of a BST"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/palindrome-pairs/1",
- "solutionLink": "#",
- "problemName": "Palindrome Pairs"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/water-connection-problem5822/1",
- "solutionLink": "#",
- "problemName": "Water Connection Problem"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/shortest-path-using-atmost-one-curved-edge--170647/1",
- "solutionLink": "#",
- "problemName": "Shortest Path Using Atmost One Curved Edge"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/number-formation3506/1",
- "solutionLink": "#",
- "problemName": "Number Formation"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/avoid-explosion--170647/1",
- "solutionLink": "#",
- "problemName": "Avoid Explosion"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/ipl-2021-final--141634/1",
- "solutionLink": "#",
- "problemName": "IPL 2021 - Final"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/max-min-height--170647/1",
- "solutionLink": "#",
- "problemName": "Max min Height"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/select-nodes--170645/1",
- "solutionLink": "#",
- "problemName": "Select Nodes"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-occurences-of-a-given-word-in-a-2-d-array/1",
- "solutionLink": "#",
- "problemName": "Count occurrences of a given word in a 2-d array"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-connected-group/1",
- "solutionLink": "#",
- "problemName": "Maximum Connected group"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-insertions-to-make-two-arrays-equal/1",
- "solutionLink": "#",
- "problemName": "Minimum operations to convert array A to B"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-the-substring--170645/1",
- "solutionLink": "#",
- "problemName": "Count the Substring"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/reverse-a-sublist-of-a-linked-list/1",
- "solutionLink": "#",
- "problemName": "Reverse a sublist of a linked list"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-lucky-permutations--170645/1",
- "solutionLink": "#",
- "problemName": "Count Lucky Permutations"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/burst-balloons/1",
- "solutionLink": "#",
- "problemName": "Burst Balloons"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/shortest-unique-prefix-for-every-word/1",
- "solutionLink": "#",
- "problemName": "Shortest Unique prefix for every word"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/assignment-problem3016/1",
- "solutionLink": "#",
- "problemName": "Assignment Problem"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/x-xor-a-is-minimum-and-set-bits-in-x-b/1",
- "solutionLink": "#",
- "problemName": "Minimum X (xor) A"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/convex-hull2138/1",
- "solutionLink": "#",
- "problemName": "Convex Hull"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/adventure-in-a-maze2051/1",
- "solutionLink": "#",
- "problemName": "Adventure in a Maze"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/ncr-mod-m-part-10038/1",
- "solutionLink": "#",
- "problemName": "nCr mod M | Part 1"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/number-of-subsets-with-product-less-than-k/1",
- "solutionLink": "#",
- "problemName": "Number of subsets with product less than k"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-the-number-of-subarrays/1",
- "solutionLink": "#",
- "problemName": "Count the number of subarrays"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-tree-traversal--141628/1",
- "solutionLink": "#",
- "problemName": "Check Tree Traversal"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/longest-path-in-a-matrix3019/1",
- "solutionLink": "#",
- "problemName": "Longest Path in a matrix"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/bike-racing0543/1",
- "solutionLink": "#",
- "problemName": "Bike Racing"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/word-break-trie--141631/1",
- "solutionLink": "#",
- "problemName": "Word Break (Trie)"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/chocolates-pickup/1",
- "solutionLink": "#",
- "problemName": "Chocolates Pickup"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/huffman-decoding/1",
- "solutionLink": "#",
- "problemName": "Huffman Decoding"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/longest-zig-zag-sub-sequence2656/1",
- "solutionLink": "#",
- "problemName": "Longest Zig-Zag Sub Sequence"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/optimal-binary-search-tree2214/1",
- "solutionLink": "#",
- "problemName": "Optimal binary search tree"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-time-to-fulfil-all-orders/1",
- "solutionLink": "#",
- "problemName": "Minimum time to fulfil all orders"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-the-maximum-flow2126/1",
- "solutionLink": "#",
- "problemName": "Find the Maximum Flow"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/longest-palindromic-substring-in-linear-time/1",
- "solutionLink": "#",
- "problemName": "Longest Palindromic Substring in Linear Time"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/points-in-straight-line/1",
- "solutionLink": "#",
- "problemName": "Points in Straight Line"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/articulation-point2616/1",
- "solutionLink": "#",
- "problemName": "Articulation Point - II"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/interesting-queries4742/1",
- "solutionLink": "#",
- "problemName": "Interesting Queries"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/number-of-distinct-words-with-k-maximum-contiguous-vowels--141631/1",
- "solutionLink": "#",
- "problemName": "Number of distinct words with K maximum contiguous vowels"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/longest-substring-whose-character-rearranged-can-form-a-palindrome/1",
- "solutionLink": "#",
- "problemName": "Longest substring to form a Palindrome"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/corona-vaccine--141631/1",
- "solutionLink": "#",
- "problemName": "Corona Vaccine"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/kill-captain-america0228/1",
- "solutionLink": "#",
- "problemName": "Kill Captain America"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/geek-in-a-maze--170637/1",
- "solutionLink": "#",
- "problemName": "Geek in a Maze"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/longest-increasing-path-in-a-matrix/1",
- "solutionLink": "#",
- "problemName": "Longest Increasing Path in a Matrix"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/array-partition/1",
- "solutionLink": "#",
- "problemName": "Array Partition"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-the-largest-rectangle-of-1s-with-swapping-of-columns-allowed0243/1",
- "solutionLink": "#",
- "problemName": "Largest rectangle of 1s with swapping of columns allowed"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/remove-invalid-parentheses/1",
- "solutionLink": "#",
- "problemName": "Remove Invalid Parentheses"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/lets-play0201/1",
- "solutionLink": "#",
- "problemName": "Let's Play!!!"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/doctor-strange2206/1",
- "solutionLink": "#",
- "problemName": "Doctor Strange"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-reverse-pairs/1",
- "solutionLink": "#",
- "problemName": "Count Reverse Pairs"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-swap-required-to-convert-binary-tree-to-binary-search-tree/1",
- "solutionLink": "#",
- "problemName": "Minimum swap required to convert binary tree to binary search tree"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/secret-cipher--141631/1",
- "solutionLink": "#",
- "problemName": "Secret Cipher"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-xor-subset0715/1",
- "solutionLink": "#",
- "problemName": "Maximum XOR subset"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/longest-path-in-a-directed-acyclic-graph/1",
- "solutionLink": "#",
- "problemName": "Longest Path in a Directed Acyclic Graph"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-number-to-make-median-x3029/1",
- "solutionLink": "#",
- "problemName": "Minimum number to make median X"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/kth-smallest-number-in-multiplication-table/1",
- "solutionLink": "#",
- "problemName": "Kth Smallest Number in Multiplication Table"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/nth-digit-of-pie5851/1",
- "solutionLink": "#",
- "problemName": "Nth digit of pi"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/elixir-of-life--141631/1",
- "solutionLink": "#",
- "problemName": "Elixir of Life"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/all-numbers-with-specific-difference3558/1",
- "solutionLink": "#",
- "problemName": "All numbers with specific difference"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/number-of-pairs-1645358985/1",
- "solutionLink": "#",
- "problemName": "Number of pairs"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/rearrange-the-array-1639032648/1",
- "solutionLink": "#",
- "problemName": "Rearrange the array"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/shortest-range-in-bst--141631/1",
- "solutionLink": "#",
- "problemName": "Shortest Range In BST"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/search-query-auto-complete/1",
- "solutionLink": "#",
- "problemName": "Search Query Auto Complete"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/cut-woods/1",
- "solutionLink": "#",
- "problemName": "Cut woods"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/intersecting-intervals/1",
- "solutionLink": "#",
- "problemName": "Maximum number of overlapping Intervals"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/create-your-own-calculator4308/1",
- "solutionLink": "#",
- "problemName": "Create your own Calculator"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/very-tough-problem2653/1",
- "solutionLink": "#",
- "problemName": "Very Tough Problem"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-number-of-elements-which-are-not-part-of-increasing-or-decreasing-subsequence2617/1",
- "solutionLink": "#",
- "problemName": "Minimum number of elements"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-minimum-s-t-cut-in-a-flow-network2902/1",
- "solutionLink": "#",
- "problemName": "Find minimum s-t cut in a flow network"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/lfu-cache-1665050355/1",
- "solutionLink": "#",
- "problemName": "LFU cache"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sid-and-his-prime-money5736/1",
- "solutionLink": "#",
- "problemName": "Sid and his prime money"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-difference-between-pair-in-a-matrix/1",
- "solutionLink": "#",
- "problemName": "Maximum difference between pair in a matrix"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/the-palindrome-pattern3900/1",
- "solutionLink": "#",
- "problemName": "The Palindrome Pattern"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-the-pattern4155/1",
- "solutionLink": "#",
- "problemName": "Find the pattern"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/akku-and-arrays4452/1",
- "solutionLink": "#",
- "problemName": "Akku and Arrays"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/subset-sums-between-the-given-range/1",
- "solutionLink": "#",
- "problemName": "Subset sums between the given range"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/partition-a-set-into-two-subsets-such-that-the-difference-of-subset-sums-is-minimum-set-2/1",
- "solutionLink": "#",
- "problemName": "Partition a set into two subsets such that the difference of subset sums is minimum (Set-2)"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/k-centers-problem/1",
- "solutionLink": "#",
- "problemName": "K Centers Problem"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/ipl-2021-match-day-6-semi-final--141634/1",
- "solutionLink": "#",
- "problemName": "IPL 2021 - Match Day 6 - Semi Final"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-xor-with-an-element-from-array/1",
- "solutionLink": "#",
- "problemName": "Maximum XOR With an Element From Array"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/next-optimal-move-in-tic-tac-toe2842/1",
- "solutionLink": "#",
- "problemName": "Next Optimal Move in Tic Tac Toe"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/hexadecimal-to-decimal-counter1627/1",
- "solutionLink": "#",
- "problemName": "Hexadecimal to decimal counter"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-triple-product/1",
- "solutionLink": "#",
- "problemName": "Maximum Triple Product"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/total-number-of-spanning-trees-in-a-graph/1",
- "solutionLink": "#",
- "problemName": "Total Number Of Spanning Trees In A Graph"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-travel-time/1",
- "solutionLink": "#",
- "problemName": "Minimum travel time"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-number-of-sprinkler--170645/1",
- "solutionLink": "#",
- "problemName": "Minimum Number Of Sprinkler"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/joey-doesnt-share-food5712/1",
- "solutionLink": "#",
- "problemName": "Joey doesn't share food"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/greater-or-less--170646/1",
- "solutionLink": "#",
- "problemName": "Greater or Less"
- },
- {
- "difficulty": "Hard",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-cost-to-merge-stones/1",
- "solutionLink": "#",
- "problemName": "Minimum Cost to Merge Stones"
- }
-]
-
-
-
-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 GFG website. You can also click on the solution link to view the solution of the problem.
\ No newline at end of file
diff --git a/dsa-problems/gfg-problems/medium/0001-0100.md b/dsa-problems/gfg-problems/medium/0001-0100.md
deleted file mode 100644
index 30fb162e5..000000000
--- a/dsa-problems/gfg-problems/medium/0001-0100.md
+++ /dev/null
@@ -1,622 +0,0 @@
----
-id: 0001-0100
-title: GFG medium problems 0001-0100
-sidebar_label: 0001-0100
-keywords:
- - gfg problems
- - gfg problems medium
- - gfg problems problems
----
-
-
-export const problems = [
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/subarray-with-given-sum-1587115621/1",
- "solutionLink": "#",
- "problemName": "Find Indexes of a subarray with given sum"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/kadanes-algorithm-1587115620/1",
- "solutionLink": "#",
- "problemName": "Kadane's Algorithm"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-number-of-jumps-1587115620/1",
- "solutionLink": "#",
- "problemName": "Minimum number of jumps"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sort-an-array-of-0s-1s-and-2s4231/1",
- "solutionLink": "#",
- "problemName": "Sort an array of 0s, 1s and 2s"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/majority-element-1587115620/1",
- "solutionLink": "#",
- "problemName": "Majority Element"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/kth-smallest-element5635/1",
- "solutionLink": "#",
- "problemName": "Kth smallest element"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimize-the-heights3351/1",
- "solutionLink": "#",
- "problemName": "Minimize the Heights II"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/inversion-of-array-1587115620/1",
- "solutionLink": "#",
- "problemName": "Count Inversions"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/remove-loop-in-linked-list/1",
- "solutionLink": "#",
- "problemName": "Remove loop in Linked List"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/detect-loop-in-linked-list/1",
- "solutionLink": "#",
- "problemName": "Detect Loop in linked list"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-platforms-1587115620/1",
- "solutionLink": "#",
- "problemName": "Minimum Platforms"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/trapping-rain-water-1587115621/1",
- "solutionLink": "#",
- "problemName": "Trapping Rain Water"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-missing-and-repeating2512/1",
- "solutionLink": "#",
- "problemName": "Find Missing And Repeating"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/0-1-knapsack-problem0945/1",
- "solutionLink": "#",
- "problemName": "0 - 1 Knapsack Problem"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/detect-cycle-in-an-undirected-graph/1",
- "solutionLink": "#",
- "problemName": "Detect cycle in an undirected graph"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/next-larger-element-1587115620/1",
- "solutionLink": "#",
- "problemName": "Next Greater Element"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/detect-cycle-in-a-directed-graph/1",
- "solutionLink": "#",
- "problemName": "Detect cycle in a directed graph"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-product-subarray3604/1",
- "solutionLink": "#",
- "problemName": "Maximum Product Subarray"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/boundary-traversal-of-binary-tree/1",
- "solutionLink": "#",
- "problemName": "Boundary Traversal of binary tree"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/smallest-positive-missing-number-1587115621/1",
- "solutionLink": "#",
- "problemName": "Smallest Positive missing number"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-triplets-with-zero-sum/1",
- "solutionLink": "#",
- "problemName": "Find triplets with zero sum"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-if-linked-list-is-pallindrome/1",
- "solutionLink": "#",
- "problemName": "Check if Linked List is Palindrome"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-of-all-subarrays-of-size-k3101/1",
- "solutionLink": "#",
- "problemName": "Maximum of all subarrays of size k"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/ncr1019/1",
- "solutionLink": "#",
- "problemName": "nCr"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/longest-palindrome-in-a-string3411/1",
- "solutionLink": "#",
- "problemName": "Longest Palindrome in a String"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/longest-consecutive-subsequence2449/1",
- "solutionLink": "#",
- "problemName": "Longest consecutive subsequence"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/power-of-numbers-1587115620/1",
- "solutionLink": "#",
- "problemName": "Power Of Numbers"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/top-view-of-binary-tree/1",
- "solutionLink": "#",
- "problemName": "Top View of Binary Tree"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/longest-increasing-subsequence-1587115620/1",
- "solutionLink": "#",
- "problemName": "Longest Increasing Subsequence"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/largest-subarray-with-0-sum/1",
- "solutionLink": "#",
- "problemName": "Largest subarray with 0 sum"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/triplet-sum-in-array-1587115621/1",
- "solutionLink": "#",
- "problemName": "Triplet Sum in Array"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/diameter-of-binary-tree/1",
- "solutionLink": "#",
- "problemName": "Diameter of a Binary Tree"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/longest-common-subsequence-1587115620/1",
- "solutionLink": "#",
- "problemName": "Longest Common Subsequence"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/perfect-sum-problem5633/1",
- "solutionLink": "#",
- "problemName": "Perfect Sum Problem"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/add-two-numbers-represented-by-linked-lists/1",
- "solutionLink": "#",
- "problemName": "Add two numbers represented by linked lists"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/stock-buy-and-sell-1587115621/1",
- "solutionLink": "#",
- "problemName": "Stock buy and sell"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/intersection-point-in-y-shapped-linked-lists/1",
- "solutionLink": "#",
- "problemName": "Intersection Point in Y Shaped Linked Lists"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/subarray-with-0-sum-1587115621/1",
- "solutionLink": "#",
- "problemName": "Subarray with 0 sum"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/permutations-of-a-given-string2041/1",
- "solutionLink": "#",
- "problemName": "Permutations of a given string"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/longest-sub-array-with-sum-k0809/1",
- "solutionLink": "#",
- "problemName": "Longest Sub-Array with Sum K"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/first-and-last-occurrences-of-x3116/1",
- "solutionLink": "#",
- "problemName": "First and last occurrences of x"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/coin-change2448/1",
- "solutionLink": "#",
- "problemName": "Coin Change"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/row-with-max-1s0023/1",
- "solutionLink": "#",
- "problemName": "Row with max 1s"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/spirally-traversing-a-matrix-1587115621/1",
- "solutionLink": "#",
- "problemName": "Spirally traversing a matrix"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/rat-in-a-maze-problem/1",
- "solutionLink": "#",
- "problemName": "Rat in a Maze Problem - I"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/get-minimum-element-from-stack/1",
- "solutionLink": "#",
- "problemName": "Get minimum element from stack"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/fractional-knapsack-1587115620/1",
- "solutionLink": "#",
- "problemName": "Fractional Knapsack"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-index-1587115620/1",
- "solutionLink": "#",
- "problemName": "Maximum Index"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/-rearrange-array-alternately-1587115620/1",
- "solutionLink": "#",
- "problemName": "Rearrange Array Alternately"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/the-celebrity-problem/1",
- "solutionLink": "#",
- "problemName": "The Celebrity Problem"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/subset-sum-problem2014/1",
- "solutionLink": "#",
- "problemName": "Partition Equal Subset Sum"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/validate-an-ip-address-1587115621/1",
- "solutionLink": "#",
- "problemName": "Validate an IP Address"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-tree/1",
- "solutionLink": "#",
- "problemName": "Sum Tree"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/union-of-two-sorted-arrays-1587115621/1",
- "solutionLink": "#",
- "problemName": "Union of Two Sorted Arrays"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/bottom-view-of-binary-tree/1",
- "solutionLink": "#",
- "problemName": "Bottom View of Binary Tree"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/stickler-theif-1587115621/1",
- "solutionLink": "#",
- "problemName": "Stickler Thief"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/rotate-a-linked-list/1",
- "solutionLink": "#",
- "problemName": "Rotate a Linked List"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/k-th-element-of-two-sorted-array1317/1",
- "solutionLink": "#",
- "problemName": "K-th element of two Arrays"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/implement-atoi/1",
- "solutionLink": "#",
- "problemName": "Implement Atoi"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/pythagorean-triplet3018/1",
- "solutionLink": "#",
- "problemName": "Pythagorean Triplet"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-index3307/1",
- "solutionLink": "#",
- "problemName": "Maximum Index"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/multiply-two-strings/1",
- "solutionLink": "#",
- "problemName": "Multiply two strings"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/topological-sort/1",
- "solutionLink": "#",
- "problemName": "Topological sort"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/cutted-segments1642/1",
- "solutionLink": "#",
- "problemName": "Maximize The Cut Segments"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/subset-sum-problem-1611555638/1",
- "solutionLink": "#",
- "problemName": "Subset Sum Problem"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/job-sequencing-problem-1587115620/1",
- "solutionLink": "#",
- "problemName": "Job Sequencing Problem"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/first-non-repeating-character-in-a-stream1216/1",
- "solutionLink": "#",
- "problemName": "First non-repeating character in a stream"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/longest-common-substring1452/1",
- "solutionLink": "#",
- "problemName": "Longest Common Substring"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/search-in-a-rotated-array4618/1",
- "solutionLink": "#",
- "problemName": "Search in a Rotated Array"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/quick-sort/1",
- "solutionLink": "#",
- "problemName": "Quick Sort"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/add-1-to-a-number-represented-as-linked-list/1",
- "solutionLink": "#",
- "problemName": "Add 1 to a number represented as linked list"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-all-four-sum-numbers1732/1",
- "solutionLink": "#",
- "problemName": "Find All Four Sum Numbers"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-ways-to-reach-the-nth-stair-1587115620/1",
- "solutionLink": "#",
- "problemName": "Count ways to reach the n'th stair"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/number-of-occurrence2259/1",
- "solutionLink": "#",
- "problemName": "Number of occurrence"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/allocate-minimum-number-of-pages0937/1",
- "solutionLink": "#",
- "problemName": "Allocate minimum number of pages"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-sum-increasing-subsequence4749/1",
- "solutionLink": "#",
- "problemName": "Maximum sum increasing subsequence"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-the-number-of-islands/1",
- "solutionLink": "#",
- "problemName": "Find the number of islands"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/print-a-binary-tree-in-vertical-order/1",
- "solutionLink": "#",
- "problemName": "Vertical Traversal of Binary Tree"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/stock-span-problem-1587115621/1",
- "solutionLink": "#",
- "problemName": "Stock span problem"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/lowest-common-ancestor-in-a-binary-tree/1",
- "solutionLink": "#",
- "problemName": "Lowest Common Ancestor in a Binary Tree"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/recursively-remove-all-adjacent-duplicates0744/1",
- "solutionLink": "#",
- "problemName": "Recursively remove all adjacent duplicates"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/number-of-coins1824/1",
- "solutionLink": "#",
- "problemName": "Number of Coins"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/circular-tour-1587115620/1",
- "solutionLink": "#",
- "problemName": "Circular tour"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/bipartite-graph/1",
- "solutionLink": "#",
- "problemName": "Bipartite Graph"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/construct-tree-1/1",
- "solutionLink": "#",
- "problemName": "Construct Tree from Inorder & Preorder"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/zigzag-tree-traversal/1",
- "solutionLink": "#",
- "problemName": "ZigZag Tree Traversal"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/merge-sort/1",
- "solutionLink": "#",
- "problemName": "Merge Sort"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-swaps/1",
- "solutionLink": "#",
- "problemName": "Minimum Swaps to Sort"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/largest-number-formed-from-an-array1117/1",
- "solutionLink": "#",
- "problemName": "Largest Number formed from an Array"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/k-largest-elements4206/1",
- "solutionLink": "#",
- "problemName": "k largest elements"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-total-set-bits-1587115620/1",
- "solutionLink": "#",
- "problemName": "Count total set bits"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/implementing-dijkstra-set-1-adjacency-matrix/1",
- "solutionLink": "#",
- "problemName": "Implementing Dijkstra Algorithm"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/merge-two-sorted-linked-lists/1",
- "solutionLink": "#",
- "problemName": "Merge two sorted linked lists"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/first-negative-integer-in-every-window-of-size-k3345/1",
- "solutionLink": "#",
- "problemName": "First negative integer in every window of size k"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/finding-the-numbers0215/1",
- "solutionLink": "#",
- "problemName": "Non Repeating Numbers"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/longest-k-unique-characters-substring0853/1",
- "solutionLink": "#",
- "problemName": "Longest K unique characters substring"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/flattening-a-linked-list/1",
- "solutionLink": "#",
- "problemName": "Flattening a Linked List"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/factorials-of-large-numbers2508/1",
- "solutionLink": "#",
- "problemName": "Factorials of large numbers"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/tower-of-hanoi-1587115621/1",
- "solutionLink": "#",
- "problemName": "Tower Of Hanoi"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/rotten-oranges2536/1",
- "solutionLink": "#",
- "problemName": "Rotten Oranges"
- }
-]
-
-
-
-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 GFG website. You can also click on the solution link to view the solution of the problem.
\ No newline at end of file
diff --git a/dsa-problems/gfg-problems/medium/0101-0200.md b/dsa-problems/gfg-problems/medium/0101-0200.md
deleted file mode 100644
index eb96e3eb3..000000000
--- a/dsa-problems/gfg-problems/medium/0101-0200.md
+++ /dev/null
@@ -1,622 +0,0 @@
----
-id: 0101-0200
-title: GFG medium problems 0101-0200
-sidebar_label: 0101-0200
-keywords:
- - gfg problems
- - gfg problems medium
- - gfg problems problems
----
-
-
-export const problems = [
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/egg-dropping-puzzle-1587115620/1",
- "solutionLink": "#",
- "problemName": "Egg Dropping Puzzle"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-if-subtree/1",
- "solutionLink": "#",
- "problemName": "Check if subtree"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-palindromic-subsequences/1",
- "solutionLink": "#",
- "problemName": "Count Palindromic Subsequences"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/children-sum-parent/1",
- "solutionLink": "#",
- "problemName": "Check for Children Sum Property in a Binary Tree"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/total-decoding-messages1235/1",
- "solutionLink": "#",
- "problemName": "Total Decoding Messages"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/knapsack-with-duplicate-items4201/1",
- "solutionLink": "#",
- "problemName": "Knapsack with Duplicate Items"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/next-permutation5226/1",
- "solutionLink": "#",
- "problemName": "Next Permutation"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-swaps-required-to-bring-all-elements-less-than-or-equal-to-k-together4847/1",
- "solutionLink": "#",
- "problemName": "Minimum swaps and K together"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/array-pair-sum-divisibility-problem3257/1",
- "solutionLink": "#",
- "problemName": "Array Pair Sum Divisibility Problem"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/longest-repeating-subsequence2004/1",
- "solutionLink": "#",
- "problemName": "Longest Repeating Subsequence"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/activity-selection-1587115620/1",
- "solutionLink": "#",
- "problemName": "Activity Selection"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/nth-catalan-number0817/1",
- "solutionLink": "#",
- "problemName": "Nth catalan number"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/zero-sum-subarrays1825/1",
- "solutionLink": "#",
- "problemName": "Zero Sum Subarrays"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/word-break1352/1",
- "solutionLink": "#",
- "problemName": "Word Break"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/implementing-floyd-warshall2042/1",
- "solutionLink": "#",
- "problemName": "Floyd Warshall"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/valid-substring0624/1",
- "solutionLink": "#",
- "problemName": "Valid Substring"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/friends-pairing-problem5425/1",
- "solutionLink": "#",
- "problemName": "Friends Pairing Problem"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/min-distance-between-two-given-nodes-of-a-binary-tree/1",
- "solutionLink": "#",
- "problemName": "Min distance between two given nodes of a Binary Tree"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/gold-mine-problem2608/1",
- "solutionLink": "#",
- "problemName": "Gold Mine Problem"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/two-repeated-elements-1587115621/1",
- "solutionLink": "#",
- "problemName": "Two Repeated Elements"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/shortest-common-supersequence0322/1",
- "solutionLink": "#",
- "problemName": "Shortest Common Supersequence"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/largest-bst/1",
- "solutionLink": "#",
- "problemName": "Largest BST"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/max-length-chain/1",
- "solutionLink": "#",
- "problemName": "Max length chain"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sorted-insert-for-circular-linked-list/1",
- "solutionLink": "#",
- "problemName": "Sorted insert for circular linked list"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-spanning-tree/1",
- "solutionLink": "#",
- "problemName": "Minimum Spanning Tree"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/delete-a-node-from-bst/1",
- "solutionLink": "#",
- "problemName": "Delete a node from BST"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/m-coloring-problem-1587115620/1",
- "solutionLink": "#",
- "problemName": "M-Coloring Problem"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/boolean-matrix-problem-1587115620/1",
- "solutionLink": "#",
- "problemName": "Boolean Matrix"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-frequencies4211/1",
- "solutionLink": "#",
- "problemName": "Check if frequencies can be equal"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/lucky-numbers2911/1",
- "solutionLink": "#",
- "problemName": "Lucky Numbers"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/rod-cutting0840/1",
- "solutionLink": "#",
- "problemName": "Rod Cutting"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-k-th-smallest-element-in-bst/1",
- "solutionLink": "#",
- "problemName": "k-th smallest element in BST"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/heap-sort/1",
- "solutionLink": "#",
- "problemName": "Heap Sort"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/rearrange-an-array-with-o1-extra-space3142/1",
- "solutionLink": "#",
- "problemName": "Rearrange an array with O(1) extra space"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/number-of-paths0926/1",
- "solutionLink": "#",
- "problemName": "Number of paths"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/length-of-the-longest-substring3036/1",
- "solutionLink": "#",
- "problemName": "Length of the longest substring"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/flood-fill-algorithm1856/1",
- "solutionLink": "#",
- "problemName": "Flood fill Algorithm"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/stock-buy-and-sell2615/1",
- "solutionLink": "#",
- "problemName": "Stock buy and sell II"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/shortest-source-to-destination-path3544/1",
- "solutionLink": "#",
- "problemName": "Shortest Source to Destination Path"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sort-a-stack/1",
- "solutionLink": "#",
- "problemName": "Sort a stack"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/predecessor-and-successor/1",
- "solutionLink": "#",
- "problemName": "Predecessor and Successor"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/consecutive-1s-not-allowed1912/1",
- "solutionLink": "#",
- "problemName": "Consecutive 1's not allowed"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/steps-by-knight5927/1",
- "solutionLink": "#",
- "problemName": "Steps by Knight"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/pascal-triangle0652/1",
- "solutionLink": "#",
- "problemName": "Pascal Triangle"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/max-sum-without-adjacents2430/1",
- "solutionLink": "#",
- "problemName": "Max Sum without Adjacents"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/combination-sum-1587115620/1",
- "solutionLink": "#",
- "problemName": "Combination Sum"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-if-tree-is-isomorphic/1",
- "solutionLink": "#",
- "problemName": "Check if Tree is Isomorphic"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/kth-ancestor-in-a-tree/1",
- "solutionLink": "#",
- "problemName": "Kth Ancestor in a Tree"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/subset-sums2234/1",
- "solutionLink": "#",
- "problemName": "Subset Sums"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/painting-the-fence3727/1",
- "solutionLink": "#",
- "problemName": "Painting the Fence"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/largest-prime-factor2601/1",
- "solutionLink": "#",
- "problemName": "Largest prime factor"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/path-in-matrix3805/1",
- "solutionLink": "#",
- "problemName": "Maximum path sum in matrix"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/relative-sorting4323/1",
- "solutionLink": "#",
- "problemName": "Sort an array according to the other"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-numbers-or-number1219/1",
- "solutionLink": "#",
- "problemName": "Sum of two large numbers"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-the-longest-bloodline-of-a-tree/1",
- "solutionLink": "#",
- "problemName": "Sum of nodes on the longest path from root to leaf node"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/replace-os-with-xs0052/1",
- "solutionLink": "#",
- "problemName": "Replace O's with X's"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-possible-triangles-1587115620/1",
- "solutionLink": "#",
- "problemName": "Count the number of possible triangles"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-the-subarrays-having-product-less-than-k1708/1",
- "solutionLink": "#",
- "problemName": "Count the subarrays having product less than k"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/shortest-path-in-undirected-graph/1",
- "solutionLink": "#",
- "problemName": "Shortest path in Directed Acyclic Graph"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/k-sum-paths/1",
- "solutionLink": "#",
- "problemName": "K Sum Paths"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/distance-from-the-source-bellman-ford-algorithm/1",
- "solutionLink": "#",
- "problemName": "Distance from the Source (Bellman-Ford Algorithm)"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/is-binary-tree-heap/1",
- "solutionLink": "#",
- "problemName": "Is Binary Tree Heap"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/duplicate-subtree-in-binary-tree/1",
- "solutionLink": "#",
- "problemName": "Duplicate subtree in Binary Tree"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/connect-nodes-at-same-level/1",
- "solutionLink": "#",
- "problemName": "Connect Nodes at Same Level"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/power-set4302/1",
- "solutionLink": "#",
- "problemName": "Power Set"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/swapping-pairs-make-sum-equal4142/1",
- "solutionLink": "#",
- "problemName": "Swapping pairs make sum equal"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/number-of-provinces/1",
- "solutionLink": "#",
- "problemName": "Number of Provinces"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/interleaved-strings/1",
- "solutionLink": "#",
- "problemName": "Interleaved Strings"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-sum4058/1",
- "solutionLink": "#",
- "problemName": "Minimum sum"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/smallest-distant-window3132/1",
- "solutionLink": "#",
- "problemName": "Smallest distinct window"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-number-of-substrings4528/1",
- "solutionLink": "#",
- "problemName": "Count number of substrings"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/largest-number-in-k-swaps-1587115620/1",
- "solutionLink": "#",
- "problemName": "Largest number in K swaps"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/search-in-a-matrix-1587115621/1",
- "solutionLink": "#",
- "problemName": "Search in a row-column sorted Matrix"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-multiplications-to-reach-end/1",
- "solutionLink": "#",
- "problemName": "Minimum Multiplications to reach End"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/longest-subarray-with-sum-divisible-by-k1259/1",
- "solutionLink": "#",
- "problemName": "Longest subarray with sum divisible by K"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/partitions-with-given-difference/1",
- "solutionLink": "#",
- "problemName": "Partitions with Given Difference"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/top-k-frequent-elements-in-array/1",
- "solutionLink": "#",
- "problemName": "Top K Frequent Elements in Array - I"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-triplets-with-sum-smaller-than-x5549/1",
- "solutionLink": "#",
- "problemName": "Count triplets with sum smaller than X"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/merge-k-sorted-arrays/1",
- "solutionLink": "#",
- "problemName": "Merge k Sorted Arrays"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/longest-palindromic-subsequence-1612327878/1",
- "solutionLink": "#",
- "problemName": "Longest Palindromic Subsequence"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/segregate-even-and-odd-nodes-in-a-linked-list5035/1",
- "solutionLink": "#",
- "problemName": "Segregate even and odd nodes in a Linked List"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-sub-array5443/1",
- "solutionLink": "#",
- "problemName": "Maximum Sub Array"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/element-appearing-once2552/1",
- "solutionLink": "#",
- "problemName": "Find the element that appears once"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/largest-square-formed-in-a-matrix0806/1",
- "solutionLink": "#",
- "problemName": "Largest square formed in a matrix"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-whether-path-exist5238/1",
- "solutionLink": "#",
- "problemName": "Find whether path exist"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/optimal-strategy-for-a-game-1587115620/1",
- "solutionLink": "#",
- "problemName": "Optimal Strategy For A Game"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/word-boggle4143/1",
- "solutionLink": "#",
- "problemName": "Word Boggle"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/strongly-connected-components-kosarajus-algo/1",
- "solutionLink": "#",
- "problemName": "Strongly Connected Components (Kosaraju's Algo)"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/distance-of-nearest-cell-having-1-1587115620/1",
- "solutionLink": "#",
- "problemName": "Distance of nearest cell having 1"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/root-to-leaf-paths/1",
- "solutionLink": "#",
- "problemName": "Root to Leaf Paths"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/operations-on-binary-min-heap/1",
- "solutionLink": "#",
- "problemName": "Binary Heap Operations"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/diagonal-traversal-of-binary-tree/1",
- "solutionLink": "#",
- "problemName": "Diagonal Traversal of Binary Tree"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/serialize-and-deserialize-a-binary-tree/1",
- "solutionLink": "#",
- "problemName": "Serialize and deserialize a binary tree"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/merge-k-sorted-linked-lists/1",
- "solutionLink": "#",
- "problemName": "Merge K sorted linked lists"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-the-closest-element-in-bst/1",
- "solutionLink": "#",
- "problemName": "Find the Closest Element in BST"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/column-name-from-a-given-column-number4244/1",
- "solutionLink": "#",
- "problemName": "Column name from a given column number"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/kth-largest-element-in-a-stream2220/1",
- "solutionLink": "#",
- "problemName": "Kth largest element in a stream"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/unique-bsts-1587115621/1",
- "solutionLink": "#",
- "problemName": "Unique BST's"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/mother-vertex/1",
- "solutionLink": "#",
- "problemName": "Mother Vertex"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-the-string-in-grid0111/1",
- "solutionLink": "#",
- "problemName": "Find the string in grid"
- }
-]
-
-
-
-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 GFG website. You can also click on the solution link to view the solution of the problem.
\ No newline at end of file
diff --git a/dsa-problems/gfg-problems/medium/0201-0300.md b/dsa-problems/gfg-problems/medium/0201-0300.md
deleted file mode 100644
index 62d7edba5..000000000
--- a/dsa-problems/gfg-problems/medium/0201-0300.md
+++ /dev/null
@@ -1,622 +0,0 @@
----
-id: 0201-0300
-title: GFG medium problems 0201-0300
-sidebar_label: 0201-0300
-keywords:
- - gfg problems
- - gfg problems medium
- - gfg problems problems
----
-
-
-export const problems = [
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-whether-bst-contains-dead-end/1",
- "solutionLink": "#",
- "problemName": "Check whether BST contains Dead End"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/tree-from-postorder-and-inorder/1",
- "solutionLink": "#",
- "problemName": "Construct Binary Tree from Inorder and Postorder"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/infix-to-postfix-1587115620/1",
- "solutionLink": "#",
- "problemName": "Infix to Postfix"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/two-numbers-with-sum-closest-to-zero1737/1",
- "solutionLink": "#",
- "problemName": "Sum of two elements with sum nearest to zero"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/choose-and-swap0531/1",
- "solutionLink": "#",
- "problemName": "Choose and Swap"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/counting-elements-in-two-arrays/1",
- "solutionLink": "#",
- "problemName": "Counting elements in two arrays"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/longest-subsequence-such-that-difference-between-adjacents-is-one4724/1",
- "solutionLink": "#",
- "problemName": "Longest subsequence-1"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-occurences-of-anagrams5839/1",
- "solutionLink": "#",
- "problemName": "Count Occurences of Anagrams"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/reverse-a-stack/1",
- "solutionLink": "#",
- "problemName": "Reverse a Stack"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/number-of-enclaves/1",
- "solutionLink": "#",
- "problemName": "Number Of Enclaves"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/lcs-of-three-strings0028/1",
- "solutionLink": "#",
- "problemName": "LCS of three strings"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimize-the-heights-i/1",
- "solutionLink": "#",
- "problemName": "Minimize the Heights I"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-cost-to-fill-given-weight-in-a-bag1956/1",
- "solutionLink": "#",
- "problemName": "Minimum cost to fill given weight in a bag"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/max-sum-in-the-configuration/1",
- "solutionLink": "#",
- "problemName": "Max sum in the configuration"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sort-a-linked-list/1",
- "solutionLink": "#",
- "problemName": "Merge Sort for Linked List"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/remove-k-digits/1",
- "solutionLink": "#",
- "problemName": "Remove K Digits"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/k-closest-elements3619/1",
- "solutionLink": "#",
- "problemName": "K closest elements"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/number-of-distinct-islands/1",
- "solutionLink": "#",
- "problemName": "Number of Distinct Islands"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/implementing-ceil-in-bst/1",
- "solutionLink": "#",
- "problemName": "Ceil in BST"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/arranging-the-array1131/1",
- "solutionLink": "#",
- "problemName": "Arranging the array"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-path-sum-from-any-node/1",
- "solutionLink": "#",
- "problemName": "Maximum path sum from any node"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/node-at-distance/1",
- "solutionLink": "#",
- "problemName": "Count the nodes at distance K from leaf"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/course-schedule/1",
- "solutionLink": "#",
- "problemName": "Course Schedule"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/jump-game/1",
- "solutionLink": "#",
- "problemName": "Jump Game"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-difference-between-node-and-its-ancestor/1",
- "solutionLink": "#",
- "problemName": "Maximum difference between node and its ancestor"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/prerequisite-tasks/1",
- "solutionLink": "#",
- "problemName": "Prerequisite Tasks"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/length-of-largest-region-of-1s-1587115620/1",
- "solutionLink": "#",
- "problemName": "Unit Area of largest region of 1's"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-the-n-th-character5925/1",
- "solutionLink": "#",
- "problemName": "Find the N-th character"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/search-pattern-rabin-karp-algorithm--141631/1",
- "solutionLink": "#",
- "problemName": "Search Pattern (Rabin-Karp Algorithm)"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/print-common-nodes-in-bst/1",
- "solutionLink": "#",
- "problemName": "Find Common Nodes in two BSTs"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-the-reversals0401/1",
- "solutionLink": "#",
- "problemName": "Count the Reversals"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/print-anagrams-together/1",
- "solutionLink": "#",
- "problemName": "Print Anagrams Together"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/negative-weight-cycle3504/1",
- "solutionLink": "#",
- "problemName": "Negative weight cycle"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/ipl-2021-match-day-2--141634/1",
- "solutionLink": "#",
- "problemName": "IPL 2021 - Match Day 2"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-sum-of-non-adjacent-nodes/1",
- "solutionLink": "#",
- "problemName": "Maximum sum of Non-adjacent nodes"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/longest-bitonic-subsequence0824/1",
- "solutionLink": "#",
- "problemName": "Longest Bitonic subsequence"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-middle-elements-of-two-sorted-arrays2305/1",
- "solutionLink": "#",
- "problemName": "Sum of Middle Elements of two sorted arrays"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-meetings-in-one-room/1",
- "solutionLink": "#",
- "problemName": "Maximum Meetings in One Room"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-sum-combination/1",
- "solutionLink": "#",
- "problemName": "Maximum Sum Combination"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/trie-insert-and-search0651/1",
- "solutionLink": "#",
- "problemName": "Insert and Search in a Trie"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/jumping-numbers3805/1",
- "solutionLink": "#",
- "problemName": "Jumping Numbers"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/overlapping-intervals--170633/1",
- "solutionLink": "#",
- "problemName": "Overlapping Intervals"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/floor-in-bst/1",
- "solutionLink": "#",
- "problemName": "Floor in BST"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/bleak-numbers1552/1",
- "solutionLink": "#",
- "problemName": "Bleak Numbers"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/search-pattern0205/1",
- "solutionLink": "#",
- "problemName": "Search Pattern (KMP-Algorithm)"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/flip-bits0240/1",
- "solutionLink": "#",
- "problemName": "Flip Bits"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/possible-words-from-phone-digits-1587115620/1",
- "solutionLink": "#",
- "problemName": "Possible Words From Phone Digits"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/modular-exponentiation-for-large-numbers5537/1",
- "solutionLink": "#",
- "problemName": "Modular Exponentiation for large numbers"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/merge-2-sorted-linked-list-in-reverse-order/1",
- "solutionLink": "#",
- "problemName": "Merge 2 sorted linked list in reverse order"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-possible-ways-to-construct-buildings5007/1",
- "solutionLink": "#",
- "problemName": "Count possible ways to construct buildings"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/array-to-bst4443/1",
- "solutionLink": "#",
- "problemName": "Array to BST"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/union-of-two-linked-list/1",
- "solutionLink": "#",
- "problemName": "Union of Two Linked Lists"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/preorder-to-postorder4423/1",
- "solutionLink": "#",
- "problemName": "Preorder to BST"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/shortest-path-in-undirected-graph-having-unit-distance/1",
- "solutionLink": "#",
- "problemName": "Shortest path in Undirected Graph"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/shortest-path-in-a-binary-maze-1655453161/1",
- "solutionLink": "#",
- "problemName": "Shortest Distance in a Binary Maze"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/game-with-string4100/1",
- "solutionLink": "#",
- "problemName": "Game with String"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/largest-sum-subarray-of-size-at-least-k3121/1",
- "solutionLink": "#",
- "problemName": "Largest Sum Subarray of Size at least K"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/eventual-safe-states/1",
- "solutionLink": "#",
- "problemName": "Eventual Safe States"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximize-dot-product2649/1",
- "solutionLink": "#",
- "problemName": "Maximize dot product"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/linked-list-that-is-sorted-alternatingly/1",
- "solutionLink": "#",
- "problemName": "Linked List that is Sorted Alternatingly"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/smallest-number-on-left3403/1",
- "solutionLink": "#",
- "problemName": "Smallest number on left"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/case-specific-sorting-of-strings4845/1",
- "solutionLink": "#",
- "problemName": "Case-specific Sorting of Strings"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/leftmost-and-rightmost-nodes-of-binary-tree/1",
- "solutionLink": "#",
- "problemName": "Leftmost and rightmost nodes of binary tree"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-deletitions1648/1",
- "solutionLink": "#",
- "problemName": "Minimum Deletions"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/kth-element-in-matrix/1",
- "solutionLink": "#",
- "problemName": "Kth element in Matrix"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-a-pair-with-given-target-in-bst/1",
- "solutionLink": "#",
- "problemName": "Find a pair with given target in BST"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/number-of-paths-in-a-matrix-with-k-coins2728/1",
- "solutionLink": "#",
- "problemName": "Number of paths in a matrix with k coins"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-occured-integer4602/1",
- "solutionLink": "#",
- "problemName": "Maximum occured integer"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/paths-to-reach-origin3850/1",
- "solutionLink": "#",
- "problemName": "Paths to reach origin"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/detect-cycle-using-dsu/1",
- "solutionLink": "#",
- "problemName": "Detect Cycle using DSU"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/swap-kth-node-from-beginning-and-kth-node-from-end-in-a-singly-linked-list/1",
- "solutionLink": "#",
- "problemName": "Swap Kth nodes from ends"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-all-substrings-of-a-number-1587115621/1",
- "solutionLink": "#",
- "problemName": "Sum of all substrings of a number"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/shuffle-integers2401/1",
- "solutionLink": "#",
- "problemName": "Shuffle integers"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/number-of-ways-to-arrive-at-destination/1",
- "solutionLink": "#",
- "problemName": "Number of Ways to Arrive at Destination"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/level-of-nodes-1587115620/1",
- "solutionLink": "#",
- "problemName": "Level of Nodes"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/number-following-a-pattern3126/1",
- "solutionLink": "#",
- "problemName": "Number following a pattern"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/given-a-linked-list-reverse-alternate-nodes-and-append-at-the-end/1",
- "solutionLink": "#",
- "problemName": "Reverse alternate nodes in Link List"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/normal-bst-to-balanced-bst/1",
- "solutionLink": "#",
- "problemName": "Normal BST to Balanced BST"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/nuts-and-bolts-problem0431/1",
- "solutionLink": "#",
- "problemName": "Nuts and Bolts Problem"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/number-of-pairs-1587115620/1",
- "solutionLink": "#",
- "problemName": "Number of pairs"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/buy-and-sell-a-share-at-most-twice/1",
- "solutionLink": "#",
- "problemName": "Buy and Sell a Share at most twice"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/excel-sheet5448/1",
- "solutionLink": "#",
- "problemName": "Excel Sheet | Part - 1"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-bit-differences2937/1",
- "solutionLink": "#",
- "problemName": "Sum of bit differences"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/binary-tree-to-cdll/1",
- "solutionLink": "#",
- "problemName": "Binary Tree to CDLL"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/vertical-sum/1",
- "solutionLink": "#",
- "problemName": "Vertical sum"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-tip-calculator2631/1",
- "solutionLink": "#",
- "problemName": "Maximum Tip Calculator"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/make-matrix-beautiful-1587115620/1",
- "solutionLink": "#",
- "problemName": "Make Matrix Beautiful"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/snake-and-ladder-problem4816/1",
- "solutionLink": "#",
- "problemName": "Snake and Ladder Problem"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/city-with-the-smallest-number-of-neighbors-at-a-threshold-distance/1",
- "solutionLink": "#",
- "problemName": "City With the Smallest Number of Neighbors at a Threshold Distance"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/most-frequent-word-in-an-array-of-strings3528/1",
- "solutionLink": "#",
- "problemName": "Most frequent word in an array of strings"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-subarrays-with-equal-number-of-1s-and-0s-1587115620/1",
- "solutionLink": "#",
- "problemName": "Subarrays with equal 1s and 0s"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/number-of-unique-paths5339/1",
- "solutionLink": "#",
- "problemName": "Number of Unique Paths"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-difference-1587115620/1",
- "solutionLink": "#",
- "problemName": "Maximum Difference"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-xor-of-all-pairs0723/1",
- "solutionLink": "#",
- "problemName": "Sum of XOR of all pairs"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-nth-element-of-spiral-matrix/1",
- "solutionLink": "#",
- "problemName": "Find kth element of spiral matrix"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/transitive-closure-of-a-graph0930/1",
- "solutionLink": "#",
- "problemName": "Transitive closure of a Graph"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sorted-subsequence-of-size-3/1",
- "solutionLink": "#",
- "problemName": "Sorted subsequence of size 3"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/gray-to-binary-equivalent-1587115620/1",
- "solutionLink": "#",
- "problemName": "Gray to Binary equivalent"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sorting-elements-of-an-array-by-frequency-1587115621/1",
- "solutionLink": "#",
- "problemName": "Sorting Elements of an Array by Frequency"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/add-binary-strings3805/1",
- "solutionLink": "#",
- "problemName": "Add Binary Strings"
- }
-]
-
-
-
-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 GFG website. You can also click on the solution link to view the solution of the problem.
\ No newline at end of file
diff --git a/dsa-problems/gfg-problems/medium/0301-0400.md b/dsa-problems/gfg-problems/medium/0301-0400.md
deleted file mode 100644
index 9c44bbeb8..000000000
--- a/dsa-problems/gfg-problems/medium/0301-0400.md
+++ /dev/null
@@ -1,622 +0,0 @@
----
-id: 0301-0400
-title: GFG medium problems 0301-0400
-sidebar_label: 0301-0400
-keywords:
- - gfg problems
- - gfg problems medium
- - gfg problems problems
----
-
-
-export const problems = [
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/grinding-geek/1",
- "solutionLink": "#",
- "problemName": "Grinding Geek"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-element-occuring-once-when-all-other-are-present-thrice/1",
- "solutionLink": "#",
- "problemName": "Find element occuring once when all other are present thrice"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/word-search/1",
- "solutionLink": "#",
- "problemName": "Word Search"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-and-value-1587115620/1",
- "solutionLink": "#",
- "problemName": "Maximum AND Value"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/max-sum-path-in-two-arrays/1",
- "solutionLink": "#",
- "problemName": "Max sum path in two arrays"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-prime-numbers-in-a-range4718/1",
- "solutionLink": "#",
- "problemName": "Find Prime numbers in a range"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/diagonal-sum-in-binary-tree/1",
- "solutionLink": "#",
- "problemName": "Diagonal sum in binary tree"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/special-keyboard3018/1",
- "solutionLink": "#",
- "problemName": "Special Keyboard"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/bridge-edge-in-graph/1",
- "solutionLink": "#",
- "problemName": "Bridge edge in a graph"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/transform-to-prime4635/1",
- "solutionLink": "#",
- "problemName": "Transform to prime"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximize-number-of-1s0905/1",
- "solutionLink": "#",
- "problemName": "Maximize Number of 1's"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/a-simple-fraction0921/1",
- "solutionLink": "#",
- "problemName": "A Simple Fraction"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/top-k-numbers3425/1",
- "solutionLink": "#",
- "problemName": "Top k numbers in a stream"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/container-with-most-water0535/1",
- "solutionLink": "#",
- "problemName": "Container With Most Water"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/reverse-each-word-in-a-given-string1001/1",
- "solutionLink": "#",
- "problemName": "Reverse each word in a given string"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-number-of-deletions-and-insertions0209/1",
- "solutionLink": "#",
- "problemName": "Minimum number of deletions and insertions."
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-ways-to-nth-stairorder-does-not-matter5639/1",
- "solutionLink": "#",
- "problemName": "Count ways to N'th Stair(Order does not matter)"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/game-of-death-in-a-circle1840/1",
- "solutionLink": "#",
- "problemName": "Find the Safe Position"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/number-of-good-components--170647/1",
- "solutionLink": "#",
- "problemName": "Number of Good Components"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/rearrange-a-linked-list/1",
- "solutionLink": "#",
- "problemName": "Rearrange a linked list"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/path-with-minimum-effort/1",
- "solutionLink": "#",
- "problemName": "Path With Minimum Effort"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/knight-walk4521/1",
- "solutionLink": "#",
- "problemName": "Knight Walk"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/buy-maximum-stocks-if-i-stocks-can-be-bought-on-i-th-day/1",
- "solutionLink": "#",
- "problemName": "Buy Maximum Stocks if i stocks can be bought on i-th day"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/print-n-bit-binary-numbers-having-more-1s-than-0s0252/1",
- "solutionLink": "#",
- "problemName": "Print N-bit binary numbers having more 1s than 0s"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-maximum-equal-sum-of-three-stacks/1",
- "solutionLink": "#",
- "problemName": "Find Maximum Equal sum of Three Stacks"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/three-sum-closest/1",
- "solutionLink": "#",
- "problemName": "Three Sum Closest"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/fraction-pairs-with-sum-1/1",
- "solutionLink": "#",
- "problemName": "Fraction pairs with sum 1"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-number-of-subtrees-having-given-sum/1",
- "solutionLink": "#",
- "problemName": "Count Number of SubTrees having given Sum"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/camelcase-pattern-matching2259/1",
- "solutionLink": "#",
- "problemName": "CamelCase Pattern Matching"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/3-divisors3942/1",
- "solutionLink": "#",
- "problemName": "3 Divisors"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/smith-number4132/1",
- "solutionLink": "#",
- "problemName": "Smith Number"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/two-numbers-with-odd-occurrences5846/1",
- "solutionLink": "#",
- "problemName": "Two numbers with odd occurrences"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/x-total-shapes3617/1",
- "solutionLink": "#",
- "problemName": "X Total Shapes"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-number-of-steps-to-reach-a-given-number5234/1",
- "solutionLink": "#",
- "problemName": "Minimum steps to destination"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/lemonade-change/1",
- "solutionLink": "#",
- "problemName": "Lemonade Change"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/foldable-binary-tree/1",
- "solutionLink": "#",
- "problemName": "Foldable Binary Tree"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/how-many-xs4514/1",
- "solutionLink": "#",
- "problemName": "How Many X's?"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/geek-and-its-game-of-coins4043/1",
- "solutionLink": "#",
- "problemName": "Geek and its Game of Coins"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/nearly-sorted-1587115620/1",
- "solutionLink": "#",
- "problemName": "Nearly sorted"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/subsets-1587115621/1",
- "solutionLink": "#",
- "problemName": "Unique Subsets"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-if-string-is-k-palindrome-or-not1923/1",
- "solutionLink": "#",
- "problemName": "K-Palindrome"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-special-numbers--170647/1",
- "solutionLink": "#",
- "problemName": "Count Special Numbers"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/duplicate-subtrees/1",
- "solutionLink": "#",
- "problemName": "Duplicate Subtrees"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-number-of-times-a-string-occurs-as-a-subsequence3020/1",
- "solutionLink": "#",
- "problemName": "String Subsequence"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-products5049/1",
- "solutionLink": "#",
- "problemName": "Sum of Products"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/transform-string5648/1",
- "solutionLink": "#",
- "problemName": "Transform String"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-if-two-nodes-are-cousins/1",
- "solutionLink": "#",
- "problemName": "Check if two Nodes are Cousins"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/smallest-factorial-number5929/1",
- "solutionLink": "#",
- "problemName": "Smallest factorial number"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/arrange-consonants-and-vowels/1",
- "solutionLink": "#",
- "problemName": "Arrange Consonants and Vowels"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/hamiltonian-path2522/1",
- "solutionLink": "#",
- "problemName": "Hamiltonian Path"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-if-a-string-is-repetition-of-its-substring-of-k-length3302/1",
- "solutionLink": "#",
- "problemName": "Check if a string is repetition of its substring of k-length"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/game-of-xor1541/1",
- "solutionLink": "#",
- "problemName": "Game of XOR"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/all-unique-permutations-of-an-array/1",
- "solutionLink": "#",
- "problemName": "All Unique Permutations of an array"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/prefix-match-with-other-strings/1",
- "solutionLink": "#",
- "problemName": "Prefix match with other strings"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/-matchsticks-game4906/1",
- "solutionLink": "#",
- "problemName": "Matchsticks game"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/rohans-love-for-matrix4723/1",
- "solutionLink": "#",
- "problemName": "Rohan's Love for Matrix"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/shortest-path-in-weighted-undirected-graph/1",
- "solutionLink": "#",
- "problemName": "Shortest Path in Weighted undirected graph"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/rotate-by-90-degree0356/1",
- "solutionLink": "#",
- "problemName": "Rotate by 90 degree"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/flatten-binary-tree-to-linked-list/1",
- "solutionLink": "#",
- "problemName": "Flatten binary tree to linked list"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/combination-sum-ii-1664263832/1",
- "solutionLink": "#",
- "problemName": "Combination Sum II"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/determinant-of-a-matrix-1587115620/1",
- "solutionLink": "#",
- "problemName": "Determinant of a Matrix"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-difference-of-zeros-and-ones-in-binary-string4111/1",
- "solutionLink": "#",
- "problemName": "Maximum difference of zeros and ones in binary string"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/generate-ip-addresses/1",
- "solutionLink": "#",
- "problemName": "Generate IP Addresses"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/largest-subsquare-surrounded-by-x0558/1",
- "solutionLink": "#",
- "problemName": "Largest subsquare surrounded by X"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/paths-from-root-with-a-specified-sum/1",
- "solutionLink": "#",
- "problemName": "Paths from root with a specified sum"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/exit-point-in-a-matrix0905/1",
- "solutionLink": "#",
- "problemName": "Exit Point in a Matrix"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/decode-the-string2444/1",
- "solutionLink": "#",
- "problemName": "Decode the string"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-sum-rectangle2948/1",
- "solutionLink": "#",
- "problemName": "Maximum sum Rectangle"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/smallest-number5829/1",
- "solutionLink": "#",
- "problemName": "Smallest number"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-distinct-pairs-with-difference-k1233/1",
- "solutionLink": "#",
- "problemName": "Count distinct pairs with difference k"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/construct-binary-tree-from-parent-array/1",
- "solutionLink": "#",
- "problemName": "Construct Binary Tree from Parent Array"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/insertion-sort-for-singly-linked-list/1",
- "solutionLink": "#",
- "problemName": "Insertion Sort for Singly Linked List"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/techfest-and-the-queue1044/1",
- "solutionLink": "#",
- "problemName": "Techfest and the Queue"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-swaps-for-bracket-balancing2704/1",
- "solutionLink": "#",
- "problemName": "Minimum Swaps for Bracket Balancing"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/generate-all-possible-parentheses/1",
- "solutionLink": "#",
- "problemName": "Generate Parentheses"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/restrictive-candy-crush--141631/1",
- "solutionLink": "#",
- "problemName": "Restrictive Candy Crush"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-duplicate-rows-in-a-binary-matrix/1",
- "solutionLink": "#",
- "problemName": "Find duplicate rows in a binary matrix"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/euler-circuit-and-path/1",
- "solutionLink": "#",
- "problemName": "Euler circuit and Path"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/longest-arithmetic-progression1019/1",
- "solutionLink": "#",
- "problemName": "Longest Arithmetic Progression"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/additive-sequence/1",
- "solutionLink": "#",
- "problemName": "Additive sequence"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/populate-inorder-successor-for-all-nodes/1",
- "solutionLink": "#",
- "problemName": "Populate Inorder Successor for all nodes"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimize-the-difference/1",
- "solutionLink": "#",
- "problemName": "Minimize the Difference"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/huffman-encoding3345/1",
- "solutionLink": "#",
- "problemName": "Huffman Encoding"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/construct-list-using-given-q-xor-queries/1",
- "solutionLink": "#",
- "problemName": "Construct list using given q XOR queries"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-shortest-safe-route-in-a-matrix/1",
- "solutionLink": "#",
- "problemName": "Find shortest safe route in a matrix"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/preorder-traversal-and-bst4006/1",
- "solutionLink": "#",
- "problemName": "Preorder Traversal and BST"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/is-it-a-tree/1",
- "solutionLink": "#",
- "problemName": "Check if a given graph is tree or not"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/smaller-on-left20360700/1",
- "solutionLink": "#",
- "problemName": "Smaller on Left"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/print-matrix-in-diagonal-pattern/1",
- "solutionLink": "#",
- "problemName": "Print matrix in diagonal pattern"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/water-the-plants--170646/1",
- "solutionLink": "#",
- "problemName": "Water the plants"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/add-minimum-characters--170648/1",
- "solutionLink": "#",
- "problemName": "Add Minimum Characters"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/absolute-list-sorting/1",
- "solutionLink": "#",
- "problemName": "Absolute List Sorting"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-product-subset-of-an-array/1",
- "solutionLink": "#",
- "problemName": "Maximum product subset of an array"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/longest-palindrome-in-a-string1956/1",
- "solutionLink": "#",
- "problemName": "Longest Palindromic Substring"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/number-of-subarrays-with-maximum-values-in-given-range5949/1",
- "solutionLink": "#",
- "problemName": "Number of subarrays with maximum values in given range"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-sum-of-hour-glass3842/1",
- "solutionLink": "#",
- "problemName": "Maximum sum of hour glass"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-absolute-difference-in-bst-1665139652/1",
- "solutionLink": "#",
- "problemName": "Minimum Absolute Difference In BST"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/make-binary-tree/1",
- "solutionLink": "#",
- "problemName": "Make Binary Tree From Linked List"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/add-all-greater-values-to-every-node-in-a-bst/1",
- "solutionLink": "#",
- "problemName": "Add all greater values to every node in a BST"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/euler-circuit-in-a-directed-graph/1",
- "solutionLink": "#",
- "problemName": "Euler Circuit in an Undirected Graph"
- }
-]
-
-
-
-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.
\ No newline at end of file
diff --git a/dsa-problems/gfg-problems/medium/0401-0500.md b/dsa-problems/gfg-problems/medium/0401-0500.md
deleted file mode 100644
index 309b769fd..000000000
--- a/dsa-problems/gfg-problems/medium/0401-0500.md
+++ /dev/null
@@ -1,622 +0,0 @@
----
-id: 0401-0500
-title: GFG medium problems 0401-0500
-sidebar_label: 0401-0500
-keywords:
- - gfg problems
- - gfg problems medium
- - gfg problems problems
----
-
-
-export const problems = [
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/get-minimum-squares0538/1",
- "solutionLink": "#",
- "problemName": "Get Minimum Squares"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/sequence-of-sequence1155/1",
- "solutionLink": "#",
- "problemName": "Sequence of Sequence"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/number-of-islands/1",
- "solutionLink": "#",
- "problemName": "Number Of Islands"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/good-by-2023/1",
- "solutionLink": "#",
- "problemName": "New Year Resolution"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-cost-to-make-two-strings-identical1107/1",
- "solutionLink": "#",
- "problemName": "Minimum Cost To Make Two Strings Identical"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/unique-paths-in-a-grid--170647/1",
- "solutionLink": "#",
- "problemName": "Unique Paths in a Grid"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-subsequences-of-type-ai-bj-ck4425/1",
- "solutionLink": "#",
- "problemName": "Count subsequences of type a^i, b^j, c^k"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-digit-groupings-of-a-number1520/1",
- "solutionLink": "#",
- "problemName": "Count digit groupings of a number"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/mobile-numeric-keypad5456/1",
- "solutionLink": "#",
- "problemName": "Mobile numeric keypad"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/preorder-traversal-iterative/1",
- "solutionLink": "#",
- "problemName": "Preorder traversal (Iterative)"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/large-factorial4721/1",
- "solutionLink": "#",
- "problemName": "Large Factorial"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/check-mirror-in-n-ary-tree1528/1",
- "solutionLink": "#",
- "problemName": "Check Mirror in N-ary tree"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/trail-of-ones3242/1",
- "solutionLink": "#",
- "problemName": "Trail of ones"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/inorder-traversal-iterative/1",
- "solutionLink": "#",
- "problemName": "Inorder Traversal (Iterative)"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/variation-in-nim-game4317/1",
- "solutionLink": "#",
- "problemName": "Modified Game of Nim"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/subarrays-with-sum-k/1",
- "solutionLink": "#",
- "problemName": "Subarrays with sum K"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/longest-alternating-subsequence5951/1",
- "solutionLink": "#",
- "problemName": "Longest alternating subsequence"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/asteroid-collision/1",
- "solutionLink": "#",
- "problemName": "Asteroid Collision"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/pairs-violating-bst-property--212515/1",
- "solutionLink": "#",
- "problemName": "Pairs violating the BST property"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/rearrange-characters4649/1",
- "solutionLink": "#",
- "problemName": "Rearrange characters"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/valid-compressed-string--170647/1",
- "solutionLink": "#",
- "problemName": "Valid Compressed String"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/rotate-a-2d-array-without-using-extra-space1004/1",
- "solutionLink": "#",
- "problemName": "Rotate a 2D array without using extra space"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/string-rp-or-pr--170647/1",
- "solutionLink": "#",
- "problemName": "String rp or pr"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/express-as-sum-of-power-of-natural-numbers5647/1",
- "solutionLink": "#",
- "problemName": "Express as sum of power of natural numbers"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/help-classmates--141631/1",
- "solutionLink": "#",
- "problemName": "Help Classmates"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/kth-common-ancestor-in-bst/1",
- "solutionLink": "#",
- "problemName": "Kth common ancestor in BST"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/castle-run3644/1",
- "solutionLink": "#",
- "problemName": "Traverse All Edges And Vertices"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/pattern/1",
- "solutionLink": "#",
- "problemName": "Pattern"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/dice-throw5349/1",
- "solutionLink": "#",
- "problemName": "Dice throw"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-of-subarrays5922/1",
- "solutionLink": "#",
- "problemName": "Count of Subarrays"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-k-th-smallest-element-in-given-n-ranges/1",
- "solutionLink": "#",
- "problemName": "Find k-th smallest element in given n ranges"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/subsets-1613027340/1",
- "solutionLink": "#",
- "problemName": "Subsets"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/clone-graph/1",
- "solutionLink": "#",
- "problemName": "Clone an Undirected Graph"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/min-coin5549/1",
- "solutionLink": "#",
- "problemName": "Min Coin"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/remove-and-reverse--170634/1",
- "solutionLink": "#",
- "problemName": "Remove and Reverse"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/permutation-with-spaces3627/1",
- "solutionLink": "#",
- "problemName": "Permutation with Spaces"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/cheapest-flights-within-k-stops/1",
- "solutionLink": "#",
- "problemName": "Cheapest Flights Within K Stops"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/smaller-sum--170647/1",
- "solutionLink": "#",
- "problemName": "Smaller Sum"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/decode-the-pattern1138/1",
- "solutionLink": "#",
- "problemName": "Look and Say Pattern"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/cutting-binary-string1342/1",
- "solutionLink": "#",
- "problemName": "Cutting Binary String"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/postorder-traversal-iterative/1",
- "solutionLink": "#",
- "problemName": "Postorder Traversal (Iterative)"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/alternate-vowel-and-consonant-string2939/1",
- "solutionLink": "#",
- "problemName": "Alternate Vowel and Consonant String"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/print-diagonally1623/1",
- "solutionLink": "#",
- "problemName": "Anti Diagonal Traversal of Matrix"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/rotate-and-delete-1587115621/1",
- "solutionLink": "#",
- "problemName": "Rotate and delete"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/santa-banta2814/1",
- "solutionLink": "#",
- "problemName": "Santa Banta"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/special-matrix4201/1",
- "solutionLink": "#",
- "problemName": "Special Matrix"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/task-scheduler/1",
- "solutionLink": "#",
- "problemName": "Task Scheduler"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/target-sum-1626326450/1",
- "solutionLink": "#",
- "problemName": "Target Sum"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/equal-sum0810/1",
- "solutionLink": "#",
- "problemName": "Equal Sum"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-triplet-product--170647/1",
- "solutionLink": "#",
- "problemName": "Maximum Triplet product"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-subset-sum--170648/1",
- "solutionLink": "#",
- "problemName": "Maximum subset sum"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/next-greater-element/1",
- "solutionLink": "#",
- "problemName": "Next Greater Element in Circular Array"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-length--170647/1",
- "solutionLink": "#",
- "problemName": "Maximum Length"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/possible-paths-between-2-vertices-1587115620/1",
- "solutionLink": "#",
- "problemName": "Possible paths between 2 vertices"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/flatten-bst-to-sorted-list--111950/1",
- "solutionLink": "#",
- "problemName": "Flatten BST to sorted list"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/subarray-range-with-given-sum0128/1",
- "solutionLink": "#",
- "problemName": "Subarray range with given sum"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/shortest-prime-path--141631/1",
- "solutionLink": "#",
- "problemName": "Shortest Prime Path"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/composite-and-prime0359/1",
- "solutionLink": "#",
- "problemName": "Composite and Prime"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/product-of-primes5328/1",
- "solutionLink": "#",
- "problemName": "Product of Primes"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/make-array-elements-unique--170645/1",
- "solutionLink": "#",
- "problemName": "Make array elements unique"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/complete-binary-tree/1",
- "solutionLink": "#",
- "problemName": "Complete Binary Tree"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/remove-the-balls--170647/1",
- "solutionLink": "#",
- "problemName": "Remove the balls"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/string-formation-from-substring2734/1",
- "solutionLink": "#",
- "problemName": "String formation from substring"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/nearest-smaller-tower--170647/1",
- "solutionLink": "#",
- "problemName": "Nearest smaller tower"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/replace-every-element-with-the-least-greater-element-on-its-right/1",
- "solutionLink": "#",
- "problemName": "Replace every element with the least greater element on its right"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/number-of-ways2552/1",
- "solutionLink": "#",
- "problemName": "Number of ways"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-times-a-has-to-be-repeated-such-that-b-is-a-substring-of-it--170645/1",
- "solutionLink": "#",
- "problemName": "Minimum times A has to be repeated such that B is a substring of it"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/second-smallest-number--170647/1",
- "solutionLink": "#",
- "problemName": "Second smallest number"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/leaves-to-dll/1",
- "solutionLink": "#",
- "problemName": "Leaves to DLL"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/finding-profession3834/1",
- "solutionLink": "#",
- "problemName": "Finding Profession"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-palindrome-sub-strings-of-a-string0652/1",
- "solutionLink": "#",
- "problemName": "Count Palindrome Sub-Strings of a String"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/polynomial-addition/1",
- "solutionLink": "#",
- "problemName": "Polynomial Addition"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/shy-geek--170647/1",
- "solutionLink": "#",
- "problemName": "Shy Geek"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/array-removals/1",
- "solutionLink": "#",
- "problemName": "Array Removals"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/intersection-point-in-y-shaped-linked-lists--170645/1",
- "solutionLink": "#",
- "problemName": "Intersection Point in Y Shaped Linked Lists"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/prime-list--170646/1",
- "solutionLink": "#",
- "problemName": "Prime List"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/smallest-sum-contiguous-subarray/1",
- "solutionLink": "#",
- "problemName": "Smallest sum contiguous subarray"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/minimum-steps-required--170647/1",
- "solutionLink": "#",
- "problemName": "Minimum Steps Required"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/maximum-intersecting-lines--170647/1",
- "solutionLink": "#",
- "problemName": "Maximum Intersecting Lines"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/delete-nodes-greater-than-k/1",
- "solutionLink": "#",
- "problemName": "Delete nodes greater than k"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/hands-of-straights/1",
- "solutionLink": "#",
- "problemName": "Hands of Straights"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/length-of-the-longest-subarray-with-positive-product--170646/1",
- "solutionLink": "#",
- "problemName": "Length of the longest subarray with positive product"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/magic-triplets4003/1",
- "solutionLink": "#",
- "problemName": "Magic Triplets"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/is-sudoku-valid4820/1",
- "solutionLink": "#",
- "problemName": "Is Sudoku Valid"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/geek-and-number-string--141631/1",
- "solutionLink": "#",
- "problemName": "Geek and Number String"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-even-length1907/1",
- "solutionLink": "#",
- "problemName": "Count even length"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-pairs-in-array-divisible-by-k/1",
- "solutionLink": "#",
- "problemName": "Count pairs in array divisible by K"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/bst-maximum-difference--170647/1",
- "solutionLink": "#",
- "problemName": "BST Maximum Difference"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/another-coin-change-problem--170647/1",
- "solutionLink": "#",
- "problemName": "Another Coin Change Problem"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/subsets-with-xor-value2023/1",
- "solutionLink": "#",
- "problemName": "Subsets with XOR value"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/find-kth-permutation-0932/1",
- "solutionLink": "#",
- "problemName": "Find Kth permutation"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/max-coins--170647/1",
- "solutionLink": "#",
- "problemName": "Max Coins"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/stack-permutations/1",
- "solutionLink": "#",
- "problemName": "Stack Permutations"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/geeks-training/1",
- "solutionLink": "#",
- "problemName": "Geek's Training"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/black-and-white-1587115620/1",
- "solutionLink": "#",
- "problemName": "Black and White"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/largest-subtree-sum-in-a-tree/1",
- "solutionLink": "#",
- "problemName": "Largest subtree sum in a tree"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/distinct-coloring--170645/1",
- "solutionLink": "#",
- "problemName": "Distinct Coloring"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/prefix-suffix-string--170647/1",
- "solutionLink": "#",
- "problemName": "Prefix Suffix String"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/easy-task--170647/1",
- "solutionLink": "#",
- "problemName": "Easy Task"
- },
- {
- "difficulty": "Medium",
- "gfgLink": "https://www.geeksforgeeks.org/problems/count-total-setbits/1",
- "solutionLink": "#",
- "problemName": "Count Total Setbits"
- }
-]
-
-
-
-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.
\ No newline at end of file
diff --git a/dsa-problems/gfg-problems/medium/0501-0600.md b/dsa-problems/gfg-problems/medium/0501-0600.md
deleted file mode 100644
index afb1b9c03..000000000
--- a/dsa-problems/gfg-problems/medium/0501-0600.md
+++ /dev/null
@@ -1,621 +0,0 @@
----
-id: 0501-0600
-title: GFG medium problems 0501-0600
-sidebar_label: 0501-0600
-keywords:
- - gfg problems
- - gfg problems medium
- - gfg problems problems
----
-
-export const problems = [
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/maximum-possible-value--170647/1",
-"solutionLink": "#",
-"problemName": "Maximum Possible Value"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/geeks-and-the-string--170645/1",
-"solutionLink": "#",
-"problemName": "Geeks And The String"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/carpet-into-box--170645/1",
-"solutionLink": "#",
-"problemName": "Carpet into Box"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/max-sum-without-adjacents--170645/1",
-"solutionLink": "#",
-"problemName": "Max Sum without Adjacents"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/maximum-sum-leaf-to-root-path/1",
-"solutionLink": "#",
-"problemName": "Maximum sum leaf to root path"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/minimize-number-of-students-to-be-removed--170645/1",
-"solutionLink": "#",
-"problemName": "Minimize number of Students to be removed"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/tree-transformation--170648/1",
-"solutionLink": "#",
-"problemName": "Tree Transformation"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/divisibility-tree1902/1",
-"solutionLink": "#",
-"problemName": "Divisibility tree"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/shortest-xy-distance-in-grid--170647/1",
-"solutionLink": "#",
-"problemName": "Shortest XY distance in Grid"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/spiral-matrix--141631/1",
-"solutionLink": "#",
-"problemName": "Spiral Matrix"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/apple-sequences--170646/1",
-"solutionLink": "#",
-"problemName": "Apple Sequences"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/unequal-arrays--170647/1",
-"solutionLink": "#",
-"problemName": "Unequal Arrays"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/division-without-using-multiplication-division-and-mod-operator/1",
-"solutionLink": "#",
-"problemName": "Division without using multiplication, division and mod operator"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/even-swap/1",
-"solutionLink": "#",
-"problemName": "Even Swap"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/save-your-life4601/1",
-"solutionLink": "#",
-"problemName": "Save Your Life"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/find-number--170647/1",
-"solutionLink": "#",
-"problemName": "Find Number"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/minimum-number-of-deletions4610/1",
-"solutionLink": "#",
-"problemName": "Minimum number of deletions."
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/possible-paths3834/1",
-"solutionLink": "#",
-"problemName": "Possible paths"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/absolute-difference-divisible-by-k/1",
-"solutionLink": "#",
-"problemName": "Absolute difference divisible by K"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/count-cyclic-paths--170647/1",
-"solutionLink": "#",
-"problemName": "Count Cyclic Paths"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/geeks-village-and-wells--170647/1",
-"solutionLink": "#",
-"problemName": "Geek's Village and Wells"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/bst-downward-traversal--170646/1",
-"solutionLink": "#",
-"problemName": "BST Downward Traversal"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/champagne-overflow2636/1",
-"solutionLink": "#",
-"problemName": "Water Overflow"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/stepping-numberswrong-output1813/1",
-"solutionLink": "#",
-"problemName": "Stepping Numbers"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/police-and-thieves--141631/1",
-"solutionLink": "#",
-"problemName": "Police and Thieves"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/job-sequencing-problem--170647/1",
-"solutionLink": "#",
-"problemName": "Job Sequencing Problem"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/print-leaf-nodes-from-preorder-traversal-of-bst2657/1",
-"solutionLink": "#",
-"problemName": "Print leaf nodes from preorder traversal of BST"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/minimum-days--170646/1",
-"solutionLink": "#",
-"problemName": "Minimum Days"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/substrings-of-length-k-with-k-1-distinct-elements/1",
-"solutionLink": "#",
-"problemName": "Substrings of length k with k-1 distinct elements"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/modify-linked-list-1-0546/1",
-"solutionLink": "#",
-"problemName": "Modify Linked List-1"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/find-distinct-elements2054/1",
-"solutionLink": "#",
-"problemName": "Find distinct elements"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/find-patterns0606/1",
-"solutionLink": "#",
-"problemName": "Find patterns"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/update-queries--170647/1",
-"solutionLink": "#",
-"problemName": "Update Queries"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/fruit-into-baskets-1663137462/1",
-"solutionLink": "#",
-"problemName": "Fruit Into Baskets"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/palindrome-with-minimum-sum--170648/1",
-"solutionLink": "#",
-"problemName": "Palindrome with minimum sum"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/expression-contains-redundant-bracket-or-not/1",
-"solutionLink": "#",
-"problemName": "Expression contains redundant bracket or not"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/maximize-the-sum-of-selected-numbers-from-an-array-to-make-it-empty0836/1",
-"solutionLink": "#",
-"problemName": "Maximize the sum of selected numbers from a sorted array to make it empty"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/minimal-cost/1",
-"solutionLink": "#",
-"problemName": "Minimal Cost"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-prime4751/1",
-"solutionLink": "#",
-"problemName": "Sum Of Prime"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/coin-piles5152/1",
-"solutionLink": "#",
-"problemName": "Coin Piles"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/find-minimum-number-of-laptops-required--170645/1",
-"solutionLink": "#",
-"problemName": "Find minimum number of Laptops required"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/good-stones--170647/1",
-"solutionLink": "#",
-"problemName": "Good Stones"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/distinct-difference--170647/1",
-"solutionLink": "#",
-"problemName": "Distinct Difference"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/form-a-palindrome2544/1",
-"solutionLink": "#",
-"problemName": "Form a palindrome"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/transfiguration--141631/1",
-"solutionLink": "#",
-"problemName": "Transfiguration"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/a-difference-of-values-and-indexes0302/1",
-"solutionLink": "#",
-"problemName": "A difference of values and indexes"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/check-if-all-levels-of-two-trees-are-anagrams-or-not/1",
-"solutionLink": "#",
-"problemName": "Check if all levels of two trees are anagrams or not"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/maximum-intervals-overlap5708/1",
-"solutionLink": "#",
-"problemName": "Maximum Intervals Overlap"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/clone-a-binary-tree/1",
-"solutionLink": "#",
-"problemName": "Clone a Binary Tree"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/flattening-a-linked-list--170645/1",
-"solutionLink": "#",
-"problemName": "Flattening a Linked List"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/fibonacci-sum1423/1",
-"solutionLink": "#",
-"problemName": "Fibonacci Sum"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/max-sum-subarray-by-removing-at-most-one-element/1",
-"solutionLink": "#",
-"problemName": "Max sum subarray by removing at most one element"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/bheem-wants-ladoos--170647/1",
-"solutionLink": "#",
-"problemName": "Bheem Wants Ladoos"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/kth-smallest-factor2345/1",
-"solutionLink": "#",
-"problemName": "Kth Smallest Factor"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/find-all-distinct-subset-or-subsequence-sums4424/1",
-"solutionLink": "#",
-"problemName": "Find all distinct subset (or subsequence) sums"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/find-k-th-character-in-string3841/1",
-"solutionLink": "#",
-"problemName": "Find k-th character in string"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/length-of-longest-palindrome-in-linked-list/1",
-"solutionLink": "#",
-"problemName": "Length of longest palindrome in linked list"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/construct-tree-from-preorder-traversal/1",
-"solutionLink": "#",
-"problemName": "Construct Tree from Preorder Traversal"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/convert-level-order-traversal-to-bst/1",
-"solutionLink": "#",
-"problemName": "Convert Level Order Traversal to BST"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/construct-binary-tree-from-string-with-bracket-representation/1",
-"solutionLink": "#",
-"problemName": "Construct Binary Tree from String with bracket representation"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/super-primes2443/1",
-"solutionLink": "#",
-"problemName": "Super Primes"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/bst-to-max-heap/1",
-"solutionLink": "#",
-"problemName": "BST to max heap"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/geek-hates-too-many-1s--170647/1",
-"solutionLink": "#",
-"problemName": "Geek hates too many 1s"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/capacity-to-ship-packages-within-d-days/1",
-"solutionLink": "#",
-"problemName": "Capacity To Ship Packages Within D Days"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-subarrays2229/1",
-"solutionLink": "#",
-"problemName": "Sum of Subarrays"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/count-of-sum-of-consecutives3741/1",
-"solutionLink": "#",
-"problemName": "Count of sum of consecutives"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/walls-coloring--170646/1",
-"solutionLink": "#",
-"problemName": "Walls Coloring"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/valid-expression1025/1",
-"solutionLink": "#",
-"problemName": "Valid Expression"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/missing-number-in-matrix5316/1",
-"solutionLink": "#",
-"problemName": "Missing number in matrix"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/search-in-rotated-array-2/1",
-"solutionLink": "#",
-"problemName": "Search in Rotated Array 2"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/connect-nodes-at-same-level--170647/1",
-"solutionLink": "#",
-"problemName": "Connect Nodes at Same Level"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/fill-the-matrix--170647/1",
-"solutionLink": "#",
-"problemName": "Fill the Matrix"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-beauty-of-all-substrings-1662962118/1",
-"solutionLink": "#",
-"problemName": "Sum of Beauty of All Substrings"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/pots-of-gold-game/1",
-"solutionLink": "#",
-"problemName": "Pots of Gold Game"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/akku-and-binary-numbers0902/1",
-"solutionLink": "#",
-"problemName": "Akku and Binary Numbers"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/good-subtrees--170647/1",
-"solutionLink": "#",
-"problemName": "Good Subtrees"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/construct-a-full-binary-tree--170648/1",
-"solutionLink": "#",
-"problemName": "Construct a Full Binary Tree"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/close-to-perfection1525/1",
-"solutionLink": "#",
-"problemName": "Longest Perfect Piece"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/valid-pair-sum--141631/1",
-"solutionLink": "#",
-"problemName": "Valid Pair Sum"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/save-gotham1222/1",
-"solutionLink": "#",
-"problemName": "Save Gotham!"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/find-the-longest-string--170645/1",
-"solutionLink": "#",
-"problemName": "Find the longest string"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/lcm-triplet1501/1",
-"solutionLink": "#",
-"problemName": "LCM Triplet"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/find-largest-word-in-dictionary2430/1",
-"solutionLink": "#",
-"problemName": "Find largest word in dictionary"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/ways-to-write-n-as-sum-1587115621/1",
-"solutionLink": "#",
-"problemName": "Ways to write n as sum"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/tic-tac-toe2412/1",
-"solutionLink": "#",
-"problemName": "Tic Tac Toe"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/complement3911/1",
-"solutionLink": "#",
-"problemName": "Complement"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/handshakes1303/1",
-"solutionLink": "#",
-"problemName": "Handshakes"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/yet-another-query-problem--170647/1",
-"solutionLink": "#",
-"problemName": "Yet another query problem"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/minimum-x-xor-a--170645/1",
-"solutionLink": "#",
-"problemName": "Minimum X (xor) A"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/fill-up-buckets3500/1",
-"solutionLink": "#",
-"problemName": "Fill up buckets"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/special-palindrome-substrings--170647/1",
-"solutionLink": "#",
-"problemName": "Special Palindrome Substrings"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/quick-sort-on-linked-list/1",
-"solutionLink": "#",
-"problemName": "Quick Sort on Linked List"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/mila-and-strings0435/1",
-"solutionLink": "#",
-"problemName": "Lexicographically smallest string"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/build-the-smallest2841/1",
-"solutionLink": "#",
-"problemName": "Build the smallest"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/cat-and-hat-python/1",
-"solutionLink": "#",
-"problemName": "Cat and Hat"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/single-valued-subtree/1",
-"solutionLink": "#",
-"problemName": "Single valued subtree"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/knight-in-geekland--170647/1",
-"solutionLink": "#",
-"problemName": "Knight in Geekland"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/optimal-array--170647/1",
-"solutionLink": "#",
-"problemName": "Optimal Array"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/find-all-possible-palindromic-partitions-of-a-string/1",
-"solutionLink": "#",
-"problemName": "Find all possible palindromic partitions of a String"
-},
-{
-"difficulty": "Medium",
-"gfgLink": "https://www.geeksforgeeks.org/problems/merging-details/1",
-"solutionLink": "#",
-"problemName": "Merging Details"
-}
-]
-
-
-
-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.
diff --git a/dsa-problems/gfg-problems/school/0001-0100.md b/dsa-problems/gfg-problems/school/0001-0100.md
deleted file mode 100644
index 16e483ac3..000000000
--- a/dsa-problems/gfg-problems/school/0001-0100.md
+++ /dev/null
@@ -1,621 +0,0 @@
----
-id: 0001-0100
-title: GFG school problems 0001-0100
-sidebar_label: 0001-0100
-keywords:
- - gfg problems
- - gfg problems school
- - gfg problems problems
----
-
-export const problems = [
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-series2811/1",
-"solutionLink": "#",
-"problemName": "Sum of Series"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/value-equal-to-index-value1330/1",
-"solutionLink": "#",
-"problemName": "Value equal to index value"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/print-1-to-n-without-using-loops-1587115620/1",
-"solutionLink": "#",
-"problemName": "Print 1 To N Without Loop"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/print-alternate-elements-of-an-array/1",
-"solutionLink": "#",
-"problemName": "Print alternate elements of an array"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/palindromic-array-1587115620/1",
-"solutionLink": "#",
-"problemName": "Palindromic Array"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/print-the-pattern-set-1/1",
-"solutionLink": "#",
-"problemName": "Print the pattern | Set-1"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/find-the-median0527/1",
-"solutionLink": "#",
-"problemName": "Find the median"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/check-for-binary/1",
-"solutionLink": "#",
-"problemName": "Check for Binary"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/java-hello-world4004/1",
-"solutionLink": "#",
-"problemName": "Java Hello World"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/count-of-smaller-elements5947/1",
-"solutionLink": "#",
-"problemName": "Count of smaller elements"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-array2326/1",
-"solutionLink": "#",
-"problemName": "Sum of Array"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/print-elements-of-array4910/1",
-"solutionLink": "#",
-"problemName": "Print Elements of Array"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/find-index4752/1",
-"solutionLink": "#",
-"problemName": "Find Index"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/palindrome0746/1",
-"solutionLink": "#",
-"problemName": "Palindrome"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/reverse-digit0316/1",
-"solutionLink": "#",
-"problemName": "Reverse digits"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/java-if-else-decision-making0924/1",
-"solutionLink": "#",
-"problemName": "if-else (Decision Making)"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/gcd-of-two-numbers3459/1",
-"solutionLink": "#",
-"problemName": "GCD of two numbers"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/swap-kth-elements5500/1",
-"solutionLink": "#",
-"problemName": "Swap kth elements"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/display-longest-name0853/1",
-"solutionLink": "#",
-"problemName": "Display longest name"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/odd-or-even3618/1",
-"solutionLink": "#",
-"problemName": "Odd or Even"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/java-convert-string-to-lowercase2313/1",
-"solutionLink": "#",
-"problemName": "Convert String to LowerCase"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/c-array-print-an-element-set-25933/1",
-"solutionLink": "#",
-"problemName": "C++ Array (print an element) | Set 2"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/remove-spaces0128/1",
-"solutionLink": "#",
-"problemName": "Remove Spaces"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/perfect-arrays4645/1",
-"solutionLink": "#",
-"problemName": "Perfect Arrays"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/smaller-and-larger4005/1",
-"solutionLink": "#",
-"problemName": "Smaller and Larger"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/c-if-else-decision-making4138/1",
-"solutionLink": "#",
-"problemName": "C++ if-else (Decision Making)"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/addition-of-two-numbers0812/1",
-"solutionLink": "#",
-"problemName": "Addition of Two Numbers"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-digit-is-pallindrome-or-not2751/1",
-"solutionLink": "#",
-"problemName": "Sum of Digit is Pallindrome or not"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/series-ap5310/1",
-"solutionLink": "#",
-"problemName": "Series AP"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/java-reverse-a-string0416/1",
-"solutionLink": "#",
-"problemName": "Reverse a String"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/print-1-to-n-without-using-loops3621/1",
-"solutionLink": "#",
-"problemName": "Print 1 to n without using loops"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/at-least-two-greater-elements4625/1",
-"solutionLink": "#",
-"problemName": "At least two greater elements"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/c-input-output2432/1",
-"solutionLink": "#",
-"problemName": "C++ Input / Output"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/swap-two-numbers3844/1",
-"solutionLink": "#",
-"problemName": "Swap two numbers"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/print-table0303/1",
-"solutionLink": "#",
-"problemName": "Multiplication Table"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/reversing-the-vowels5304/1",
-"solutionLink": "#",
-"problemName": "Reversing the vowels"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/java-arrays-set-11354/1",
-"solutionLink": "#",
-"problemName": "Java Arrays | Set 1"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/upper-case-conversion5419/1",
-"solutionLink": "#",
-"problemName": "Upper case conversion"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/print-the-left-element2009/1",
-"solutionLink": "#",
-"problemName": "Print the left element"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-digits1742/1",
-"solutionLink": "#",
-"problemName": "Sum Of Digits"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/remove-vowels-from-string1446/1",
-"solutionLink": "#",
-"problemName": "Remove vowels from string"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/npr4253/1",
-"solutionLink": "#",
-"problemName": "nPr"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/average4856/1",
-"solutionLink": "#",
-"problemName": "Average in a stream"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/check-string1818/1",
-"solutionLink": "#",
-"problemName": "Check String"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/the-dice-problem2316/1",
-"solutionLink": "#",
-"problemName": "The dice problem"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/sum-palindrome3857/1",
-"solutionLink": "#",
-"problemName": "Sum Palindrome"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/vowel-or-not0831/1",
-"solutionLink": "#",
-"problemName": "Vowel or Not"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/java-switch-case-statement3529/1",
-"solutionLink": "#",
-"problemName": "Java Switch Case statement"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/java-strings-set-15112/1",
-"solutionLink": "#",
-"problemName": "Java Strings | Set 1"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/java-delete-alternate-characters4036/1",
-"solutionLink": "#",
-"problemName": "Delete alternate characters"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/compete-the-skills5807/1",
-"solutionLink": "#",
-"problemName": "Compete the skills"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/c-strings4609/1",
-"solutionLink": "#",
-"problemName": "C++ Strings"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-elements-in-a-matrix2000/1",
-"solutionLink": "#",
-"problemName": "Sum of elements in a matrix"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/find-the-camel3348/1",
-"solutionLink": "#",
-"problemName": "Count of camel case characters"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/c-functions-set-1introduction/1",
-"solutionLink": "#",
-"problemName": "C++ Functions (Sum of numbers) | Set 1"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/greatest-of-three-numbers2520/1",
-"solutionLink": "#",
-"problemName": "Greatest of three numbers"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/java-inputoutput0118/1",
-"solutionLink": "#",
-"problemName": "Java Input/Output"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/c-switch-case-statement5900/1",
-"solutionLink": "#",
-"problemName": "C++ Switch Case Statement"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/remainder-evaluation3755/1",
-"solutionLink": "#",
-"problemName": "Remainder Evaluation"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/convert-a-list-of-characters-into-a-string5142/1",
-"solutionLink": "#",
-"problemName": "Convert a list of characters into a String"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/lower-case-to-upper-case3410/1",
-"solutionLink": "#",
-"problemName": "Lower case to upper case"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/number-of-divisors1631/1",
-"solutionLink": "#",
-"problemName": "Number of divisors"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/c-2-d-arrays0708/1",
-"solutionLink": "#",
-"problemName": "C++ 2-D Arrays | Set-1"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/c-operators4602/1",
-"solutionLink": "#",
-"problemName": "C++ Operators | Set 1 (Arithmetic)"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/count-type-of-characters3635/1",
-"solutionLink": "#",
-"problemName": "Count type of Characters"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/simple-interest3457/1",
-"solutionLink": "#",
-"problemName": "Simple Interest"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/c-pointers-set-1introduction/1",
-"solutionLink": "#",
-"problemName": "C++ Pointers ( Incrementing a variable) | Set 1"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/find-n-th-term-of-series-1-3-6-10-15-215506/1",
-"solutionLink": "#",
-"problemName": "Find n-th term of series 1, 3, 6, 10, 15, 21"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/multiply-matrices/1",
-"solutionLink": "#",
-"problemName": "Multiply Matrices"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/binary-representation5003/1",
-"solutionLink": "#",
-"problemName": "Binary representation"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/mean0021/1",
-"solutionLink": "#",
-"problemName": "Mean"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/power-of-pow-even-number5440/1",
-"solutionLink": "#",
-"problemName": "Power of Pow | Even Number"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/java-inheritance/1",
-"solutionLink": "#",
-"problemName": "Java Inheritance"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/java-substring5058/1",
-"solutionLink": "#",
-"problemName": "Java Substring"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/remove-characters-from-alphanumeric-string0648/1",
-"solutionLink": "#",
-"problemName": "Remove characters from alphanumeric string"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/pattern-printing1347/1",
-"solutionLink": "#",
-"problemName": "Pattern Printing"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-ap-series4512/1",
-"solutionLink": "#",
-"problemName": "Sum of AP series"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/multiply-array-1658312632/1",
-"solutionLink": "#",
-"problemName": "Multiply Array"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/c-data-types1523/1",
-"solutionLink": "#",
-"problemName": "C++ Data Types"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/pattern-of-strings3829/1",
-"solutionLink": "#",
-"problemName": "Pattern of Strings"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/java-basic-data-types0041/1",
-"solutionLink": "#",
-"problemName": "Java Basic Data Types"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/full-prime2659/1",
-"solutionLink": "#",
-"problemName": "Full Prime"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/small-factorial0854/1",
-"solutionLink": "#",
-"problemName": "Small Factorial"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/perfect-number3759/1",
-"solutionLink": "#",
-"problemName": "Perfect Number"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/c-operators-relational-set-21407/1",
-"solutionLink": "#",
-"problemName": "C++ Operators (Relational) | Set 2"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/cube-root-of-a-number0915/1",
-"solutionLink": "#",
-"problemName": "Cube root of a number"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/split-strings5211/1",
-"solutionLink": "#",
-"problemName": "Split Strings"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/power-of-pow-odd-numbers1103/1",
-"solutionLink": "#",
-"problemName": "Power of Pow | Odd Numbers"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/java-loops-set-11726/1",
-"solutionLink": "#",
-"problemName": "Java loops | Set 1"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-odd-and-even-elements3033/1",
-"solutionLink": "#",
-"problemName": "Sum of odd and even elements"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/distance-between-2-points3200/1",
-"solutionLink": "#",
-"problemName": "Distance between 2 points"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/1s-complement2819/1",
-"solutionLink": "#",
-"problemName": "1s Complement"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/surface-area-and-volume-of-cuboid0522/1",
-"solutionLink": "#",
-"problemName": "Surface Area and Volume of Cuboid"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/sum-of-gp2120/1",
-"solutionLink": "#",
-"problemName": "Sum of GP"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/java-operatorsrelational-set-22338/1",
-"solutionLink": "#",
-"problemName": "Java Operators(Relational) | Set - 2"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/extract-the-integers4428/1",
-"solutionLink": "#",
-"problemName": "Extract the integers"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/java-override/1",
-"solutionLink": "#",
-"problemName": "Java Override"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/floyds-triangle1222/1",
-"solutionLink": "#",
-"problemName": "Floyd's triangle"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/even-odd-sum5450/1",
-"solutionLink": "#",
-"problemName": "Even Odd Sum"
-},
-{
-"difficulty": "School",
-"gfgLink": "https://www.geeksforgeeks.org/problems/identical-matrices1042/1",
-"solutionLink": "#",
-"problemName": "Identical Matrices"
-}
-]
-
-
-
-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.
diff --git a/dsa-problems/gfg-problems/school/0101-0123.md b/dsa-problems/gfg-problems/school/0101-0123.md
deleted file mode 100644
index 9e52aeb3d..000000000
--- a/dsa-problems/gfg-problems/school/0101-0123.md
+++ /dev/null
@@ -1,159 +0,0 @@
----
-id: 0101-0123
-title: GFG school problems 0101-0123
-sidebar_label: 0101-0123
-keywords:
- - gfg problems
- - gfg problems school
- - 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"
-}
-]
-
-
-
-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.
diff --git a/dsa-problems/index.md b/dsa-problems/index.md
deleted file mode 100644
index a5e21c032..000000000
--- a/dsa-problems/index.md
+++ /dev/null
@@ -1,50 +0,0 @@
----
-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.
-
-## Why Data Structures and Algorithms are important?
-
-Data Structures and Algorithms are important because they help in writing efficient code. By using the right data structure and algorithm, you can reduce the time and space complexity of your code. This can help in improving the performance of your code and making it more scalable. Data Structures and Algorithms are also important for coding interviews as they are frequently asked in coding interviews.
-
-## How to prepare for Data Structures and Algorithms?
-
-To prepare for Data Structures and Algorithms, you can start by learning the basic data structures like arrays, linked lists, stacks, queues, trees, graphs, etc. You can then move on to learning the basic algorithms like sorting, searching, recursion, dynamic programming, etc. You can practice solving problems on these data structures and algorithms on platforms like LeetCode, HackerRank, Codeforces, etc. You can also refer to books like "Introduction to Algorithms" by Cormen, Leiserson, Rivest, and Stein, "Cracking the Coding Interview" by Gayle Laakmann McDowell, etc.
-
-## List of Data Structures and Algorithms Problems
-
-Here is a list of Data Structures and Algorithms Problems that are available on this website:
-
-- [Array Problems](#)
-- [Linked List Problems](#)
-- [Stack Problems](#)
-- [Queue Problems](#)
-- [Tree Problems](#)
-- [Graph Problems](#)
-- [Sorting Problems](#)
-- [Searching Problems](#)
-- [Recursion Problems](#)
-- [Dynamic Programming Problems](#)
-- [Greedy Problems](#)
-- [Backtracking Problems](#)
-- [Bit Manipulation Problems](#)
-- [Math Problems](#)
-- [String Problems](#)
-- [Matrix Problems](#)
-- [Miscellaneous Problems](#)
-- [LeetCode Problems](#)
-- [HackerRank Problems](#)
-- [Codeforces Problems](#)
-
-You can click on the links above to view the problems in each category. You can also use the search bar at the top of the page to search for specific problems.
-
-## 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.
diff --git a/dsa-problems/leetcode-problems/0000-0099.md b/dsa-problems/leetcode-problems/0000-0099.md
deleted file mode 100644
index 3f7920e35..000000000
--- a/dsa-problems/leetcode-problems/0000-0099.md
+++ /dev/null
@@ -1,615 +0,0 @@
----
-id: 0000-0099
-title: LeetCode Problems 0 - 99
-sidebar_label: 0000-0099
-keywords:
- - leetcode problems
- - leetcode problems 0 - 99
- - leetcode problems problems
----
-
-export const problems = [
-{
-"problemName": "1. Two Sum",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/two-sum/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/two-sum"
-},
-{
-"problemName": "2. Add Two Numbers",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/add-two-numbers/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/add-two-numbers"
-},
-{
-"problemName": "3. Longest Substring Without Repeating Characters",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/longest-substring-without-repeating-characters/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/longest-substrings-without-repeating-characters"
-},
-{
-"problemName": "4. Median of Two Sorted Arrays",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/median-of-two-sorted-arrays/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/median-of-two-sorted-arrays"
-},
-{
-"problemName": "5. Longest Palindromic Substring",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/longest-palindromic-substring/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/Longest Palindromic Substring"
-},
-{
-"problemName": "6. ZigZag Conversion",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/zigzag-conversion/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/Zigzag Conversion"
-},
-{
-"problemName": "7. Reverse Integer",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/reverse-integer/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/Reverse Integer"
-},
-{
-"problemName": "8. String to Integer (atoi)",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/string-to-integer-atoi/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/String to Integer"
-},
-{
-"problemName": "9. Palindrome Number",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/palindrome-number/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/Palindrome Number"
-},
-{
-"problemName": "10. Regular Expression Matching",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/regular-expression-matching/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/Regular Expression Matching"
-},
-{
-"problemName": "11. Container With Most Water",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/container-with-most-water/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/Container With Most Water"
-},
-{
-"problemName": "12. Integer to Roman",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/integer-to-roman/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/Integer to Roman"
-},
-{
-"problemName": "13. Roman to Integer",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/roman-to-integer/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/Roman to Integer"
-},
-{
-"problemName": "14. Longest Common Prefix",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/longest-common-prefix/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/Longest Comman Prefix"
-},
-{
-"problemName": "15. 3Sum",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/3sum/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/3Sum"
-},
-{
-"problemName": "16. 3Sum Closest",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/3sum-closest/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/3Sum Closest"
-},
-{
-"problemName": "17. Letter Combinations of a Phone Number",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/letter-combinations-of-a-phone-number/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/letter-combination"
-},
-{
-"problemName": "18. 4Sum",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/4sum/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/four-sum"
-},
-{
-"problemName": "19. Remove Nth Node From End of List",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/remove-nth-node-from-end-of-list/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/remove-nth-node-from-end-of-list"
-},
-{
-"problemName": "20. Valid Parentheses",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/valid-parentheses/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/valid-parentheses"
-},
-{
-"problemName": "21. Merge Two Sorted Lists",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/merge-two-sorted-lists/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/merge-two-sorted-lists"
-},
-{
-"problemName": "22. Generate Parentheses",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/generate-parentheses/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/generate-parentheses"
-},
-{
-"problemName": "23. Merge k Sorted Lists",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/merge-k-sorted-lists/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/merge-k-sorted-list"
-},
-{
-"problemName": "24. Swap Nodes in Pairs",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/swap-nodes-in-pairs/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/swap-nodes-in-pairs"
-},
-{
-"problemName": "25. Reverse Nodes in k-Group",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/reverse-nodes-in-k-group/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/remove-duplicates-from-sorted-list-2"
-},
-{
-"problemName": "26. Remove Duplicates from Sorted Array",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/remove-duplicates-from-sorted-array/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/remove-duplicates-from-sorted-array"
-},
-{
-"problemName": "27. Remove Element",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/remove-element/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/remove-element"
-},
-{
-"problemName": "28. Implement strStr()",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/implement-strstr/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/find-first-occurrence-in-string"
-},
-{
-"problemName": "29. Divide Two Integers",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/divide-two-integers/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/divide-two-integers"
-},
-{
-"problemName": "30. Substring with Concatenation of All Words",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/substring-with-concatenation-of-all-words/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/substring-with-concatenation-of-all-words"
-},
-{
-"problemName": "31. Next Permutation",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/next-permutation/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/next-permutation"
-},
-{
-"problemName": "32. Longest Valid Parentheses",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/longest-valid-parentheses/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/longest-valid-parentheses"
-},
-{
-"problemName": "33. Search in Rotated Sorted Array",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/search-in-rotated-sorted-array/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/search-in-rotated-sorted-array"
-},
-{
-"problemName": "34. Find First and Last Position of Element in Sorted Array",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/find-first-and-last-position-of-element-in-sorted-array"
-},
-{
-"problemName": "35. Search Insert Position",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/search-insert-position/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/search-insert-position"
-},
-{
-"problemName": "36. Valid Sudoku",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/valid-sudoku/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/valid-sudoku"
-},
-{
-"problemName": "37. Sudoku Solver",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/sudoku-solver/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/sudoku-solver"
-},
-{
-"problemName": "38. Count and Say",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/count-and-say/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/count-and-say"
-},
-{
-"problemName": "39. Combination Sum",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/combination-sum/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/combination-sum"
-},
-{
-"problemName": "40. Combination Sum II",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/combination-sum-ii/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/combination-sum-II"
-},
-{
-"problemName": "41. First Missing Positive",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/first-missing-positive/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/41FirstMissingPositive"
-},
-{
-"problemName": "42. Trapping Rain Water",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/trapping-rain-water/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/trapping-rain-water"
-},
-{
-"problemName": "43. Multiply Strings",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/multiply-strings/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/Multiple-Strings"
-},
-{
-"problemName": "44. Wildcard Matching",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/wildcard-matching/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/Wildcard-Matching"
-},
-{
-"problemName": "45. Jump Game II",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/jump-game-ii/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/jump-game-II"
-},
-{
-"problemName": "46. Permutations",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/permutations/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/permutations"
-},
-{
-"problemName": "47. Permutations II",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/permutations-ii/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/permutations-ll"
-},
-{
-"problemName": "48. Rotate Image",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/rotate-image/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/rotate-image"
-},
-{
-"problemName": "49. Group Anagrams",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/group-anagrams/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/group-anagrams"
-},
-{
-"problemName": "50. Pow(x, n)",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/powx-n/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/powx-n"
-},
-{
-"problemName": "51. N-Queens",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/n-queens/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/N-Queens-Puzzle"
-},
-{
-"problemName": "52. N-Queens II",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/n-queens-ii/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/n-queens-ll"
-},
-{
-"problemName": "53. Maximum Subarray",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/maximum-subarray/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/maximum-subarray"
-},
-{
-"problemName": "54. Spiral Matrix",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/spiral-matrix/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/spiral-matrix"
-},
-{
-"problemName": "55. Jump Game",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/jump-game/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/jump-game"
-},
-{
-"problemName": "56. Merge Intervals",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/merge-intervals/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/merge-intervals"
-},
-{
-"problemName": "57. Insert Interval",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/insert-interval/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/insert-interval"
-},
-{
-"problemName": "58. Length of Last Word",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/length-of-last-word/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/length-of-last-word"
-},
-{
-"problemName": "59. Spiral Matrix II",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/spiral-matrix-ii/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/spiral-matrix-II"
-},
-{
-"problemName": "60. Permutation Sequence",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/permutation-sequence/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/permutation-sequence"
-},
-{
-"problemName": "61. Rotate List",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/rotate-list/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/rotate-list"
-},
-{
-"problemName": "62. Unique Paths",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/unique-paths/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/unique-paths/"
-},
-{
-"problemName": "63. Unique Paths II",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/unique-paths-ii/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/unique-paths-II"
-},
-{
-"problemName": "64. Minimum Path Sum",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/minimum-path-sum/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/minimum-path-sum"
-},
-{
-"problemName": "65. Valid Number",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/valid-number/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/valid-number"
-},
-{
-"problemName": "66. Plus One",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/plus-one/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/plus-one"
-},
-{
-"problemName": "67. Add Binary",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/add-binary/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/add-binary"
-},
-{
-"problemName": "68. Text Justification",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/text-justification/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/text-justification"
-},
-{
-"problemName": "69. Sqrt(x)",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/sqrtx/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/sqrt-x"
-},
-{
-"problemName": "70. Climbing Stairs",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/climbing-stairs/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/climbing-stairs"
-},
-{
-"problemName": "71. Simplify Path",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/simplify-path/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/simplify-path"
-},
-{
-"problemName": "72. Edit Distance",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/edit-distance/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/edit-distance"
-},
-{
-"problemName": "73. Set Matrix Zeroes",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/set-matrix-zeroes/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/set-matrix-zeros"
-},
-{
-"problemName": "74. Search a 2D Matrix",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/search-a-2d-matrix/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/search-a-2D-matrix"
-},
-{
-"problemName": "75. Sort Colors",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/sort-colors/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/sort-colors"
-},
-{
-"problemName": "76. Minimum Window Substring",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/minimum-window-substring/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/minimum-window-substring"
-},
-{
-"problemName": "77. Combinations",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/combinations/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/combinations"
-},
-{
-"problemName": "78. Subsets",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/subsets/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/subsets"
-},
-{
-"problemName": "79. Word Search",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/word-search/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/word-search"
-},
-{
-"problemName": "80. Remove Duplicates from Sorted Array II",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/remove-duplicates-from-sorted-array-ii/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/remove-duplicates-from-sorted-array-II"
-},
-{
-"problemName": "81. Search in Rotated Sorted Array II",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/search-in-rotated-sorted-array-ii/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/search-in-rotated-sorted-array-II"
-},
-{
-"problemName": "82. Remove Duplicates from Sorted List II",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/remove-duplicates-from-sorted-list-ii/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/82-remove-duplicates-from-sorted-list-2"
-},
-{
-"problemName": "83. Remove Duplicates from Sorted List",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/remove-duplicates-from-sorted-list/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/remove-duplicates-from-sorted-list"
-},
-{
-"problemName": "84. Largest Rectangle in Histogram",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/largest-rectangle-in-histogram/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/largest-rectangle-in-histogram"
-},
-{
-"problemName": "85. Maximal Rectangle",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/maximal-rectangle/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/Maximal-Rectangle"
-},
-{
-"problemName": "86. Partition List",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/partition-list/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/partition-list"
-},
-{
-"problemName": "87. Scramble String",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/scramble-string/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/scramble-string"
-},
-{
-"problemName": "88. Merge Sorted Array",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/merge-sorted-array/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/merge-sorted-array"
-},
-{
-"problemName": "89. Gray Code",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/gray-code/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/gray-code"
-},
-{
-"problemName": "90. Subsets II",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/subsets-ii/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/subsets-ii"
-},
-{
-"problemName": "91. Decode Ways",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/decode-ways/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/decode-ways"
-},
-{
-"problemName": "92. Reverse Linked List II",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/reverse-linked-list-ii/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/reverse-linked-list-II"
-},
-{
-"problemName": "93. Restore IP Addresses",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/restore-ip-addresses/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/restore-ip-addresses"
-},
-{
-"problemName": "94. Binary Tree Inorder Traversal",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/binary-tree-inorder-traversal/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/binary-tree-inorder-traversal"
-},
-{
-"problemName": "95. Unique Binary Search Trees II",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/unique-binary-search-trees-ii/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/unique-binary-search-tree-II"
-},
-{
-"problemName": "96. Unique Binary Search Trees",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/unique-binary-search-trees/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/unique-binary-search-tree"
-},
-{
-"problemName": "97. Interleaving String",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/interleaving-string/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/Interleaving-Strings"
-},
-{
-"problemName": "98. Validate Binary Search Tree",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/validate-binary-search-tree/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/validate-binary-search-tree"
-},
-{
-"problemName": "99. Recover Binary Search Tree",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/recover-binary-search-tree/",
-"solutionLink": "/dsa-solutions/lc-solutions/0000-0099/recover-binary-search-tree"
-}
-]
-
-
-
-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 LeetCode website. You can also click on the solution link to view the solution of the problem.
\ No newline at end of file
diff --git a/dsa-problems/leetcode-problems/0100-0199.md b/dsa-problems/leetcode-problems/0100-0199.md
deleted file mode 100644
index 1e985106d..000000000
--- a/dsa-problems/leetcode-problems/0100-0199.md
+++ /dev/null
@@ -1,623 +0,0 @@
----
-id: 0100-0199
-title: LeetCode Problems 100 - 199
-sidebar_label: 0100 - 0199
-keywords:
- - LeetCode
- - LeeCode Problems
- - LeeCode Problems 100 - 199
- - dsa problems
----
-
-export const problems = [
-{
- "problemName": "100. Same Tree",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/same-tree/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/same-tree"
- },
- {
- "problemName": "101. Symmetric Tree",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/symmetric-tree/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/symmetric-tree"
- },
- {
- "problemName": "102. Binary Tree Level Order Traversal",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/binary-tree-level-order-traversal/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/binary-tree-level-order-traversal"
- },
- {
- "problemName": "103.. Binary Tree Zigzag Level Order Traversal",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/binary-tree-zigzag-level-order-traversal"
- },
- {
- "problemName": "104. Maximum Depth of Binary Tree",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/maximum-depth-of-binary-tree/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/max-depth-binary-tree"
- },
- {
- "problemName": "105. Construct Binary Tree from Preorde...",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/Construct-Binary-Tree-from-Preorder-and-Inorder-Traversal"
- },
- {
- "problemName": "106. Construct Binary Tree from Inorder",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/Construct-Binary-Tree-from-Inorder-and-postorder-Traversal"
- },
- {
- "problemName": "107. Binary Tree Level Order Traversal II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/binary-tree-level-order-traversal-ii/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/0107-Binary-Tree-Level-Order-Traversal-II"
- },
- {
- "problemName": "108. Convert Sorted Array to Binary Sear...",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/convert-sorted-array-to-binary-search-tree"
- },
- {
- "problemName": "109. Convert Sorted List to Binary Searc...",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/convert-sorted-list-to-binary-search-tree",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/convert-sorted-list-to-binary-search-tree"
- },
- {
- "problemName": "110. Balanced Binary Tree",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/balanced-binary-tree",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/balanced-binary-tree"
- },
- {
- "problemName": "111. Minimum Depth of Binary Tree",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/minimum-depth-of-binary-tree",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/minimum-depth-of-binary-tree"
- },
- {
- "problemName": "112. Path Sum",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/path-sum/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/path-sum"
- },
- {
- "problemName": "113. Path Sum II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/path-sum-ii/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/path-sum-II"
- },
- {
- "problemName": "114. Flatten Binary Tree to Linked List",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/flatten-binary-tree-to-linked-list/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/flatten-binary-tree-to-linked-list"
- },
- {
- "problemName": "115. Distinct Subsequences",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/distinct-subsequences/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/distinct-subsequence"
- },
- {
- "problemName": "116. Populating Next Right Pointers in Each Node",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/populating-next-right-pointers-in-each-node/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/116-populating-next-right-pointers-in-each-node"
- },
- {
- "problemName": "117. Populating Next Right Pointers in E...",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/populating-next-right-pointers-in-each-node-ii/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/117-populating-next-right-pointer-2"
- },
- {
- "problemName": "118. Pascal's Triangle",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/pascals-triangle",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/118-pascals-triangle"
- },
- {
- "problemName": "119. Pascal's Triangle II",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/pascals-triangle-ii/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/119-pascals-triangle-ii"
- },
- {
- "problemName":"120. Triangle",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/triangle/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/triangle"
- },
- {
- "problemName": "121. Best Time to Buy and Sell Stock",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/best-time-to-buy-and-sell-stock/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/best-time-to-buy-sell-stock"
- },
- {
- "problemName": "122. Best Time to Buy and Sell Stock II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/best-time-to-buy-sell-stock-II"
- },
- {
- "problemName": "123. Best Time to Buy and Sell Stock III",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/best-time-to-buy-sell-stock-III"
- },
- {
- "problemName": "124. Binary Tree Maximum Path Sum",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/binary-tree-maximum-path-sum/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/binary-tree-path-sum"
- },
- {
- "problemName": "125. Valid Palindrome",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/valid-palindrome/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/valid-palindrome"
- },
- {
- "problemName": "126. Word Ladder II" ,
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/word-ladder-ii/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/word-ladder-II"
- },
- {
- "problemName": "127. Word Ladder",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/word-ladder/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/word-ladder"
- },
- {
- "problemName": "128. Longest Consecutive Sequence",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/longest-consecutive-sequence/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/longest-consecutive-sequence"
- },
- {
- "problemName": "129. Sum Root to Leaf Numbers",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/sum-root-to-leaf-numbers/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/sum-root-to-leaf-numbers"
- },
- {
- "problemName": "130. Surrounded Regions",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/surrounded-regions/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/surrounded-regions"
- },
- {
- "problemName": "131. Palindrome Partitioning",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/palindrome-partitioning/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/palindrom-partitioning"
- },
- {
- "problemName": "132. Palindrome Partitioning II",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/palindrome-partitioning-ii/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/palindrom-partitioning-II"
- },
- {
- "problemName": "133. Clone Graph" ,
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/clone-graph/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/clone-graph"
- },
- {
- "problemName": "134. Gas Station",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/gas-station/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/gas-station"
- },
- {
- "problemName": "135. Candy",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/candy/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/Candy"
- },
- {
- "problemName": "136. Single Number",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/single-number/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/single-number"
- },
- {
- "problemName": "137. Single Number II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/single-number-ii/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/single-number-II"
- },
- {
- "problemName": "138. Copy List with Random Pointer",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/copy-list-with-random-pointer/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/copy-list-with-random-pointer"
- },
- {
- "problemName": "139. Word Break",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/word-break/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/word-break"
- },
- {
- "problemName": "140. Word Break II",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/word-break-ii/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/0140-word-break-ii"
- },
- {
- "problemName": "141. Linked List Cycle",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/linked-list-cycle/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/linked-list-cycle"
- },
- {
- "problemName": "142. Linked List Cycle II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/linked-list-cycle-ii/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/linked-list-cycle--II"
- },
- {
- "problemName": "143. Reorder List",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/reorder-list/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/reorder-list"
- },
- {
- "problemName": "144. Binary Tree Preorder Traversal",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/binary-tree-preorder-traversal/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/binary tree preorder traversal"
- },
- {
- "problemName": "145.Binary Tree Postorder Traversal",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/binary-tree-postorder-traversal/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/binary-tree-postorder-traversal"
- },
- {
- "problemName": "146. LRU Cache",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/lru-cache/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/lru-cache"
- },
- {
- "problemName": "147. Insertion Sort List",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/insertion-sort-list/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/insertion-sort-list"
- },
- {
- "problemName": "148. Sort List",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/sort-list/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/sort-list"
- },
- {
- "problemName": "149. Max Points on a Line",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/max-points-on-a-line/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/max-points-on-a-line.md"
- },
- {
- "problemName": "150. Evaluate Reverse Polish Notation",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/evaluate-reverse-polish-notation/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/evaluate-reverse-polish-notation"
- },
- {
- "problemName": "151. Reverse Words in a String",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/reverse-words-in-a-string/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/reverse-words-in-a-string"
- },
- {
- "problemName": "152. Maximum Product Subarray",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-product-subarray/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/maximum-product-subarray"
- },
- {
- "problemName": "153. Find Minimum in Rotated Sorted Ar...",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-minimum-in-rotated-sorted-array/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/find-minimum-in-rotated-sorted-array"
- },
- {
- "problemName": "154. Find Minimum in Rotated Sorted Ar...",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/find-minimum-in-rotated-sorted-array-ii/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/find-minimum-in-rotated-sorted-array-II"
- },
- {
- "problemName": "155. Min Stack",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/min-stack/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/min-stack"
- },
- {
- "problemName": "156. Binary Tree Upside Down",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/binary-tree-upside-down/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/binary-tree-upside-down"
- },
- {
- "problemName": "157. Read N Charcters Given",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/read-n-characters-given-read4/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/read-n-characters-given"
- },
- {
- "problemName": "158. Read N Charcters Given",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/read-n-characters-given-read4-ii-call-multiple-times",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/read-n-characters-given-read4-II"
- },
- {
- "problemName": "159. Longest Substring with At",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/longest-substring-with-at-most-two-distinct-characters/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/longest-substring-with-at"
- },
- {
- "problemName": "160. Intersection of Two Linked Lists",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/intersection-of-two-linked-lists",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/intersection-of-two-linked-list."
- },
- {
- "problemName": "161. One Edit Distance",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/one-edit-distance",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/one-edit-distance"
- },
- {
- "problemName": "162. Find Peak Element",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-peak-element/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/Find-Peak-Element"
- },
- {
- "problemName": "163. Missing Ranges Premium",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/missing-ranges",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/missing-range"
- },
- {
- "problemName": "164. Maximum Gap",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-gap",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/maximum-gap"
- },
- {
- "problemName": "165. Compare Version Numbers",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/compare-version-numbers",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/compare-version-numbers"
- },
- {
- "problemName": "166. Fraction to Recurring Decimal",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/fraction-to-recurring-decimal",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/fraction-to-recurring-decimal"
- },
- {
- "problemName": "167. Two Sum II - Input Array Is Sorted",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/two-sum-ii-input-array-is-sorted",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/two-sum-II"
- },
- {
- "problemName": "168. Excel Sheet Column Title",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/excel-sheet-column-title",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/Excel-sheet-column-title"
- },
- {
- "problemName": "169. Majority Element",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/majority-element/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/Majority-ELement"
- },
- {
- "problemName": "170. Two Sum III - Data structu... ",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/two-sum-iii-data-structure-design",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/two-sum-III-data-structure-design"
- },
- {
- "problemName": "171. Excel Sheet Column Number",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/excel-sheet-column-number",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/Excel-sheet-column-number"
- },
- {
- "problemName": "172. Factorial Trailing Zeroes",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/factorial-trailing-zeroes",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/factorial-trailing-zeroes"
- },
- {
- "problemName": "173. Binary Search Tree Iterator",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/binary-search-tree-iterator/",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/binary-search-tree-iterator"
- },
- {
- "problemName": "174. Dungeon Game",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/dungeon-game",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/dungeon-game"
- },
- {
- "problemName": "175. Combine Two Tables",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/combine-two-tables",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/combine-two-tables"
- },
- {
- "problemName": "176. Second Highest Salary",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/second-highest-salary",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/second-highest-salary"
- },
- {
- "problemName": "177. Nth Highest Salary",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/nth-highest-salary",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/nth-highest-salary"
- },
- {
- "problemName": "178. Rank Scores",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/rank-scores",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/rank-scores"
- },
- {
- "problemName": "179. Largest Number",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/largest-number",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/largest-number"
- },
- {
- "problemName": "180. Consecutive Numbbers",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/consecutive-numbers",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/consecutive-numbers"
- },
- {
- "problemName": "181. Employees Earning More Than Their Managers",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/employees-earning-more-than-their-managers",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/employee-earning"
- },
- {
- "problemName": "182. Duplicate Emails",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/duplicate-emails",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/Duplicate-Emails"
- },
- {
- "problemName": "183. Customers Who Never Order",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/customers-who-never-order",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/Customers-Who-Never-Order"
- },
- {
- "problemName": "184. Department Highest Salary",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/department-highest-salary",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/department-highest-salary"
- },
- {
- "problemName": "185. Department Top Three Salaries",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/department-top-three-salaries",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/department-top-three-salaries"
- },
- {
- "problemName": "186. Reverse Words in a String II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/reverse-words-in-a-string-ii",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/reverse-words-in-string-II"
- },
- {
- "problemName": "187. Repeated DNA Sequences",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/repeated-dna-sequences",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/repeated-dna-sequence"
-
- },
- {
- "problemName": "188. Best Time to Buy and Sell Stock IV",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iv",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/best-time-to-buy-sell-stock-IV"
- },
- {
- "problemName": "189. Rotate Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/rotate-array",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/189-rotate-array"
- },
- {
- "problemName": "190. Reverse Bits",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/reverse-bits",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/Reverse-Bits"
- },
- {
- "problemName": "191. Number of 1 Bits",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/number-of-1-bits",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/number-of-1-bits"
- },
- {
- "problemName": "192. Word Frequency",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/word-frequency",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/word-frequency"
- },
- {
- "problemName": "193. Valid Phone Numbers",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/valid-phone-numbers",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/valid-phone-numbers"
- },
- {
- "problemName": "194. Transpose File",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/transpose-file",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/transpose-file"
- },
- {
- "problemName": "195. Tenth Line",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/tenth-line",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/tenth-line"
- },
- {
- "problemName": "196. Delete Duplicate Emails",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/delete-duplicate-emails",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/delete-duplicate-emails"
- },
- {
- "problemName": "197. Rising Temperature",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/rising-temperature",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/rising-temperature"
- },
- {
- "problemName": "198. House Robber",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/house-robber",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/house-robber"
- },
- {
- "problemName": "199. Binary Tree Right Side View",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/binary-tree-right-side-view",
- "solutionLink": "/dsa-solutions/lc-solutions/0100-0199/binary-tree-right-side-view"
- },
-]
-
-
-
-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 LeetCode website. You can also click on the solution link to view the solution of the problem.
diff --git a/dsa-problems/leetcode-problems/0200-0299.md b/dsa-problems/leetcode-problems/0200-0299.md
deleted file mode 100644
index d95fc8a93..000000000
--- a/dsa-problems/leetcode-problems/0200-0299.md
+++ /dev/null
@@ -1,624 +0,0 @@
----
-id: 0200-0299
-title: LeetCode Problems 200 - 299
-sidebar_label: 0200 - 0299
-keywords:
- - LeetCode
- - LeetCode Problems
- - LeetCode Problems 200 - 299
- - DSA problems
----
-
-export const problems = [
-
-{
-"problemName": "200. Number of Islands",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/number-of-islands",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/number-of-islands"
-},
-{
-"problemName": "201. Bitwise AND of Numbers Range",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/bitwise-and-of-numbers-range",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/bitwise-and-of-numbers-range"
-},
-{
-"problemName": "202. Happy Number",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/happy-number",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/happy-number"
-},
-{
-"problemName": "203. Remove Linked List Elements",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/remove-linked-list-elements",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299//dsa-solutions/lc-solutions/0200-0299/Remove-Linked-List-Elements"
-},
-{
-"problemName": "204. Count Primes",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/count-primes",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/count-primes"
-},
-{
-"problemName": "205. Isomorphic Strings",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/isomorphic-strings",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/isomorphic-strings"
-},
-{
-"problemName": "206. Reverse Linked List",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/reverse-linked-list",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/Reverse-Linkedlist"
-},
-{
-"problemName": "207. Course Schedule",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/course-schedule",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/course-schedule"
-},
-{
-"problemName": "208. Implement Trie (Prefix Tree)",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/implement-trie-prefix-tree",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/Implement-Trie"
-},
-{
-"problemName": "209. Minimum Size Subarray Sum",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/minimum-size-subarray-sum",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/minimum-size-subarray-sum"
-},
-{
-"problemName": "210. Course Schedule II",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/course-schedule-ii",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/course-schedule-II"
-},
-{
-"problemName": "211. Design Add and Search Words Data Structure",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/design-add-and-search-words-data-structure",
-"solutionLink": "dsa-solutions/lc-solutions/0200-0299/design-add-and-search-words-data-structure"
-},
-{
-"problemName": "212. Word Search II",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/word-search-ii",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/word-search-ii"
-},
-{
-"problemName": "213. House Robber II",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/house-robber-ii",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/house-robber-II"
-},
-{
-"problemName": "214. Shortest Palindrome",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/shortest-palindrome",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/shortest-palindrome"
-},
-{
-"problemName": "215. Kth Largest Element in an Array",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/kth-largest-element-in-an-array",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/kth-largest-element-in-an-array"
-},
-{
-"problemName": "216. Combination Sum III",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/combination-sum-iii",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/combination-sum-III"
-},
-{
-"problemName": "217. Contains Duplicate",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/contains-duplicate",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/contains-duplicate"
-},
-{
-"problemName": "218. The Skyline Problem",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/the-skyline-problem",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/the-skyline-problem"
-},
-{
-"problemName": "219. Contains Duplicate II",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/contains-duplicate-ii",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/contains-duplicate-II"
-},
-{
-"problemName": "220. Contains Duplicate III",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/contains-duplicate-iii",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/contains-duplicate-III"
-},
-{
-"problemName": "221. Maximal Square",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/maximal-square",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/Maximal Square"
-},
-{
-"problemName": "222. Count Complete Tree Nodes",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/count-complete-tree-nodes",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/count-complete-tree-nodes"
-},
-{
-"problemName": "223. Rectangle Area",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/rectangle-area",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/rectangle-area"
-},
-{
-"problemName": "224. Basic Calculator",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/basic-calculator",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/0224-Basic-Calculator.md"
-},
-{
-"problemName": "225. Implement Stack using Queues",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/implement-stack-using-queues",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/0225-Implement-Stack-using-Queues.md"
-},
-{
-"problemName": "226. Invert Binary Tree",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/invert-binary-tree",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/invert-binary-search-tree"
-},
-{
-"problemName": "227. Basic Calculator II",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/basic-calculator-ii",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/0227-Basic-Calculator-II.md"
-},
-{
-"problemName": "228. Summary Ranges",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/summary-ranges",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/summary-ranges"
-},
-{
-"problemName": "229. Majority Element II",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/majority-element-ii",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/majority-element-II"
-},
-{
-"problemName": "230. Kth Smallest Element in a BST",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/kth-smallest-element-in-a-bst",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/Kth-smallest-element-in-BST"
-},
-{
-"problemName": "231. Power of Two",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/power-of-two",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/power-of-two"
-},
-{
-"problemName": "232. Implement Queue using Stacks",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/implement-queue-using-stacks",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/queue-using-stacks"
-},
-{
-"problemName": "233. Number of Digit One",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/number-of-digit-one",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/Number of Digit One"
-},
-{
-"problemName": "234. Palindrome Linked List",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/palindrome-linked-list",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/palindrome-linked-list"
-},
-{
-"problemName": "235. Lowest Common Ancestor of a Binary Search Tree",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/lowest-common-Ancestor-of-binary-search-tree"
-},
-{
-"problemName": "236. Lowest Common Ancestor of a Binary Tree",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/Lowest-Common-Ancestor-of-a-Binary-Tree"
-},
-{
-"problemName": "237. Delete Node in a Linked List",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/delete-node-in-a-linked-list",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/delete-node-in-a-linked-list"
-},
-{
-"problemName": "238. Product of Array Except Self",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/product-of-array-except-self",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/product-of-array-except-self"
-},
-{
-"problemName": "239. Sliding Window Maximum",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/sliding-window-maximum",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/sliding-window-maximum"
-},
-{
-"problemName": "240. Search a 2D Matrix II",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/search-a-2d-matrix-ii",
-"solutionLink": "#"
-},
-{
-"problemName": "241. Different Ways to Add Parentheses",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/different-ways-to-add-parentheses",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/different-ways-to-add-parentheses"
-},
-{
-"problemName": "242. Valid Anagram",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/valid-anagram",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/valid-anagram"
-},
-{
-"problemName": "243. Shortest Word Distance",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/shortest-word-distance",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/shortest-word-distance"
-},
-{
-"problemName": "244. Shortest Word Distance II",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/shortest-word-distance-ii",
-"solutionLink": "#"
-},
-{
-"problemName": "245. Shortest Word Distance III",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/shortest-word-distance-iii",
-"solutionLink": "#"
-},
-{
-"problemName": "246. Strobogrammatic Number",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/strobogrammatic-number",
-"solutionLink": "#"
-},
-{
-"problemName": "247. Strobogrammatic Number II",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/strobogrammatic-number-ii",
-"solutionLink": "#"
-},
-{
-"problemName": "248. Strobogrammatic Number III",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/strobogrammatic-number-iii",
-"solutionLink": "#"
-},
-{
-"problemName": "249. Group Shifted Strings",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/group-shifted-strings",
-"solutionLink": "#"
-},
-{
-"problemName": "250. Count Univalue Subtrees",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/count-univalue-subtrees",
-"solutionLink": "#"
-},
-{
-"problemName": "251. Flatten 2D Vector",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/flatten-2d-vector",
-"solutionLink": "#"
-},
-{
-"problemName": "252. Meeting Rooms",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/meeting-rooms",
-"solutionLink": "#"
-},
-{
-"problemName": "253. Meeting Rooms II",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/meeting-rooms-ii",
-"solutionLink": "#"
-},
-{
-"problemName": "254. Factor Combinations",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/factor-combinations",
-"solutionLink": "#"
-},
-{
-"problemName": "255. Verify Preorder Sequence in Binary Search Tree",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/verify-preorder-sequence-in-binary-search-tree",
-"solutionLink": "#"
-},
-{
-"problemName": "256. Paint House",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/paint-house",
-"solutionLink": "#"
-},
-{
-"problemName": "257. Binary Tree Paths",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/binary-tree-paths",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/Binary-Tree-Paths"
-},
-{
-"problemName": "258. Add Digits",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/add-digits",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/add-digits"
-},
-{
-"problemName": "259. 3Sum Smaller",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/3sum-smaller",
-"solutionLink": "#"
-},
-{
-"problemName": "260. Single Number III",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/single-number-iii",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/single-number-III"
-},
-{
-"problemName": "261. Graph Valid Tree",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/graph-valid-tree",
-"solutionLink": "#"
-},
-{
-"problemName": "262. Trips and Users",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/trips-and-users",
-"solutionLink": "#"
-},
-{
-"problemName": "263. Ugly Number",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/ugly-number",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/ugly-number"
-},
-{
-"problemName": "264. Ugly Number II",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/ugly-number-ii",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/ugly-number-II"
-},
-{
-"problemName": "265. Paint House II",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/paint-house-ii",
-"solutionLink": "#"
-},
-{
-"problemName": "266. Palindrome Permutation",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/palindrome-permutation",
-"solutionLink": "#"
-},
-{
-"problemName": "267. Palindrome Permutation II",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/palindrome-permutation-ii",
-"solutionLink": "#"
-},
-{
-"problemName": "268. Missing Number",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/missing-number",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/Missing-Number"
-},
-{
-"problemName": "269. Alien Dictionary",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/alien-dictionary",
-"solutionLink": "#"
-},
-{
-"problemName": "270. Closest Binary Search Tree Value",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/closest-binary-search-tree-value",
-"solutionLink": "#"
-},
-{
-"problemName": "271. Encode and Decode Strings",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/encode-and-decode-strings",
-"solutionLink": "#"
-},
-{
-"problemName": "272. Closest Binary Search Tree Value II",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/closest-binary-search-tree-value-ii",
-"solutionLink": "#"
-},
-{
-"problemName": "273. Integer to English Words",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/integer-to-english-words",
-"solutionLink": "#"
-},
-{
-"problemName": "274. H-Index",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/h-index",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/H-index"
-},
-{
-"problemName": "275. H-Index II",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/h-index-ii",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/H-Index-II"
-},
-{
-"problemName": "276. Paint Fence",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/paint-fence",
-"solutionLink": "#"
-},
-{
-"problemName": "277. Find the Celebrity",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/find-the-celebrity",
-"solutionLink": "#"
-},
-{
-"problemName": "278. First Bad Version",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/first-bad-version",
-"solutionLink": "#"
-},
-{
-"problemName": "279. Perfect Squares",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/perfect-squares",
-"solutionLink": "#"
-},
-{
-"problemName": "280. Wiggle Sort",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/wiggle-sort",
-"solutionLink": "#"
-},
-{
-"problemName": "281. Zigzag Iterator",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/zigzag-iterator",
-"solutionLink": "#"
-},
-{
-"problemName": "282. Expression Add Operators",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/expression-add-operators",
-"solutionLink": "#"
-},
-{
-"problemName": "283. Move Zeroes",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/move-zeroes",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/move-zeroes"
-},
-{
-"problemName": "284. Peeking Iterator",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/peeking-iterator",
-"solutionLink": "#"
-},
-{
-"problemName": "285. Inorder Successor in BST",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/inorder-successor-in-bst",
-"solutionLink": "#"
-},
-{
-"problemName": "286. Walls and Gates",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/walls-and-gates",
-"solutionLink": "#"
-},
-{
-"problemName": "287. Find the Duplicate Number",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/find-the-duplicate-number",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/find-the-duplicate-number"
-},
-{
-"problemName": "288. Unique Word Abbreviation",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/unique-word-abbreviation",
-"solutionLink": "#"
-},
-{
-"problemName": "289. Game of Life",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/game-of-life",
-"solutionLink": "#"
-},
-{
-"problemName": "290. Word Pattern",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/word-pattern",
-"solutionLink": "#"
-},
-{
-"problemName": "291. Word Pattern II",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/word-pattern-ii",
-"solutionLink": "#"
-},
-{
-"problemName": "292. Nim Game",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/nim-game",
-"solutionLink": "#"
-},
-{
-"problemName": "293. Flip Game",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/flip-game",
-"solutionLink": "#"
-},
-{
-"problemName": "294. Flip Game II",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/flip-game-ii",
-"solutionLink": "#"
-},
-{
-"problemName": "295. Find Median from Data Stream",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/find-median-from-data-stream",
-"solutionLink": "/dsa-solutions/lc-solutions/0200-0299/median-finder"
-},
-{
-"problemName": "296. Best Meeting Point",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/best-meeting-point",
-"solutionLink": "#"
-},
-{
-"problemName": "297. Serialize and Deserialize Binary Tree",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/serialize-and-deserialize-binary-tree",
-"solutionLink": "#"
-},
-{
-"problemName": "298. Binary Tree Longest Consecutive Sequence",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/binary-tree-longest-consecutive-sequence",
-"solutionLink": "#"
-},
-{
-"problemName": "299. Bulls and Cows",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/bulls-and-cows",
-"solutionLink": "#"
-}
-
-]
-
-
-
-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 LeetCode website. You can also click on the solution link to view the solution of the problem.
diff --git a/dsa-problems/leetcode-problems/0300-0399.md b/dsa-problems/leetcode-problems/0300-0399.md
deleted file mode 100644
index 299a24dee..000000000
--- a/dsa-problems/leetcode-problems/0300-0399.md
+++ /dev/null
@@ -1,617 +0,0 @@
----
-id: 0300-0399
-title: LeetCode Problems 300 - 399
-sidebar_label: 0300 - 0399
-keywords:
- - LeetCode
- - LeeCode Problems
- - LeeCode Problems 300 - 399
- - dsa problems
----
-
-
-export const problems = [
- {
- "problemName": "300. Longest Increasing Subsequence",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/longest-increasing-subsequence/",
- "solutionLink": "/dsa-solutions/lc-solutions/0300-0399/longest-increasing-subsequence"
- },
- {
- "problemName": "301. Remove Invalid Parentheses",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/remove-invalid-parentheses/",
- "solutionLink": "/dsa-solutions/lc-solutions/0300-0399/0301-Remove-Invalid-Parentheses"
- },
- {
- "problemName": "302. Smallest Rectangle Enclosing Black Pixels",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/smallest-rectangle-enclosing-black-pixels/",
- "solutionLink": "#"
- },
- {
- "problemName": "303. Range Sum Query - Immutable",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/range-sum-query-immutable/",
- "solutionLink": "/dsa-solutions/lc-solutions/0300-0399/range-sum-query-immutable"
- },
- {
- "problemName": "304. Range Sum Query 2D - Immutable",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/range-sum-query-2d-immutable/",
- "solutionLink": "/dsa-solutions/lc-solutions/0300-0399/range-sum-query-2d-immutable"
- },
- {
- "problemName": "305. number-of-islands-ii",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-islands-ii/",
- "solutionLink": "#"
- },
- {
- "problemName": "306. Additive Number",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/additive-number/",
- "solutionLink": "/dsa-solutions/lc-solutions/0300-0399/additive-number"
- },
- {
- "problemName": "307. Range Sum Query - Mutable",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/range-sum-query-mutable/",
- "solutionLink": "/dsa-solutions/lc-solutions/0300-0399/0307-Range-Sum-Query-Mutable"
- },
- {
- "problemName": "308. range-sum-query-2d-mutable",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/range-sum-query-2d-mutable/",
- "solutionLink": "#"
- },
- {
- "problemName": "309. Best Time to Buy and Sell Stock with Cooldown",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown/",
- "solutionLink": "/dsa-solutions/lc-solutions/0300-0399/best-time-to-buy-and-sell-stock"
- },
- {
- "problemName": "310. Minimum Height Trees",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-height-trees/",
- "solutionLink": "#"
- },
- {
- "problemName": "311. sparse-matrix-multiplication",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/sparse-matrix-multiplication/",
- "solutionLink": "#"
- },
- {
- "problemName": "312. Burst Balloons",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/burst-balloons/",
- "solutionLink": "/dsa-solutions/lc-solutions/0300-0399/burst-ballons"
- },
- {
- "problemName": "313. Super Ugly Number",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/super-ugly-number/",
- "solutionLink": "/dsa-solutions/lc-solutions/0300-0399/0313-Super-Ugly-Number"
- },
- {
- "problemName": "314. binary-tree-vertical-order-traversal",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/binary-tree-vertical-order-traversal/",
- "solutionLink": "#"
- },
- {
- "problemName": "315. Count of Smaller Numbers After Self",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-of-smaller-numbers-after-self/",
- "solutionLink": "#"
- },
- {
- "problemName": "316. Remove Duplicate Letters",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/remove-duplicate-letters/",
- "solutionLink": "#"
- },
- {
- "problemName": "317. shortest-distance-from-all-buildings",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/shortest-distance-from-all-buildings/",
- "solutionLink": "#"
- },
- {
- "problemName": "318. Maximum Product of Word Lengths",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-product-of-word-lengths/",
- "solutionLink": "#"
- },
- {
- "problemName": "319. Bulb Switcher",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/bulb-switcher/",
- "solutionLink": "/dsa-solutions/lc-solutions/0300-0399/bulb-switcher"
- },
- {
- "problemName": "320. generalized-abbreviation",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/generalized-abbreviation/",
- "solutionLink": "#"
- },
- {
- "problemName": "321. Create Maximum Number",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/create-maximum-number/",
- "solutionLink": "#"
- },
- {
- "problemName": "322. Coin Change",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/coin-change/",
- "solutionLink": "/dsa-solutions/lc-solutions/0300-0399/coin-change"
- },
- {
- "problemName": "323. number-of-connected-components-in-an-undirected-graph",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-connected-components-in-an-undirected-graph/",
- "solutionLink": "#"
- },
- {
- "problemName": "324. Wiggle Sort II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/wiggle-sort-ii/",
- "solutionLink": "/dsa-solutions/lc-solutions/0300-0399/wiggle-sort-ii"
- },
- {
- "problemName": "325. maximum-size-subarray-sum-equals-k",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-size-subarray-sum-equals-k/",
- "solutionLink": "#"
- },
- {
- "problemName": "326. Power of Three",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/power-of-three/",
- "solutionLink": "/dsa-solutions/lc-solutions/0300-0399/0326-power-of-three"
- },
- {
- "problemName": "327. Count of Range Sum",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-of-range-sum/",
- "solutionLink": "/dsa-solutions/lc-solutions/0300-0399/0327-Count-of-Range-Sum"
- },
- {
- "problemName": "328. Odd Even Linked List",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/odd-even-linked-list/",
- "solutionLink": "/dsa-solutions/lc-solutions/0300-0399/odd-even-linked-list"
- },
- {
- "problemName": "329. Longest Increasing Path in a Matrix",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/longest-increasing-path-in-a-matrix/",
- "solutionLink": "/dsa-solutions/lc-solutions/0300-0399/longest-increasing-path-in-a-matrix"
- },
- {
- "problemName": "330. Patching Array",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/patching-array/",
- "solutionLink": "/dsa-solutions/lc-solutions/0300-0399/0330-patching-array"
- },
- {
- "problemName": "331. Verify Preorder Serialization of a Binary Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/verify-preorder-serialization-of-a-binary-tree/",
- "solutionLink": "#"
- },
- {
- "problemName": "332. Reconstruct Itinerary",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/reconstruct-itinerary/",
- "solutionLink": "#"
- },
- {
- "problemName": "333. largest-bst-subtree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/largest-bst-subtree/",
- "solutionLink": "#"
- },
- {
- "problemName": "334. Increasing Triplet Subsequence",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/increasing-triplet-subsequence/",
- "solutionLink": "/dsa-solutions/lc-solutions/0300-0399/0334-increasing-triplet-subsequence"
- },
- {
- "problemName": "335. Self Crossing",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/self-crossing/",
- "solutionLink": "#"
- },
- {
- "problemName": "336. Palindrome Pairs",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/palindrome-pairs/",
- "solutionLink": "/dsa-solutions/lc-solutions/0300-0399/palindrome-pairs"
- },
- {
- "problemName": "337. House Robber III",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/house-robber-iii/",
- "solutionLink": "#"
- },
- {
- "problemName": "338. Counting Bits",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/counting-bits/",
- "solutionLink": "#"
- },
- {
- "problemName": "339. nested-list-weight-sum",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/nested-list-weight-sum/",
- "solutionLink": "#"
- },
- {
- "problemName": "340. longest-substring-with-at-most-k-distinct-characters",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/longest-substring-with-at-most-k-distinct-characters/",
- "solutionLink": "#"
- },
- {
- "problemName": "341. Flatten Nested List Iterator",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/flatten-nested-list-iterator/",
- "solutionLink": "#"
- },
- {
- "problemName": "342. Power of Four",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/power-of-four/",
- "solutionLink": "/dsa-solutions/lc-solutions/0300-0399/0342-powerof-four"
- },
- {
- "problemName": "343. Integer Break",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/integer-break/",
- "solutionLink": "#"
- },
- {
- "problemName": "344. Reverse String",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/reverse-string/",
- "solutionLink": "/dsa-solutions/lc-solutions/0300-0399/reverse-string"
- },
- {
- "problemName": "345. Reverse Vowels of a String",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/reverse-vowels-of-a-string/",
- "solutionLink": "/dsa-solutions/lc-solutions/0300-0399/0345-reverse-vowels-of-a-string"
- },
- {
- "problemName": "346. moving-average-from-data-stream",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/moving-average-from-data-stream/",
- "solutionLink": "/dsa-solutions/lc-solutions/0300-0399/0346-moving-average-from-data-stream"
- },
- {
- "problemName": "347. Top K Frequent Elements",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/top-k-frequent-elements/",
- "solutionLink": "#"
- },
- {
- "problemName": "348. design-tic-tac-toe",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/design-tic-tac-toe/",
- "solutionLink": "#"
- },
- {
- "problemName": "349. Intersection of Two Arrays",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/intersection-of-two-arrays/",
- "solutionLink": "/dsa-solutions/lc-solutions/0300-0399/0349-Intersection-of-Two-Arrays"
- },
- {
- "problemName": "350. Intersection of Two Arrays II",
- "difficulty": "Easy",
- "leetCodeLink": "350. Intersection of Two Arrays II",
- "solutionLink": "/dsa-solutions/lc-solutions/0300-0399/0350-Intersection-of-Two-Arrays-II"
- },
- {
- "problemName": "351. android-unlock-patterns",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/android-unlock-patterns/",
- "solutionLink": "#"
- },
- {
- "problemName": "352. Data Stream as Disjoint Intervals",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/data-stream-as-disjoint-intervals/",
- "solutionLink": "#"
- },
- {
- "problemName": "353. design-snake-game",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/design-snake-game/",
- "solutionLink": "#"
- },
- {
- "problemName": "354. Russian Doll Envelopes",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/russian-doll-envelopes/",
- "solutionLink": "#"
- },
- {
- "problemName": "355. Design Twitter",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/design-twitter/",
- "solutionLink": "/dsa-solutions/lc-solutions/0300-0399/twitter-design"
- },
- {
- "problemName": "356. line-reflection",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/line-reflection/",
- "solutionLink": "#"
- },
- {
- "problemName": "357. Count Numbers with Unique Digits",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-numbers-with-unique-digits/",
- "solutionLink": "#"
- },
- {
- "problemName": "358.rearrange-string-k-distance-apart",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/rearrange-string-k-distance-apart/",
- "solutionLink": "#"
- },
- {
- "problemName": "359. logger-rate-limiter",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/logger-rate-limiter/",
- "solutionLink": "#"
- },
- {
- "problemName": "360. sort-transformed-arrayt",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/sort-transformed-array/",
- "solutionLink": "#"
- },
- {
- "problemName": "361. bomb-enemy",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/bomb-enemy/",
- "solutionLink": "#"
- },
- {
- "problemName": "362. design-hit-counter",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/design-hit-counter/",
- "solutionLink": "#"
- },
- {
- "problemName": "363. Max Sum of Rectangle No Larger Than K",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/max-sum-of-rectangle-no-larger-than-k/",
- "solutionLink": "#"
- },
- {
- "problemName": "364. nested-list-weight-sum-ii",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/nested-list-weight-sum-ii/",
- "solutionLink": "#"
- },
- {
- "problemName": "365. Water and Jug Problem",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/water-and-jug-problem/",
- "solutionLink": "#"
- },
- {
- "problemName": "366. find-leaves-of-binary-tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-leaves-of-binary-tree/",
- "solutionLink": "#"
- },
- {
- "problemName": "367. Valid Perfect Square",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/valid-perfect-square/",
- "solutionLink": "#"
- },
- {
- "problemName": "368. Largest Divisible Subset",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/largest-divisible-subset/",
- "solutionLink": "/dsa-solutions/lc-solutions/0300-0399/largest-divisible-subset"
- },
- {
- "problemName": "369. plus-one-linked-list",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/plus-one-linked-list/",
- "solutionLink": "#"
- },
- {
- "problemName": "370. range-addition",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/range-addition/",
- "solutionLink": "#"
- },
- {
- "problemName": "371. Sum of Two Integers",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/sum-of-two-integers/",
- "solutionLink": "#"
- },
- {
- "problemName": "372. Super Pow",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/super-pow/",
- "solutionLink": "#"
- },
- {
- "problemName": "373. Find K Pairs with Smallest Sums",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-k-pairs-with-smallest-sums/",
- "solutionLink": "#"
- },
- {
- "problemName": "374. Guess Number Higher or Lower",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/guess-number-higher-or-lower/",
- "solutionLink": "/dsa-solutions/lc-solutions/0300-0399/guess-number-higher-or-lower"
- },
- {
- "problemName": "375. Guess Number Higher or Lower II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/guess-number-higher-or-lower-ii/",
- "solutionLink": "#"
- },
- {
- "problemName": "376. Wiggle Subsequence",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/wiggle-subsequence/",
- "solutionLink": "#"
- },
- {
- "problemName": "377. Combination Sum IV",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/combination-sum-iv/",
- "solutionLink": "#"
- },
- {
- "problemName": "378. Kth Smallest Element in a Sorted Matrix",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matrix/",
- "solutionLink": "#"
- },
- {
- "problemName": "379. design-phone-directory",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/design-phone-directory/",
- "solutionLink": "#"
- },
- {
- "problemName": "380. Insert Delete GetRandom O(1)",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/insert-delete-getrandom-o1/",
- "solutionLink": "#"
- },
- {
- "problemName": "381. Insert Delete GetRandom O(1) - Duplicates allowed",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/insert-delete-getrandom-o1-duplicates-allowed/",
- "solutionLink": "#"
- },
- {
- "problemName": "382. Linked List Random Node",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/linked-list-random-node/",
- "solutionLink": "#"
- },
- {
- "problemName": "383. Ransom Note",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/ransom-note/",
- "solutionLink": "#"
- },
- {
- "problemName": "384. Shuffle an Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/shuffle-an-array/",
- "solutionLink": "#"
- },
- {
- "problemName": "385. Mini Parser",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/mini-parser/",
- "solutionLink": "#"
- },
- {
- "problemName": "386. Lexicographical Numbers",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/lexicographical-numbers/",
- "solutionLink": "#"
- },
- {
- "problemName": "387. First Unique Character in a String",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/first-unique-character-in-a-string/",
- "solutionLink": "#"
- },
- {
- "problemName": "388. Longest Absolute File Path",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/longest-absolute-file-path/",
- "solutionLink": "#"
- },
- {
- "problemName": "389. Find the Difference",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-the-difference/",
- "solutionLink": "#"
- },
- {
- "problemName": "390. Elimination Game",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/elimination-game/",
- "solutionLink": "#"
- },
- {
- "problemName": "391. Perfect Rectangle",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/perfect-rectangle/",
- "solutionLink": "#"
- },
- {
- "problemName": "392. Is Subsequence",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/is-subsequence/",
- "solutionLink": "#"
- },
- {
- "problemName": "393. UTF-8 Validation",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/utf-8-validation/",
- "solutionLink": "#"
- },
- {
- "problemName": "394. Decode String",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/decode-string/",
- "solutionLink": "#"
- },
- {
- "problemName": "395. Longest Substring with At Least K Repeating Characters",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/longest-substring-with-at-least-k-repeating-characters/",
- "solutionLink": "#"
- },
- {
- "problemName": "396. Rotate Function",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/rotate-function/",
- "solutionLink": "#"
- },
- {
- "problemName": "397. Integer Replacement",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/integer-replacement/",
- "solutionLink": "#"
- },
- {
- "problemName": "399. Random Pick Index",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/random-pick-index/",
- "solutionLink": "#"
- }
-]
-
-
-
-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 LeetCode website. You can also click on the solution link to view the solution of the problem.
diff --git a/dsa-problems/leetcode-problems/0400-0499.md b/dsa-problems/leetcode-problems/0400-0499.md
deleted file mode 100644
index 43555dd0f..000000000
--- a/dsa-problems/leetcode-problems/0400-0499.md
+++ /dev/null
@@ -1,622 +0,0 @@
----
-id: 0400-0499
-title: LeetCode Problems 400 - 499
-sidebar_label: 0400 - 0499
-keywords:
- - LeetCode
- - LeeCode Problems
- - LeeCode Problems 400 - 499
- - dsa problems
----
-
-export const problems = [
- {
- "problemName": "400. Nth Digit",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/nth-digit",
- "solutionLink": "/dsa-solutions/lc-solutions/0400-0499/nth-digit"
- },
- {
- "problemName": "401. Binary Watch",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/binary-watch",
- "solutionLink": "/dsa-solutions/lc-solutions/0400-0499/binary-watch"
- },
- {
- "problemName": "402. Remove K Digits",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/remove-k-digits",
- "solutionLink": "/dsa-solutions/lc-solutions/0400-0499/remove-k-digits"
- },
- {
- "problemName": "403. Frog Jump",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/frog-jump",
- "solutionLink": "#"
- },
- {
- "problemName": "404. Sum of Left Leaves",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/sum-of-left-leaves",
- "solutionLink": "/dsa-solutions/lc-solutions/0400-0499/sum-of-left-leaves"
- },
- {
- "problemName": "405. Convert a Number to Hexadecimal",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/convert-a-number-to-hexadecimal",
- "solutionLink": "#"
- },
- {
- "problemName": "406. Queue Reconstruction by Height",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/queue-reconstruction-by-height",
- "solutionLink": "#"
- },
- {
- "problemName": "407. Trapping Rain Water II",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/trapping-rain-water-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "408. Valid Word Abbreviation",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/valid-word-abbreviation",
- "solutionLink": "#"
- },
- {
- "problemName": "409. Longest Palindrome",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/longest-palindrome",
- "solutionLink": "#"
- },
- {
- "problemName": "410. Split Array Largest Sum",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/split-array-largest-sum",
- "solutionLink": "/dsa-solutions/lc-solutions/0400-0499/split-array-largest-sum"
- },
- {
- "problemName": "411. Minimum Unique Word Abbreviation",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-unique-word-abbreviation",
- "solutionLink": "#"
- },
- {
- "problemName": "412. Fizz Buzz",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/fizz-buzz",
- "solutionLink": "#"
- },
- {
- "problemName": "413. Arithmetic Slices",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/arithmetic-slices",
- "solutionLink": "/dsa-solutions/lc-solutions/0400-0499/arithmetic-slices"
- },
- {
- "problemName": "414. Third Maximum Number",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/third-maximum-number",
- "solutionLink": "/dsa-solutions/lc-solutions/0400-0499/third-maximum-number"
- },
- {
- "problemName": "415. Add Strings",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/add-strings",
- "solutionLink": "#"
- },
- {
- "problemName": "416. Partition Equal Subset Sum",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/partition-equal-subset-sum",
- "solutionLink": "/dsa-solutions/lc-solutions/0400-0499/"
- },
- {
- "problemName": "417. Pacific Atlantic Water Flow",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/pacific-atlantic-water-flow",
- "solutionLink": "#"
- },
- {
- "problemName": "418. Sentence Screen Fitting",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/sentence-screen-fitting",
- "solutionLink": "#"
- },
- {
- "problemName": "419. Battleships in a Board",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/battleships-in-a-board",
- "solutionLink": "/dsa-solutions/lc-solutions/0400-0499/"
- },
- {
- "problemName": "420. Strong Password Checker",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/strong-password-checker",
- "solutionLink": "/dsa-solutions/lc-solutions/0400-0499/strong-password-checker"
- },
- {
- "problemName": "421. Maximum XOR of Two Numbers in an Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-xor-of-two-numbers-in-an-array",
- "solutionLink": "/dsa-solutions/lc-solutions/0400-0499/"
- },
- {
- "problemName": "422. Valid Word Square",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/valid-word-square",
- "solutionLink": "#"
- },
- {
- "problemName": "423. Reconstruct Original Digits from English",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/reconstruct-original-digits-from-english",
- "solutionLink": "#"
- },
- {
- "problemName": "424. Longest Repeating Character Replacement",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/longest-repeating-character-replacement",
- "solutionLink": "#"
- },
- {
- "problemName": "425. Word Squares",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/word-squares",
- "solutionLink": "#"
- },
- {
- "problemName": "426. Convert Binary Search Tree to Sorted Doubly Linked List",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/convert-binary-search-tree-to-sorted-doubly-linked-list",
- "solutionLink": "#"
- },
- {
- "problemName": "427. Construct Quad Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/construct-quad-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "428. Serialize and Deserialize N-ary Tree",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/serialize-and-deserialize-n-ary-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "429. N-ary Tree Level Order Traversal",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/n-ary-tree-level-order-traversal",
- "solutionLink": "#"
- },
- {
- "problemName": "430. Flatten a Multilevel Doubly Linked List",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/flatten-a-multilevel-doubly-linked-list",
- "solutionLink": "/dsa-solutions/lc-solutions/0400-0499/flatten-a-multilevel-doubly-linked-list"
- },
- {
- "problemName": "431. Encode N-ary Tree to Binary Tree",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/encode-n-ary-tree-to-binary-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "432. All Oone Data Structure",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/all-oone-data-structure",
- "solutionLink": "#"
- },
- {
- "problemName": "433. Minimum Genetic Mutation",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-genetic-mutation",
- "solutionLink": "#"
- },
- {
- "problemName": "434. Number of Segments in a String",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/number-of-segments-in-a-string",
- "solutionLink": "#"
- },
- {
- "problemName": "435. Non-overlapping Intervals",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/non-overlapping-intervals",
- "solutionLink": "#"
- },
- {
- "problemName": "436. Find Right Interval",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-right-interval",
- "solutionLink": "/dsa-solutions/lc-solutions/0400-0499/find-right-interval"
- },
- {
- "problemName": "437. Path Sum III",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/path-sum-iii",
- "solutionLink": "/dsa-solutions/lc-solutions/0400-0499/path-sum-iii"
- },
- {
- "problemName": "438. Find All Anagrams in a String",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-all-anagrams-in-a-string",
- "solutionLink": "#"
- },
- {
- "problemName": "439. Ternary Expression Parser",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/ternary-expression-parser",
- "solutionLink": "#"
- },
- {
- "problemName": "440. K-th Smallest in Lexicographical Order",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/k-th-smallest-in-lexicographical-order",
- "solutionLink": "#"
- },
- {
- "problemName": "441. Arranging Coins",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/arranging-coins",
- "solutionLink": "#"
- },
- {
- "problemName": "442. Find All Duplicates in an Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-all-duplicates-in-an-array",
- "solutionLink": "/dsa-solutions/lc-solutions/0400-0499/find-all-duplicates-in-an-array"
- },
- {
- "problemName": "443. String Compression",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/string-compression",
- "solutionLink": "/dsa-solutions/lc-solutions/0400-0499/string-compression"
- },
- {
- "problemName": "444. Sequence Reconstruction",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/sequence-reconstruction",
- "solutionLink": "#"
- },
- {
- "problemName": "445. Add Two Numbers II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/add-two-numbers-ii",
- "solutionLink": "/dsa-solutions/lc-solutions/0400-0499/add-two-numbers-ii"
- },
- {
- "problemName": "446. Arithmetic Slices II - Subsequence",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/arithmetic-slices-ii-subsequence",
- "solutionLink": "#"
- },
- {
- "problemName": "447. Number of Boomerangs",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-boomerangs",
- "solutionLink": "#"
- },
- {
- "problemName": "448. Find All Numbers Disappeared in an Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array",
- "solutionLink": "#"
- },
- {
- "problemName": "449. Serialize and Deserialize BST",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/serialize-and-deserialize-bst",
- "solutionLink": "#"
- },
- {
- "problemName": "450. Delete Node in a BST",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/delete-node-in-a-bst",
- "solutionLink": "#"
- },
- {
- "problemName": "451. Sort Characters By Frequency",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/sort-characters-by-frequency",
- "solutionLink": "/dsa-solutions/lc-solutions/0400-0499/sort-characters-by-frequency"
- },
- {
- "problemName": "452. Minimum Number of Arrows to Burst Balloons",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-number-of-arrows-to-burst-balloons",
- "solutionLink": "#"
- },
- {
- "problemName": "453. Minimum Moves to Equal Array Elements",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/minimum-moves-to-equal-array-elements",
- "solutionLink": "#"
- },
- {
- "problemName": "454. 4Sum II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/4sum-ii",
- "solutionLink": "/dsa-solutions/lc-solutions/0400-0499/4Sum-II"
- },
- {
- "problemName": "455. Assign Cookies",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/assign-cookies",
- "solutionLink": "/dsa-solutions/lc-solutions/0400-0499/assign-cookies"
- },
- {
- "problemName": "456. 132 Pattern",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/132-pattern",
- "solutionLink": "#"
- },
- {
- "problemName": "457. Circular Array Loop",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/circular-array-loop",
- "solutionLink": "#"
- },
- {
- "problemName": "458. Poor Pigs",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/poor-pigs",
- "solutionLink": "#"
- },
- {
- "problemName": "459. Repeated Substring Pattern",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/repeated-substring-pattern",
- "solutionLink": "#"
- },
- {
- "problemName": "460. LFU Cache",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/lfu-cache",
- "solutionLink": "/dsa-solutions/lc-solutions/0400-0499/lfu-cache"
- },
- {
- "problemName": "461. Hamming Distance",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/hamming-distance",
- "solutionLink": "#"
- },
- {
- "problemName": "462. Minimum Moves to Equal Array Elements II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-moves-to-equal-array-elements-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "463. Island Perimeter",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/island-perimeter",
- "solutionLink": "/dsa-solutions/lc-solutions/0400-0499/island-perimeter"
- },
- {
- "problemName": "464. Can I Win",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/can-i-win",
- "solutionLink": "#"
- },
- {
- "problemName": "465. Optimal Account Balancing",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/optimal-account-balancing",
- "solutionLink": "#"
- },
- {
- "problemName": "466. Count The Repetitions",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-the-repetitions",
- "solutionLink": "#"
- },
- {
- "problemName": "467. Unique Substrings in Wraparound String",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/unique-substrings-in-wraparound-string",
- "solutionLink": "#"
- },
- {
- "problemName": "468. Validate IP Address",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/validate-ip-address",
- "solutionLink": "#"
- },
- {
- "problemName": "469. Convex Polygon",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/convex-polygon",
- "solutionLink": "#"
- },
- {
- "problemName": "470. Implement Rand10() Using Rand7()",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/implement-rand10-using-rand7",
- "solutionLink": "#"
- },
- {
- "problemName": "471. Encode String with Shortest Length",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/encode-string-with-shortest-length",
- "solutionLink": "#"
- },
- {
- "problemName": "472. Concatenated Words",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/concatenated-words",
- "solutionLink": "/dsa-solutions/lc-solutions/0400-0499/concatenated-words"
- },
- {
- "problemName": "473. Matchsticks to Square",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/matchsticks-to-square",
- "solutionLink": "/dsa-solutions/lc-solutions/0400-0499/matchsticks-to-square"
- },
- {
- "problemName": "474. Ones and Zeroes",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/ones-and-zeroes",
- "solutionLink": "#"
- },
- {
- "problemName": "475. Heaters",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/heaters",
- "solutionLink": "/dsa-solutions/lc-solutions/0400-0499/heaters"
- },
- {
- "problemName": "476. Number Complement",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/number-complement",
- "solutionLink": "/dsa-solutions/lc-solutions/0400-0499/number-complement"
- },
- {
- "problemName": "477. Total Hamming Distance",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/total-hamming-distance",
- "solutionLink": "#"
- },
- {
- "problemName": "478. Generate Random Point in a Circle",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/generate-random-point-in-a-circle",
- "solutionLink": "#"
- },
- {
- "problemName": "479. Largest Palindrome Product",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/largest-palindrome-product",
- "solutionLink": "#"
- },
- {
- "problemName": "480. Sliding Window Median",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/sliding-window-median",
- "solutionLink": "#"
- },
- {
- "problemName": "481. Magical String",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/magical-string",
- "solutionLink": "#"
- },
- {
- "problemName": "482. License Key Formatting",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/license-key-formatting",
- "solutionLink": "#"
- },
- {
- "problemName": "483. Smallest Good Base",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/smallest-good-base",
- "solutionLink": "#"
- },
- {
- "problemName": "484. Find Permutation",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-permutation",
- "solutionLink": "#"
- },
- {
- "problemName": "485. Max Consecutive Ones",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/max-consecutive-ones",
- "solutionLink": "#"
- },
- {
- "problemName": "486. Predict the Winner",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/predict-the-winner",
- "solutionLink": "#"
- },
- {
- "problemName": "487. Max Consecutive Ones II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/max-consecutive-ones-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "488. Zuma Game",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/zuma-game",
- "solutionLink": "#"
- },
- {
- "problemName": "489. Robot Room Cleaner",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/robot-room-cleaner",
- "solutionLink": "#"
- },
- {
- "problemName": "490. The Maze",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/the-maze",
- "solutionLink": "#"
- },
- {
- "problemName": "491. Increasing Subsequences",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/increasing-subsequences",
- "solutionLink": "#"
- },
- {
- "problemName": "492. Construct the Rectangle",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/construct-the-rectangle",
- "solutionLink": "#"
- },
- {
- "problemName": "493. Reverse Pairs",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/reverse-pairs",
- "solutionLink": "#"
- },
- {
- "problemName": "494. Target Sum",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/target-sum",
- "solutionLink": "/dsa-solutions/lc-solutions/0400-0499/target-sum"
- },
- {
- "problemName": "495. Teemo Attacking",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/teemo-attacking",
- "solutionLink": "/dsa-solutions/lc-solutions/0400-0499/teemo-attacking"
- },
- {
- "problemName": "496. Next Greater Element I",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/next-greater-element-i",
- "solutionLink": "/dsa-solutions/lc-solutions/0400-0499/next-greater-element-I"
- },
- {
- "problemName": "497. Random Point in Non-overlapping Rectangles",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/random-point-in-non-overlapping-rectangles",
- "solutionLink": "#"
- },
- {
- "problemName": "498. Diagonal Traverse",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/diagonal-traverse",
- "solutionLink": "/dsa-solutions/lc-solutions/0400-0499/diagonal-traverse"
- },
- {
- "problemName": "499. The Maze III",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/the-maze-iii",
- "solutionLink": "#"
- }
-];
-
-
-
-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 LeetCode website. You can also click on the solution link to view the solution of the problem.
diff --git a/dsa-problems/leetcode-problems/0500-0599.md b/dsa-problems/leetcode-problems/0500-0599.md
deleted file mode 100644
index 65b2b6c77..000000000
--- a/dsa-problems/leetcode-problems/0500-0599.md
+++ /dev/null
@@ -1,520 +0,0 @@
----
-id: 0500-0599
-title: LeetCode Problems 500 - 599
-sidebar_label: 0500 - 0599
-keywords:
- - LeetCode
- - LeetCode Problems
- - LeetCode Problems 500 - 599
- - DSA problems
----
-
-export const problems =[
- {
- "problemName": "500. Keyboard Row",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/keyboard-row",
- "solutionLink": "#"
- },
- {
- "problemName": "501. Find Mode in Binary Search Tree",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-mode-in-binary-search-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "502. IPO",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/ipo",
- "solutionLink": "#"
- },
- {
- "problemName": "503. Next Greater Element II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/next-greater-element-ii",
- "solutionLink": "/dsa-solutions/lc-solutions/0500-0599/next-greater-element-ii"
- },
- {
- "problemName": "504. Base 7",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/base-7",
- "solutionLink": "#"
- },
- {
- "problemName": "505. The Maze II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/the-maze-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "506. Relative Ranks",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/relative-ranks",
- "solutionLink": "#"
- },
- {
- "problemName": "507. Perfect Number",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/perfect-number",
- "solutionLink": "#"
- },
- {
- "problemName": "508. Most Frequent Subtree Sum",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/most-frequent-subtree-sum",
- "solutionLink": "/dsa-solutions/lc-solutions/0500-0599/most-frequent-subtree-sum"
- },
- {
- "problemName": "509. Fibonacci Number",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/fibonacci-number",
- "solutionLink": "#"
- },
- {
- "problemName": "510. Inorder Successor in BST II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/inorder-successor-in-bst-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "513. Find Bottom Left Tree Value",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-bottom-left-tree-value",
- "solutionLink": "/dsa-solutions/lc-solutions/0500-0599/find-bottom-left-tree-value"
- },
- {
- "problemName": "514. Freedom Trail",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/freedom-trail",
- "solutionLink": "#"
- },
- {
- "problemName": "515. Find Largest Value in Each Tree Row",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-largest-value-in-each-tree-row",
- "solutionLink": "/dsa-solutions/lc-solutions/0500-0599/find-largest-value-in-each-tree-row"
- },
- {
- "problemName": "516. Longest Palindromic Subsequence",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/longest-palindromic-subsequence",
- "solutionLink": "/dsa-solutions/lc-solutions/0500-0599/longest-palindromic-subsequence"
- },
- {
- "problemName": "517. Super Washing Machines",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/super-washing-machines",
- "solutionLink": "#"
- },
- {
- "problemName": "518. Coin Change 2",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/coin-change-2",
- "solutionLink": "/dsa-solutions/lc-solutions/0500-0599/coin-change-2"
- },
- {
- "problemName": "519. Random Flip Matrix",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/random-flip-matrix",
- "solutionLink": "#"
- },
- {
- "problemName": "520. Detect Capital",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/detect-capital",
- "solutionLink": "#"
- },
- {
- "problemName": "521. Longest Uncommon Subsequence I",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/longest-uncommon-subsequence-i",
- "solutionLink": "#"
- },
- {
- "problemName": "522. Longest Uncommon Subsequence II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/longest-uncommon-subsequence-ii",
- "solutionLink": "/dsa-solutions/lc-solutions/0500-0599/longest-uncommon-subsequence-ii"
- },
- {
- "problemName": "523. Continuous Subarray Sum",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/continuous-subarray-sum",
- "solutionLink": "/dsa-solutions/lc-solutions/0500-0599/continuous-subarray-sum"
- },
- {
- "problemName": "524. Longest Word in Dictionary through Deleting",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/longest-word-in-dictionary-through-deleting",
- "solutionLink": "#"
- },
- {
- "problemName": "525. Contiguous Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/contiguous-array",
- "solutionLink": "/dsa-solutions/lc-solutions/0500-0599/contiguous-array"
- },
- {
- "problemName": "526. Beautiful Arrangement",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/beautiful-arrangement",
- "solutionLink": "/dsa-solutions/lc-solutions/0500-0599/0526-Beautiful-Arrangement"
- },
- {
- "problemName": "527. Word Abbreviation",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/word-abbreviation",
- "solutionLink": "/dsa-solutions/lc-solutions/0500-0599/0527-Word-Abbreviation"
- },
- {
- "problemName": "528. Random Pick with Weight",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/random-pick-with-weight",
- "solutionLink": "/dsa-solutions/lc-solutions/0500-0599/random-pick-with-weight"
- },
- {
- "problemName": "529. Minesweeper",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minesweeper",
- "solutionLink": "#"
- },
- {
- "problemName": "530. Minimum Absolute Difference in BST",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/minimum-absolute-difference-in-bst",
- "solutionLink": "#"
- },
- {
- "problemName": "531. Lonely Pixel I",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/lonely-pixel-i",
- "solutionLink": "#"
- },
- {
- "problemName": "532. K-diff Pairs in an Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/k-diff-pairs-in-an-array",
- "solutionLink": "#"
- },
- {
- "problemName": "533. Lonely Pixel II",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/lonely-pixel-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "535. Encode and Decode TinyURL",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/encode-and-decode-tinyurl",
- "solutionLink": "#"
- },
- {
- "problemName": "536. Construct Binary Tree from String",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/construct-binary-tree-from-string",
- "solutionLink": "#"
- },
- {
- "problemName": "537. Complex Number Multiplication",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/complex-number-multiplication",
- "solutionLink": "/dsa-solutions/lc-solutions/0500-0599/complex-number-multiplication"
- },
- {
- "problemName": "538. Convert BST to Greater Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/convert-bst-to-greater-tree",
- "solutionLink": "/dsa-solutions/lc-solutions/0500-0599/convert-bst-to-greater-tree"
- },
- {
- "problemName": "539. Minimum Time Difference",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-time-difference",
- "solutionLink": "#"
- },
- {
- "problemName": "540. Single Element in a Sorted Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/single-element-in-a-sorted-array",
- "solutionLink": "#"
- },
- {
- "problemName": "541. Reverse String II",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/reverse-string-ii",
- "solutionLink": "/dsa-solutions/lc-solutions/0500-0599/reverse-string-ii"
- },
- {
- "problemName": "542. 01 Matrix",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/01-matrix",
- "solutionLink": "/dsa-solutions/lc-solutions/0500-0599/matrix"
- },
- {
- "problemName": "543. Diameter of Binary Tree",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/diameter-of-binary-tree",
- "solutionLink": "/dsa-solutions/lc-solutions/0500-0599/diameter-of-a-binary-tree"
- },
- {
- "problemName": "544. Output Contest Matches",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/output-contest-matches",
- "solutionLink": "#"
- },
- {
- "problemName": "545. Boundary of Binary Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/boundary-of-binary-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "546. Remove Boxes",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/remove-boxes",
- "solutionLink": "#"
- },
- {
- "problemName": "547. Number of Provinces",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-provinces/",
- "solutionLink": "/dsa-solutions/lc-solutions/0500-0599/number-of-provinces"
- },
- {
- "problemName": "548. Split Array with Equal Sum",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/split-array-with-equal-sum",
- "solutionLink": "#"
- },
- {
- "problemName": "549. Binary Tree Longest Consecutive Sequence II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/binary-tree-longest-consecutive-sequence-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "550. Game Play Analysis IV",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/game-play-analysis-iv",
- "solutionLink": "#"
- },
- {
- "problemName": "551. Student Attendance Record I",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/student-attendance-record-i",
- "solutionLink": "#"
- },
- {
- "problemName": "552. Student Attendance Record II",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/student-attendance-record-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "553. Optimal Division",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/optimal-division",
- "solutionLink": "/dsa-solutions/lc-solutions/0500-0599/optimal-division"
- },
- {
- "problemName": "554. Brick Wall",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/brick-wall",
- "solutionLink": "#"
- },
- {
- "problemName": "555. Split Concatenated Strings",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/split-concatenated-strings",
- "solutionLink": "#"
- },
- {
- "problemName": "556. Next Greater Element III",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/next-greater-element-iii",
- "solutionLink": "#"
- },
- {
- "problemName": "557. Reverse Words in a String III",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/reverse-words-in-a-string-iii",
- "solutionLink": "/dsa-solutions/lc-solutions/0500-0599/reverse-words-in-a-string-iii"
- },
- {
- "problemName": "558. Quad Tree Intersection",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/quad-tree-intersection",
- "solutionLink": "#"
- },
- {
- "problemName": "559. Maximum Depth of N-ary Tree",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/maximum-depth-of-n-ary-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "560. Subarray Sum Equals K",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/subarray-sum-equals-k",
- "solutionLink": "#"
- },
- {
- "problemName": "561. Array Partition I",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/array-partition-i",
- "solutionLink": "#"
- },
- {
- "problemName": "562. Longest Line of Consecutive One in Matrix",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/longest-line-of-consecutive-one-in-matrix",
- "solutionLink": "#"
- },
- {
- "problemName": "563. Binary Tree Tilt",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/binary-tree-tilt",
- "solutionLink": "/dsa-solutions/lc-solutions/0500-0599/binary-tree-tilt"
- },
- {
- "problemName": "564. Find the Closest Palindrome",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/find-the-closest-palindrome",
- "solutionLink": "/dsa-solutions/lc-solutions/0500-0599/find-the-closest-palindrome"
- },
- {
- "problemName": "565. Array Nesting",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/array-nesting",
- "solutionLink": "/dsa-solutions/lc-solutions/0500-0599/array-nesting"
- },
- {
- "problemName": "566. Reshape the Matrix",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/reshape-the-matrix",
- "solutionLink": "#"
- },
- {
- "problemName": "567. Permutation in String",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/permutation-in-string",
- "solutionLink": "/dsa-solutions/lc-solutions/0500-0599/permutation-in-string"
- },
- {
- "problemName": "568. Maximum Vacation Days",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-vacation-days",
- "solutionLink": "#"
- },
- {
- "problemName": "572. Subtree of Another Tree",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/subtree-of-another-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "573. Squirrel Simulation",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/squirrel-simulation",
- "solutionLink": "#"
- },
- {
- "problemName": "575. Distribute Candies",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/distribute-candies",
- "solutionLink": "#"
- },
- {
- "problemName": "576. Out of Boundary Paths",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/out-of-boundary-paths",
- "solutionLink": "/dsa-solutions/lc-solutions/0500-0599/out-of-boundary-paths"
- },
- {
- "problemName": "581. Shortest Unsorted Continuous Subarray",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/shortest-unsorted-continuous-subarray",
- "solutionLink": "#"
- },
- {
- "problemName": "582. Kill Process",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/kill-process",
- "solutionLink": "#"
- },
- {
- "problemName": "583. Delete Operation for Two Strings",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/delete-operation-for-two-strings",
- "solutionLink": "#"
- },
- {
- "problemName": "587. Erect the Fence",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/erect-the-fence",
- "solutionLink": "#"
- },
- {
- "problemName": "588. Design In-Memory File System",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/design-in-memory-file-system",
- "solutionLink": "#"
- },
- {
- "problemName": "589. N-ary Tree Preorder Traversal",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/n-ary-tree-preorder-traversal",
- "solutionLink": "#"
- },
- {
- "problemName": "590. N-ary Tree Postorder Traversal",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/n-ary-tree-postorder-traversal",
- "solutionLink": "#"
- },
- {
- "problemName": "591. Tag Validator",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/tag-validator",
- "solutionLink": "/dsa-solutions/lc-solutions/0500-0599/tag-validator"
- },
- {
- "problemName": "592. Fraction Addition and Subtraction",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/fraction-addition-and-subtraction",
- "solutionLink": "/dsa-solutions/lc-solutions/0500-0599/fraction-addition-and-subtraction"
- },
- {
- "problemName": "593. Valid Square",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/valid-square",
- "solutionLink": "/dsa-solutions/lc-solutions/0500-0599/valid-square"
- },
- {
- "problemName": "594. Longest Harmonious Subsequence",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/longest-harmonious-subsequence",
- "solutionLink": "#"
- },
- {
- "problemName": "598. Range Addition II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/range-addition-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "599. Minimum Index Sum of Two Lists",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/minimum-index-sum-of-two-lists",
- "solutionLink": "/dsa-solutions/lc-solutions/0500-0599/minimum-index-sum-of-two-lists"
- }
-]
-
-
-
-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 LeetCode website. You can also click on the solution link to view the solution of the problem.
diff --git a/dsa-problems/leetcode-problems/0600-0699.md b/dsa-problems/leetcode-problems/0600-0699.md
deleted file mode 100644
index 88c3c2a59..000000000
--- a/dsa-problems/leetcode-problems/0600-0699.md
+++ /dev/null
@@ -1,623 +0,0 @@
----
-id: 0600-0699
-title: LeetCode Problems 600 - 699
-sidebar_label: 0600 - 0699
-keywords:
- - LeetCode
- - LeetCode Problems
- - LeetCode Problems 600 - 699
- - DSA problems
----
-
-export const problems = [
-{
- "problemName": "600. Non-negative Integers without Consecutive Ones",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/non-negative-integers-without-consecutive-ones",
- "solutionLink": "/dsa-solutions/lc-solutions/0600-0699/non-negative-integers-without-consecutive-ones"
-},
-{
- "problemName": "601. Human Traffic of Stadium",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/human-traffic-of-stadium",
- "solutionLink": "/dsa-solutions/lc-solutions/0600-0699/human-traffic-of-stadium"
-},
-{
- "problemName": "602. Friend Requests II: Whow has the Most Friends",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/friend-requests-ii-who-has-the-most-friends",
- "solutionLink": "/dsa-solutions/lc-solutions/0600-0699/friend-requests-ii-who-has-the-most-friends"
-},
-{
- "problemName": "603. Consecutive Available Seats",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/consecutive-available-seats",
- "solutionLink": "#"
-},
-{
- "problemName": "604. Design Compressed String Iterator",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/design-compressed-string-iterator",
- "solutionLink": "#"
-},
-{
- "problemName": "605. Can Place Flowers",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/can-place-flowers",
- "solutionLink": "/dsa-solutions/lc-solutions/0600-0699/can-place-flowers"
-},
-{
- "problemName": "606. Construct String from Binary Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/construct-string-from-binary-tree",
- "solutionLink": "/dsa-solutions/lc-solutions/0600-0699/construct-string-from-binary-tree"
-},
-{
- "problemName": "607. Sales Person",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/sales-person",
- "solutionLink": "#"
-},
-{
- "problemName": "608. Tree Node",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/tree-node",
- "solutionLink": "/dsa-solutions/lc-solutions/0600-0699/tree-node"
-},
-{
- "problemName": "609. Find Duplicate File in System",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-duplicate-file-in-system",
- "solutionLink": "/dsa-solutions/lc-solutions/0600-0699/find-duplicate-file-in-system"
-},
-{
- "problemName": "610. Triangle Judgement",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/triangle-judgement",
- "solutionLink": "#"
-},
-{
- "problemName": "611. Valid Triangle Number",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/valid-triangle-number",
- "solutionLink": "/dsa-solutions/lc-solutions/0600-0699/valid-triangle-number"
-},
-{
- "problemName": "612. Shortest Distance in a Plane",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/shortest-distance-in-a-plane",
- "solutionLink": "#"
-},
-{
- "problemName": "613. Shortest Distance in a Line",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/shortest-distance-in-a-line",
- "solutionLink": "#"
-},
-{
- "problemName": "614. Second Degree Follower",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/second-degree-follower",
- "solutionLink": "#"
-},
-{
- "problemName": "615. Average Salary: Departments VS Company"
-,
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/average-salary-departments-vs-company",
- "solutionLink": "#"
-},
-{
- "problemName": "616. Add Bold Tag in String",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/add-bold-tag-in-string",
- "solutionLink": "#"
-},
- {
- "problemName": "617. Merge Two Binary Trees",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/merge-two-binary-trees",
- "solutionLink": "/dsa-solutions/lc-solutions/0600-0699/merge-two-binary-trees"
- },
-{
- "problemName": "618. Students Report By Geography",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/students-report-by-geography",
- "solutionLink": "#"
- },
- {
- "problemName": "619. Biggest Single Number",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/biggest-single-number",
- "solutionLink": "#"
- },
- {
- "problemName": "620. Not Boring Movies",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/not-boring-movies",
- "solutionLink": "#"
- },
- {
- "problemName": "621. Task Scheduler",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/task-scheduler",
- "solutionLink": "/dsa-solutions/lc-solutions/0600-0699/task-scheduler"
- },
- {
- "problemName": "622. Design Circular Queue",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/design-circular-queue",
- "solutionLink": "#"
- },
- {
- "problemName": "623. Add One Row to Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/add-one-row-to-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "624. Maximum Distance in Arrays",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/maximum-distance-in-arrays",
- "solutionLink": "#"
- },
- {
- "problemName": "625. Minimum Factorization",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-factorization",
- "solutionLink": "#"
- },
- {
- "problemName": "626. Exchange Seats",
- "difficulty": "Meidum",
- "leetCodeLink": "https://leetcode.com/problems/exchange-seats",
- "solutionLink": "#"
- },
- {
- "problemName": "627. Swap Salary",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/swap-salary",
- "solutionLink": "#"
- },
- {
- "problemName": "628. Maximum Product of Three Numbers",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/maximum-product-of-three-numbers",
- "solutionLink": "/dsa-solutions/lc-solutions/0600-0699/maximum-product-of-three-numbers"
- },
- {
- "problemName": "629. K Inverse Pairs Array",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/k-inverse-pairs-array",
- "solutionLink": "#"
- },
- {
- "problemName": "630. Course Schedule III",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/course-schedule-iii",
- "solutionLink": "#"
- },
- {
- "problemName": "631. Design Excel Sum Formula",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/design-excel-sum-formula",
- "solutionLink": "#"
- },
- {
- "problemName": "632. Smallest Range Covering Elements from K Lists",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/smallest-range-covering-elements-from-k-lists",
- "solutionLink": "#"
- },
- {
- "problemName": "633. Sum of Square Numbers",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/sum-of-square-numbers",
- "solutionLink": "/dsa-solutions/lc-solutions/0600-0699/sum-of-square-numbers"
- },
- {
- "problemName": "634. Find the Derangement of An Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-the-derangement-of-an-array",
- "solutionLink": "#"
- },
- {
- "problemName": "635. Design Log Storage System",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/design-log-storage-system",
- "solutionLink": "#"
- },
- {
- "problemName": "636. Exclusive Time of Functions",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/exclusive-time-of-functions",
- "solutionLink": "#"
- },
- {
- "problemName": "637. Average of Levels in Binary Tree",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/average-of-levels-in-binary-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "638. Shopping Offers",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/shopping-offers",
- "solutionLink": "#"
- },
- {
- "problemName": "639. Decode Ways II",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/decode-ways-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "640. Solve the Equation",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/solve-the-equation",
- "solutionLink": "#"
- },
- {
- "problemName": "641. Design Circular Deque",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/design-circular-deque",
- "solutionLink": "#"
- },
- {
- "problemName": "642. Design Search Autocomplete System",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/design-search-autocomplete-system",
- "solutionLink": "#"
- },
- {
- "problemName": "643. Maximum Average Subarray I",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/maximum-average-subarray-i",
- "solutionLink": "#"
- },
- {
- "problemName": "644. Maximum Average Subarray II",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-average-subarray-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "645. Set Mismatch",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/set-mismatch",
- "solutionLink": "#"
- },
- {
- "problemName": "646. Maximum Length of Pair Chain",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-length-of-pair-chain",
- "solutionLink": "#"
- },
- {
- "problemName": "647. Palindromic Substrings",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/palindromic-substrings",
- "solutionLink": "#"
- },
- {
- "problemName": "648. Replace Words",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/replace-words",
- "solutionLink": "#"
- },
- {
- "problemName": "649. Dota2 Senate",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/dota2-senate",
- "solutionLink": "#"
- },
- {
- "problemName": "650. 2 Keys Keyboard",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/2-keys-keyboard",
- "solutionLink": "#"
- },
- {
- "problemName": "651. 4 Keys Keyboard",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/4-keys-keyboard",
- "solutionLink": "#"
- },
- {
- "problemName": "652. Find Duplicate Subtrees",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-duplicate-subtrees",
- "solutionLink": "#"
- },
- {
- "problemName": "653. Two Sum IV - Input is a BST",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/two-sum-iv-input-is-a-bst",
- "solutionLink": "#"
- },
- {
- "problemName": "654. Maximum Binary Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-binary-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "655. Print Binary Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/print-binary-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "656. Coin Path",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/coin-path",
- "solutionLink": "#"
- },
- {
- "problemName": "657. Robot Return to Origin",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/robot-return-to-origin",
- "solutionLink": "#"
- },
- {
- "problemName": "658. Find K Closest Elements",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-k-closest-elements",
- "solutionLink": "#"
- },
- {
- "problemName": "659. Split Array into Consecutive Subsequences",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/split-array-into-consecutive-subsequences",
- "solutionLink": "/dsa-solutions/lc-solutions/0600-0699/split-array-into-consecutive-subsequences"
- },
- {
- "problemName": "660. Remove 9",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/remove-9",
- "solutionLink": "#"
- },
- {
- "problemName": "661. Image Smoother",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/image-smoother",
- "solutionLink": "#"
- },
- {
- "problemName": "662. Maximum Width of Binary Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-width-of-binary-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "663. Equal Tree Partition",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/equal-tree-partition",
- "solutionLink": "#"
- },
- {
- "problemName": "664. Strange Printer",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/strange-printer",
- "solutionLink": "#"
- },
- {
- "problemName": "665. Non-decreasing Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/non-decreasing-array",
- "solutionLink": "#"
- },
- {
- "problemName": "666. Path Sum IV",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/path-sum-iv",
- "solutionLink": "#"
- },
- {
- "problemName": "667. Beautiful Arrangement II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/beautiful-arrangement-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "668. Kth Smallest Number in Multiplication Table",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/kth-smallest-number-in-multiplication-table",
- "solutionLink": "#"
- },
- {
- "problemName": "669. Trim a Binary Search Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/trim-a-binary-search-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "670. Maximum Swap",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-swap",
- "solutionLink": "#"
- },
- {
- "problemName": "671. Second Minimum Node In a Binary Tree",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/second-minimum-node-in-a-binary-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "672. Bulb Switcher II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/bulb-switcher-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "673. Number of Longest Increasing Subsequence",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-longest-increasing-subsequence",
- "solutionLink": "#"
- },
- {
- "problemName": "674. Longest Continuous Increasing Subsequence",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/longest-continuous-increasing-subsequence",
- "solutionLink": "#"
- },
- {
- "problemName": "675. Cut Off Trees for Golf Event",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/cut-off-trees-for-golf-event",
- "solutionLink": "#"
- },
- {
- "problemName": "676. Implement Magic Dictionary",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/implement-magic-dictionary",
- "solutionLink": "#"
- },
- {
- "problemName": "677. Map Sum Pairs",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/map-sum-pairs",
- "solutionLink": "#"
- },
- {
- "problemName": "678. Valid Parenthesis String",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/valid-parenthesis-string",
- "solutionLink": "#"
- },
- {
- "problemName": "679. 24 Game",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/24-game",
- "solutionLink": "#"
- },
- {
- "problemName": "680. Valid Palindrome II",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/valid-palindrome-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "681. Next Closest Time",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/next-closest-time",
- "solutionLink": "#"
- },
- {
- "problemName": "682. Baseball Game",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/baseball-game",
- "solutionLink": "#"
- },
- {
- "problemName": "683. K Empty Slots",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/k-empty-slots",
- "solutionLink": "#"
- },
- {
- "problemName": "684. Redundant Connection",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/redundant-connection",
- "solutionLink": "#"
- },
- {
- "problemName": "685. Redundant Connection II",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/redundant-connection-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "686. Repeated String Match",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/repeated-string-match",
- "solutionLink": "#"
- },
- {
- "problemName": "687. Longest Univalue Path",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/longest-univalue-path",
- "solutionLink": "#"
- },
- {
- "problemName": "688. Knight Probability in Chessboard",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/knight-probability-in-chessboard",
- "solutionLink": "#"
- },
- {
- "problemName": "689. Maximum Sum of 3 Non-Overlapping Subarrays",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-sum-of-3-non-overlapping-subarrays",
- "solutionLink": "#"
- },
- {
- "problemName": "690. Employee Importance",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/employee-importance",
- "solutionLink": "#"
- },
- {
- "problemName": "691. Stickers to Spell Word",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/stickers-to-spell-word",
- "solutionLink": "#"
- },
- {
- "problemName": "692. Top K Frequent Words",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/top-k-frequent-words",
- "solutionLink": "#"
- },
- {
- "problemName": "693. Binary Number with Alternating Bits",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/binary-number-with-alternating-bits",
- "solutionLink": "/dsa-solutions/lc-solutions/0600-0699/binary-number-with-alternating-bits"
- },
- {
- "problemName": "694. Number of Distinct Islands",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-distinct-islands",
- "solutionLink": "#"
- },
- {
- "problemName": "695. Max Area of Island",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/max-area-of-island",
- "solutionLink": "/dsa-solutions/lc-solutions/0600-0699/max-area-of-island"
- },
- {
- "problemName": "696. Count Binary Substrings",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/count-binary-substrings",
- "solutionLink": "/dsa-solutions/lc-solutions/0600-0699/count-binary-substrings"
- },
- {
- "problemName": "697. Degree of an Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/degree-of-an-array",
- "solutionLink": "/dsa-solutions/lc-solutions/0600-0699/degree-of-an-array"
- },
- {
- "problemName": "698. Partition to K Equal Sum Subsets",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/partition-to-k-equal-sum-subsets",
- "solutionLink": "#"
- },
- {
- "problemName": "699. Falling Squares",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/falling-squares",
- "solutionLink": "#"
- }
-];
-
-
-
-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 LeetCode website. You can also click on the solution link to view the solution of the problem.
\ No newline at end of file
diff --git a/dsa-problems/leetcode-problems/0700-0799.md b/dsa-problems/leetcode-problems/0700-0799.md
deleted file mode 100644
index 0ff1ede5e..000000000
--- a/dsa-problems/leetcode-problems/0700-0799.md
+++ /dev/null
@@ -1,622 +0,0 @@
----
-id: 0700-0799
-title: LeetCode Problems 700 - 799
-sidebar_label: 0700 - 0799
-keywords:
- - LeetCode
- - LeetCode Problems
- - LeetCode Problems 700 - 799
- - DSA problems
----
-
-export const problems = [
- {
- "problemName": "700. Search in a Binary Search Tree",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/search-in-a-binary-search-tree",
- "solutionLink": "/dsa-solutions/lc-solutions/0700-0799/search-in-a-binary-search-tree"
- },
- {
- "problemName": "701. Insert into a Binary Search Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/insert-into-a-binary-search-tree",
- "solutionLink": "/dsa-solutions/lc-solutions/0700-0799/insert-into-a-binary-search-tree"
- },
- {
- "problemName": "702. Search in a Sorted Array of Unknown Size",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/search-in-a-sorted-array-of-unknown-size",
- "solutionLink": "#"
- },
- {
- "problemName": "703. Kth Largest Element in a Stream",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/kth-largest-element-in-a-stream",
- "solutionLink": "/dsa-solutions/lc-solutions/0700-0799/kth-largest-element-in-a-stream"
- },
- {
- "problemName": "704. Binary Search",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/binary-search",
- "solutionLink": "/dsa-solutions/lc-solutions/0700-0799/binary-search"
- },
- {
- "problemName": "705. Design HashSet",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/design-hashset",
- "solutionLink": "#"
- },
- {
- "problemName": "706. Design HashMap",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/design-hashmap",
- "solutionLink": "#"
- },
- {
- "problemName": "707. Design Linked List",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/design-linked-list",
- "solutionLink": "#"
- },
- {
- "problemName": "708. Insert into a Sorted Circular Linked List",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/insert-into-a-sorted-circular-linked-list",
- "solutionLink": "#"
- },
- {
- "problemName": "709. To Lower Case",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/to-lower-case",
- "solutionLink": "#"
- },
- {
- "problemName": "710. Random Pick with Blacklist",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/random-pick-with-blacklist",
- "solutionLink": "#"
- },
- {
- "problemName": "711. Number of Distinct Islands II",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/number-of-distinct-islands-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "712. Minimum ASCII Delete Sum for Two Strings",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-ascii-delete-sum-for-two-strings",
- "solutionLink": "#"
- },
- {
- "problemName": "713. Subarray Product Less Than K",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/subarray-product-less-than-k",
- "solutionLink": "/dsa-solutions/lc-solutions/0700-0799/subarray-product-less-than-k"
- },
- {
- "problemName": "714. Best Time to Buy and Sell Stock with Transaction Fee",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-transaction-fee",
- "solutionLink": "#"
- },
- {
- "problemName": "715. Range Module",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/range-module",
- "solutionLink": "#"
- },
- {
- "problemName": "716. Max Stack",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/max-stack",
- "solutionLink": "#"
- },
- {
- "problemName": "717. 1-bit and 2-bit Characters",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/1-bit-and-2-bit-characters",
- "solutionLink": "/dsa-solutions/lc-solutions/0700-0799/1-bit-and-2-bit-characters"
- },
- {
- "problemName": "718. Maximum Length of Repeated Subarray",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-length-of-repeated-subarray",
- "solutionLink": "#"
- },
- {
- "problemName": "719. Find K-th Smallest Pair Distance",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/find-k-th-smallest-pair-distance",
- "solutionLink": "#"
- },
- {
- "problemName": "720. Longest Word in Dictionary",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/longest-word-in-dictionary",
- "solutionLink": "#"
- },
- {
- "problemName": "721. Accounts Merge",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/accounts-merge",
- "solutionLink": "#"
- },
- {
- "problemName": "722. Remove Comments",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/remove-comments",
- "solutionLink": "#"
- },
- {
- "problemName": "723. Candy Crush",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/candy-crush",
- "solutionLink": "#"
- },
- {
- "problemName": "724. Find Pivot Index",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-pivot-index",
- "solutionLink": "#"
- },
- {
- "problemName": "725. Split Linked List in Parts",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/split-linked-list-in-parts",
- "solutionLink": "/dsa-solutions/lc-solutions/0700-0799/split-linked-list-in-parts"
- },
- {
- "problemName": "726. Number of Atoms",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/number-of-atoms",
- "solutionLink": "/dsa-solutions/lc-solutions/0700-0799/number-of-atoms"
- },
- {
- "problemName": "727. Minimum Window Subsequence",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-window-subsequence",
- "solutionLink": "#"
- },
- {
- "problemName": "728. Self Dividing Numbers",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/self-dividing-numbers",
- "solutionLink": "/dsa-solutions/lc-solutions/0700-0799/self-dividing-numbers"
- },
- {
- "problemName": "729. My Calendar I",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/my-calendar-i",
- "solutionLink": "/dsa-solutions/lc-solutions/0700-0799/my-calendar-i"
- },
- {
- "problemName": "730. Count Different Palindromic Subsequences",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-different-palindromic-subsequences",
- "solutionLink": "#"
- },
- {
- "problemName": "731. My Calendar II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/my-calendar-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "732. My Calendar III",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/my-calendar-iii",
- "solutionLink": "#"
- },
- {
- "problemName": "733. Flood Fill",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/flood-fill",
- "solutionLink": "/dsa-solutions/lc-solutions/0700-0799/flood-fill"
- },
- {
- "problemName": "734. Sentence Similarity",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/sentence-similarity",
- "solutionLink": "#"
- },
- {
- "problemName": "735. Asteroid Collision",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/asteroid-collision",
- "solutionLink": "#"
- },
- {
- "problemName": "736. Parse Lisp Expression",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/parse-lisp-expression",
- "solutionLink": "#"
- },
- {
- "problemName": "737. Sentence Similarity II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/sentence-similarity-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "738. Monotone Increasing Digits",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/monotone-increasing-digits",
- "solutionLink": "#"
- },
- {
- "problemName": "739. Daily Temperatures",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/daily-temperatures",
- "solutionLink": "#"
- },
- {
- "problemName": "740. Delete and Earn",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/delete-and-earn",
- "solutionLink": "#"
- },
- {
- "problemName": "741. Cherry Pickup",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/cherry-pickup",
- "solutionLink": "/dsa-solutions/lc-solutions/0700-0799/cherry-pickup"
- },
- {
- "problemName": "742. Closest Leaf in a Binary Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/closest-leaf-in-a-binary-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "743. Network Delay Time",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/network-delay-time",
- "solutionLink": "#"
- },
- {
- "problemName": "744. Find Smallest Letter Greater Than Target",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-smallest-letter-greater-than-target",
- "solutionLink": "#"
- },
- {
- "problemName": "745. Prefix and Suffix Search",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/prefix-and-suffix-search",
- "solutionLink": "/dsa-solutions/lc-solutions/0700-0799/prefix-and-suffix-search"
- },
- {
- "problemName": "746. Min Cost Climbing Stairs",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/min-cost-climbing-stairs",
- "solutionLink": "#"
- },
- {
- "problemName": "747. Largest Number At Least Twice of Others",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/largest-number-at-least-twice-of-others",
- "solutionLink": "#"
- },
- {
- "problemName": "748. Shortest Completing Word",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/shortest-completing-word",
- "solutionLink": "#"
- },
- {
- "problemName": "749. Contain Virus",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/contain-virus",
- "solutionLink": "#"
- },
- {
- "problemName": "750. Number Of Corner Rectangles",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-corner-rectangles",
- "solutionLink": "#"
- },
- {
- "problemName": "751. IP to CIDR",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/ip-to-cidr",
- "solutionLink": "#"
- },
- {
- "problemName": "752. Open the Lock",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/open-the-lock",
- "solutionLink": "/dsa-solutions/lc-solutions/0700-0799/open-the-lock"
- },
- {
- "problemName": "753. Cracking the Safe",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/cracking-the-safe",
- "solutionLink": "#"
- },
- {
- "problemName": "754. Reach a Number",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/reach-a-number",
- "solutionLink": "#"
- },
- {
- "problemName": "755. Pour Water",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/pour-water",
- "solutionLink": "#"
- },
- {
- "problemName": "756. Pyramid Transition Matrix",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/pyramid-transition-matrix",
- "solutionLink": "#"
- },
- {
- "problemName": "757. Set Intersection Size At Least Two",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/set-intersection-size-at-least-two",
- "solutionLink": "#"
- },
- {
- "problemName": "758. Bold Words in String",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/bold-words-in-string",
- "solutionLink": "#"
- },
- {
- "problemName": "759. Employee Free Time",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/employee-free-time",
- "solutionLink": "#"
- },
- {
- "problemName": "760. Find Anagram Mappings",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-anagram-mappings",
- "solutionLink": "#"
- },
- {
- "problemName": "761. Special Binary String",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/special-binary-string",
- "solutionLink": "#"
- },
- {
- "problemName": "762. Prime Number of Set Bits in Binary Representation",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/prime-number-of-set-bits-in-binary-representation",
- "solutionLink": "#"
- },
- {
- "problemName": "763. Partition Labels",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/partition-labels",
- "solutionLink": "#"
- },
- {
- "problemName": "764. Largest Plus Sign",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/largest-plus-sign",
- "solutionLink": "#"
- },
- {
- "problemName": "765. Couples Holding Hands",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/couples-holding-hands",
- "solutionLink": "#"
- },
- {
- "problemName": "766. Toeplitz Matrix",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/toeplitz-matrix",
- "solutionLink": "#"
- },
- {
- "problemName": "767. Reorganize String",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/reorganize-string",
- "solutionLink": "#"
- },
- {
- "problemName": "768. Max Chunks To Make Sorted II",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/max-chunks-to-make-sorted-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "769. Max Chunks To Make Sorted",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/max-chunks-to-make-sorted",
- "solutionLink": "#"
- },
- {
- "problemName": "770. Basic Calculator IV",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/basic-calculator-iv",
- "solutionLink": "#"
- },
- {
- "problemName": "771. Jewels and Stones",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/jewels-and-stones",
- "solutionLink": "/dsa-solutions/lc-solutions/0700-0799/jewels-and-stones"
- },
- {
- "problemName": "772. Basic Calculator III",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/basic-calculator-iii",
- "solutionLink": "#"
- },
- {
- "problemName": "773. Sliding Puzzle",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/sliding-puzzle",
- "solutionLink": "#"
- },
- {
- "problemName": "774. Minimize Max Distance to Gas Station",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimize-max-distance-to-gas-station",
- "solutionLink": "#"
- },
- {
- "problemName": "775. Global and Local Inversions",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/global-and-local-inversions",
- "solutionLink": "#"
- },
- {
- "problemName": "776. Split BST",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/split-bst",
- "solutionLink": "#"
- },
- {
- "problemName": "777. Swap Adjacent in LR String",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/swap-adjacent-in-lr-string",
- "solutionLink": "#"
- },
- {
- "problemName": "778. Swim in Rising Water",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/swim-in-rising-water",
- "solutionLink": "#"
- },
- {
- "problemName": "779. K-th Symbol in Grammar",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/k-th-symbol-in-grammar",
- "solutionLink": "#"
- },
- {
- "problemName": "780. Reaching Points",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/reaching-points",
- "solutionLink": "#"
- },
- {
- "problemName": "781. Rabbits in Forest",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/rabbits-in-forest",
- "solutionLink": "#"
- },
- {
- "problemName": "782. Transform to Chessboard",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/transform-to-chessboard",
- "solutionLink": "#"
- },
- {
- "problemName": "783. Minimum Distance Between BST Nodes",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/minimum-distance-between-bst-nodes",
- "solutionLink": "#"
- },
- {
- "problemName": "784. Letter Case Permutation",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/letter-case-permutation",
- "solutionLink": "#"
- },
- {
- "problemName": "785. Is Graph Bipartite?",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/is-graph-bipartite",
- "solutionLink": "/dsa-solutions/lc-solutions/0700-0799/is-graph-bipartite"
- },
- {
- "problemName": "786. K-th Smallest Prime Fraction",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/k-th-smallest-prime-fraction",
- "solutionLink": "/dsa-solutions/lc-solutions/0700-0799/k-th-smallest-prime-fraction"
- },
- {
- "problemName": "787. Cheapest Flights Within K Stops",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/cheapest-flights-within-k-stops",
- "solutionLink": "/dsa-solutions/lc-solutions/0700-0799/cheapest-flights-within-k-stops"
- },
- {
- "problemName": "788. Rotated Digits",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/rotated-digits",
- "solutionLink": "#"
- },
- {
- "problemName": "789. Escape The Ghosts",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/escape-the-ghosts",
- "solutionLink": "#"
- },
- {
- "problemName": "790. Domino and Tromino Tiling",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/domino-and-tromino-tiling",
- "solutionLink": "#"
- },
- {
- "problemName": "791. Custom Sort String",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/custom-sort-string",
- "solutionLink": "/dsa-solutions/lc-solutions/0700-0799/custom-sort-string"
- },
- {
- "problemName": "792. Number of Matching Subsequences",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-matching-subsequences",
- "solutionLink": "#"
- },
- {
- "problemName": "793. Preimage Size of Factorial Zeroes Function",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/preimage-size-of-factorial-zeroes-function",
- "solutionLink": "#"
- },
- {
- "problemName": "794. Valid Tic-Tac-Toe State",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/valid-tic-tac-toe-state",
- "solutionLink": "#"
- },
- {
- "problemName": "795. Number of Subarrays with Bounded Maximum",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-subarrays-with-bounded-maximum",
- "solutionLink": "#"
- },
- {
- "problemName": "796. Rotate String",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/rotate-string",
- "solutionLink": "/dsa-solutions/lc-solutions/0700-0799/rotate-string"
- },
- {
- "problemName": "797. All Paths From Source to Target",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/all-paths-from-source-to-target",
- "solutionLink": "#"
- },
- {
- "problemName": "798. Smallest Rotation with Highest Score",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/smallest-rotation-with-highest-score",
- "solutionLink": "#"
- },
- {
- "problemName": "799. Champagne Tower",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/champagne-tower",
- "solutionLink": "#"
- }
-]
-
-
-
-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 LeetCode website. You can also click on the solution link to view the solution of the problem.
diff --git a/dsa-problems/leetcode-problems/0800-0899.md b/dsa-problems/leetcode-problems/0800-0899.md
deleted file mode 100644
index 02998f51c..000000000
--- a/dsa-problems/leetcode-problems/0800-0899.md
+++ /dev/null
@@ -1,621 +0,0 @@
----
-id: 0800-0899
-title: LeetCode Problems 800 - 899
-sidebar_label: 0800 - 0899
-keywords:
- - LeetCode
- - LeetCode Problems
- - LeetCode Problems 800 - 899
- - DSA problems
----
-
-export const problems = [
- {
- "problemName": "800. Similar RGB Color",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/similar-rgb-color",
- "solutionLink": "#"
- },
- {
- "problemName": "801. Minimum Swaps To Make Sequences Increasing",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-swaps-to-make-sequences-increasing",
- "solutionLink": "#"
- },
- {
- "problemName": "802. Find Eventual Safe States",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-eventual-safe-states",
- "solutionLink": "#"
- },
- {
- "problemName": "803. Bricks Falling When Hit",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/bricks-falling-when-hit",
- "solutionLink": "#"
- },
- {
- "problemName": "804. Unique Morse Code Words",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/unique-morse-code-words",
- "solutionLink": "#"
- },
- {
- "problemName": "805. Split Array With Same Average",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/split-array-with-same-average",
- "solutionLink": "#"
- },
- {
- "problemName": "806. Number of Lines To Write String",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/number-of-lines-to-write-string",
- "solutionLink": "#"
- },
- {
- "problemName": "807. Max Increase to Keep City Skyline",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/max-increase-to-keep-city-skyline",
- "solutionLink": "#"
- },
- {
- "problemName": "808. Soup Servings",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/soup-servings",
- "solutionLink": "#"
- },
- {
- "problemName": "809. Expressive Words",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/expressive-words",
- "solutionLink": "#"
- },
- {
- "problemName": "810. Chalkboard XOR Game",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/chalkboard-xor-game",
- "solutionLink": "#"
- },
- {
- "problemName": "811. Subdomain Visit Count",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/subdomain-visit-count",
- "solutionLink": "#"
- },
- {
- "problemName": "812. Largest Triangle Area",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/largest-triangle-area",
- "solutionLink": "#"
- },
- {
- "problemName": "813. Largest Sum of Averages",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/largest-sum-of-averages",
- "solutionLink": "#"
- },
- {
- "problemName": "814. Binary Tree Pruning",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/binary-tree-pruning",
- "solutionLink": "#"
- },
- {
- "problemName": "815. Bus Routes",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/bus-routes",
- "solutionLink": "#"
- },
- {
- "problemName": "816. Ambiguous Coordinates",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/ambiguous-coordinates",
- "solutionLink": "#"
- },
- {
- "problemName": "817. Linked List Components",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/linked-list-components",
- "solutionLink": "#"
- },
- {
- "problemName": "818. Race Car",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/race-car",
- "solutionLink": "#"
- },
- {
- "problemName": "819. Most Common Word",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/most-common-word",
- "solutionLink": "#"
- },
- {
- "problemName": "820. Short Encoding of Words",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/short-encoding-of-words",
- "solutionLink": "#"
- },
- {
- "problemName": "821. Shortest Distance to a Character",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/shortest-distance-to-a-character",
- "solutionLink": "#"
- },
- {
- "problemName": "822. Card Flipping Game",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/card-flipping-game",
- "solutionLink": "#"
- },
- {
- "problemName": "823. Binary Trees With Factors",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/binary-trees-with-factors",
- "solutionLink": "#"
- },
- {
- "problemName": "824. Goat Latin",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/goat-latin",
- "solutionLink": "#"
- },
- {
- "problemName": "825. Friends Of Appropriate Ages",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/friends-of-appropriate-ages",
- "solutionLink": "#"
- },
- {
- "problemName": "826. Most Profit Assigning Work",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/most-profit-assigning-work",
- "solutionLink": "#"
- },
- {
- "problemName": "827. Making A Large Island",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/making-a-large-island",
- "solutionLink": "#"
- },
- {
- "problemName": "828. Count Unique Characters of All Substrings of a Given String",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-unique-characters-of-all-substrings-of-a-given-string",
- "solutionLink": "#"
- },
- {
- "problemName": "829. Consecutive Numbers Sum",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/consecutive-numbers-sum",
- "solutionLink": "#"
- },
- {
- "problemName": "830. Positions of Large Groups",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/positions-of-large-groups",
- "solutionLink": "#"
- },
- {
- "problemName": "831. Masking Personal Information",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/masking-personal-information",
- "solutionLink": "#"
- },
- {
- "problemName": "832. Flipping an Image",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/flipping-an-image",
- "solutionLink": "#"
- },
- {
- "problemName": "833. Find And Replace in String",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-and-replace-in-string",
- "solutionLink": "#"
- },
- {
- "problemName": "834. Sum of Distances in Tree",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/sum-of-distances-in-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "835. Image Overlap",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/image-overlap",
- "solutionLink": "#"
- },
- {
- "problemName": "836. Rectangle Overlap",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/rectangle-overlap",
- "solutionLink": "#"
- },
- {
- "problemName": "837. New 21 Game",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/new-21-game",
- "solutionLink": "#"
- },
- {
- "problemName": "838. Push Dominoes",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/push-dominoes",
- "solutionLink": "#"
- },
- {
- "problemName": "839. Similar String Groups",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/similar-string-groups",
- "solutionLink": "#"
- },
- {
- "problemName": "840. Magic Squares In Grid",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/magic-squares-in-grid",
- "solutionLink": "#"
- },
- {
- "problemName": "841. Keys and Rooms",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/keys-and-rooms",
- "solutionLink": "#"
- },
- {
- "problemName": "842. Split Array into Fibonacci Sequence",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/split-array-into-fibonacci-sequence",
- "solutionLink": "#"
- },
- {
- "problemName": "843. Guess the Word",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/guess-the-word",
- "solutionLink": "#"
- },
- {
- "problemName": "844. Backspace String Compare",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/backspace-string-compare",
- "solutionLink": "#"
- },
- {
- "problemName": "845. Longest Mountain in Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/longest-mountain-in-array",
- "solutionLink": "#"
- },
- {
- "problemName": "846. Hand of Straights",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/hand-of-straights",
- "solutionLink": "#"
- },
- {
- "problemName": "847. Shortest Path Visiting All Nodes",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/shortest-path-visiting-all-nodes",
- "solutionLink": "#"
- },
- {
- "problemName": "848. Shifting Letters",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/shifting-letters",
- "solutionLink": "#"
- },
- {
- "problemName": "849. Maximize Distance to Closest Person",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximize-distance-to-closest-person",
- "solutionLink": "#"
- },
- {
- "problemName": "850. Rectangle Area II",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/rectangle-area-ii",
- "solutionLink": "#"
- },{
- "problemName": "851. Loud and Rich",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/loud-and-rich",
- "solutionLink": "#"
- },
- {
- "problemName": "852. Peak Index in a Mountain Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/peak-index-in-a-mountain-array",
- "solutionLink": "#"
- },
- {
- "problemName": "853. Car Fleet",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/car-fleet",
- "solutionLink": "#"
- },
- {
- "problemName": "854. K-Similar Strings",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/k-similar-strings",
- "solutionLink": "#"
- },
- {
- "problemName": "855. Exam Room",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/exam-room",
- "solutionLink": "#"
- },
- {
- "problemName": "856. Score of Parentheses",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/score-of-parentheses",
- "solutionLink": "#"
- },
- {
- "problemName": "857. Minimum Cost to Hire K Workers",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-cost-to-hire-k-workers",
- "solutionLink": "#"
- },
- {
- "problemName": "858. Mirror Reflection",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/mirror-reflection",
- "solutionLink": "#"
- },
- {
- "problemName": "859. Buddy Strings",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/buddy-strings",
- "solutionLink": "#"
- },
- {
- "problemName": "860. Lemonade Change",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/lemonade-change",
- "solutionLink": "#"
- },
- {
- "problemName": "861. Score After Flipping Matrix",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/score-after-flipping-matrix",
- "solutionLink": "#"
- },
- {
- "problemName": "862. Shortest Subarray with Sum at Least K",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/shortest-subarray-with-sum-at-least-k",
- "solutionLink": "#"
- },
- {
- "problemName": "863. All Nodes Distance K in Binary Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/all-nodes-distance-k-in-binary-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "864. Shortest Path to Get All Keys",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/shortest-path-to-get-all-keys",
- "solutionLink": "#"
- },
- {
- "problemName": "865. Smallest Subtree with all the Deepest Nodes",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/smallest-subtree-with-all-the-deepest-nodes",
- "solutionLink": "#"
- },
- {
- "problemName": "866. Prime Palindrome",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/prime-palindrome",
- "solutionLink": "#"
- },
- {
- "problemName": "867. Transpose Matrix",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/transpose-matrix",
- "solutionLink": "#"
- },
- {
- "problemName": "868. Binary Gap",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/binary-gap",
- "solutionLink": "#"
- },
- {
- "problemName": "869. Reordered Power of 2",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/reordered-power-of-2",
- "solutionLink": "#"
- },
- {
- "problemName": "870. Advantage Shuffle",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/advantage-shuffle",
- "solutionLink": "#"
- },
- {
- "problemName": "871. Minimum Number of Refueling Stops",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-number-of-refueling-stops",
- "solutionLink": "#"
- },
- {
- "problemName": "872. Leaf-Similar Trees",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/leaf-similar-trees",
- "solutionLink": "#"
- },
- {
- "problemName": "873. Length of Longest Fibonacci Subsequence",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/length-of-longest-fibonacci-subsequence",
- "solutionLink": "#"
- },
- {
- "problemName": "874. Walking Robot Simulation",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/walking-robot-simulation",
- "solutionLink": "#"
- },
- {
- "problemName": "875. Koko Eating Bananas",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/koko-eating-bananas",
- "solutionLink": "#"
- },
- {
- "problemName": "876. Middle of the Linked List",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/middle-of-the-linked-list",
- "solutionLink": "#"
- },
- {
- "problemName": "877. Stone Game",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/stone-game",
- "solutionLink": "#"
- },
- {
- "problemName": "878. Nth Magical Number",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/nth-magical-number",
- "solutionLink": "#"
- },
- {
- "problemName": "879. Profitable Schemes",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/profitable-schemes",
- "solutionLink": "#"
- },
- {
- "problemName": "880. Decoded String at Index",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/decoded-string-at-index",
- "solutionLink": "#"
- },
- {
- "problemName": "881. Boats to Save People",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/boats-to-save-people",
- "solutionLink": "#"
- },
- {
- "problemName": "882. Reachable Nodes In Subdivided Graph",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/reachable-nodes-in-subdivided-graph",
- "solutionLink": "#"
- },
- {
- "problemName": "883. Projection Area of 3D Shapes",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/projection-area-of-3d-shapes",
- "solutionLink": "#"
- },
- {
- "problemName": "884. Uncommon Words from Two Sentences",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/uncommon-words-from-two-sentences",
- "solutionLink": "#"
- },
- {
- "problemName": "885. Spiral Matrix III",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/spiral-matrix-iii",
- "solutionLink": "#"
- },
- {
- "problemName": "886. Possible Bipartition",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/possible-bipartition",
- "solutionLink": "#"
- },
- {
- "problemName": "887. Super Egg Drop",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/super-egg-drop",
- "solutionLink": "#"
- },
- {
- "problemName": "888. Fair Candy Swap",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/fair-candy-swap",
- "solutionLink": "#"
- },
- {
- "problemName": "889. Construct Binary Tree from Preorder and Postorder Traversal",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/construct-binary-tree-from-preorder-and-postorder-traversal",
- "solutionLink": "#"
- },
- {
- "problemName": "890. Find and Replace Pattern",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-and-replace-pattern",
- "solutionLink": "#"
- },
- {
- "problemName": "891. Sum of Subsequence Widths",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/sum-of-subsequence-widths",
- "solutionLink": "#"
- },
- {
- "problemName": "892. Surface Area of 3D Shapes",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/surface-area-of-3d-shapes",
- "solutionLink": "#"
- },
- {
- "problemName": "893. Groups of Special-Equivalent Strings",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/groups-of-special-equivalent-strings",
- "solutionLink": "#"
- },
- {
- "problemName": "894. All Possible Full Binary Trees",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/all-possible-full-binary-trees",
- "solutionLink": "#"
- },
- {
- "problemName": "895. Maximum Frequency Stack",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-frequency-stack",
- "solutionLink": "#"
- },
- {
- "problemName": "896. Monotonic Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/monotonic-array",
- "solutionLink": "#"
- },
- {
- "problemName": "897. Increasing Order Search Tree",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/increasing-order-search-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "898. Bitwise ORs of Subarrays",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/bitwise-ors-of-subarrays",
- "solutionLink": "#"
- },
- {
- "problemName": "899. Orderly Queue",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/orderly-queue",
- "solutionLink": "#"
- }
-]
-
-
-
-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 LeetCode website. You can also click on the solution link to view the solution of the problem.
\ No newline at end of file
diff --git a/dsa-problems/leetcode-problems/0900-0999.md b/dsa-problems/leetcode-problems/0900-0999.md
deleted file mode 100644
index 12c2ea013..000000000
--- a/dsa-problems/leetcode-problems/0900-0999.md
+++ /dev/null
@@ -1,623 +0,0 @@
----
-id: 0900-0999
-title: LeetCode Problems 900 - 999
-sidebar_label: 0900 - 0999
-keywords:
- - LeetCode
- - LeetCode Problems
- - LeetCode Problems 900 - 999
- - DSA problems
----
-
-
-export const problems = [
- {
- problemName: "900. RLE Iterator",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/rle-iterator",
- solutionLink: "#"
- },
- {
- problemName: "901. Online Stock Span",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/online-stock-span",
- solutionLink: "#"
- },
- {
- problemName: "902. Numbers At Most N Given Digit Set",
- difficulty: "Hard",
- leetCodeLink: "https://leetcode.com/problems/numbers-at-most-n-given-digit-set",
- solutionLink: "/dsa-solutions/lc-solutions/0900-0999/numbers-at-most-n-given-digit-set"
- },
- {
- problemName: "903. Valid Permutations for DI Sequence",
- difficulty: "Hard",
- leetCodeLink: "https://leetcode.com/problems/valid-permutations-for-di-sequence",
- solutionLink: "#"
- },
- {
- problemName: "904. Fruit Into Baskets",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/fruit-into-baskets",
- solutionLink: "#"
- },
- {
- problemName: "905. Sort Array By Parity",
- difficulty: "Easy",
- leetCodeLink: "https://leetcode.com/problems/sort-array-by-parity",
- solutionLink: "#"
- },
- {
- problemName: "906. Super Palindromes",
- difficulty: "Hard",
- leetCodeLink: "https://leetcode.com/problems/super-palindromes",
- solutionLink: "#"
- },
- {
- problemName: "907. Sum of Subarray Minimums",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/sum-of-subarray-minimums",
- solutionLink: "#"
- },
- {
- problemName: "908. Smallest Range I",
- difficulty: "Easy",
- leetCodeLink: "https://leetcode.com/problems/smallest-range-i",
- solutionLink: "#"
- },
- {
- problemName: "909. Snakes and Ladders",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/snakes-and-ladders",
- solutionLink: "#"
- },
- {
- problemName: "910. Smallest Range II",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/smallest-range-ii",
- solutionLink: "/dsa-solutions/lc-solutions/0900-0999/smallest-range-ii"
- },
- {
- problemName: "911. Online Election",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/online-election",
- solutionLink: "#"
- },
- {
- problemName: "912. Sort an Array",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/sort-an-array",
- solutionLink: "#"
- },
- {
- problemName: "913. Cat and Mouse",
- difficulty: "Hard",
- leetCodeLink: "https://leetcode.com/problems/cat-and-mouse",
- solutionLink: "/dsa-solutions/lc-solutions/0900-0999/cat-and-mouse"
- },
- {
- problemName: "914. X of a Kind in a Deck of Cards",
- difficulty: "Easy",
- leetCodeLink: "https://leetcode.com/problems/x-of-a-kind-in-a-deck-of-cards",
- solutionLink: "/dsa-solutions/lc-solutions/0900-0999/x-of-a-kind-in-a-deck-of-cards"
- },
- {
- problemName: "915. Partition Array into Disjoint Intervals",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/partition-array-into-disjoint-intervals",
- solutionLink: "/dsa-solutions/lc-solutions/0900-0999/partition-array-into-disjoint-intervals"
- },
- {
- problemName: "916. Word Subsets",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/word-subsets",
- solutionLink: "/dsa-solutions/lc-solutions/0900-0999/word-subsets"
- },
- {
- problemName: "917. Reverse Only Letters",
- difficulty: "Easy",
- leetCodeLink: "https://leetcode.com/problems/reverse-only-letters",
- solutionLink: "/dsa-solutions/lc-solutions/0900-0999/reverse-only-letters"
- },
- {
- problemName: "918. Maximum Sum Circular Subarray",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/maximum-sum-circular-subarray",
- solutionLink: "/dsa-solutions/lc-solutions/0900-0999/maximum-sum-circular-subarray"
- },
- {
- problemName: "919. Complete Binary Tree Inserter",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/complete-binary-tree-inserter",
- solutionLink: "#"
- },
- {
- problemName: "920. Number of Music Playlists",
- difficulty: "Hard",
- leetCodeLink: "https://leetcode.com/problems/number-of-music-playlists",
- solutionLink: "#"
- },
- {
- problemName: "921. Minimum Add to Make Parentheses Valid",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/minimum-add-to-make-parentheses-valid",
- solutionLink: "#"
- },
- {
- problemName: "922. Sort Array By Parity II",
- difficulty: "Easy",
- leetCodeLink: "https://leetcode.com/problems/sort-array-by-parity-ii",
- solutionLink: "#"
- },
- {
- problemName: "923. 3Sum With Multiplicity",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/3sum-with-multiplicity",
- solutionLink: "#"
- },
- {
- problemName: "924. Minimize Malware Spread",
- difficulty: "Hard",
- leetCodeLink: "https://leetcode.com/problems/minimize-malware-spread",
- solutionLink: "#"
- },
- {
- problemName: "925. Long Pressed Name",
- difficulty: "Easy",
- leetCodeLink: "https://leetcode.com/problems/long-pressed-name",
- solutionLink: "#"
- },
- {
- problemName: "926. Flip String to Monotone Increasing",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/flip-string-to-monotone-increasing",
- solutionLink: "#"
- },
- {
- problemName: "927. Three Equal Parts",
- difficulty: "Hard",
- leetCodeLink: "https://leetcode.com/problems/three-equal-parts",
- solutionLink: "#"
- },
- {
- problemName: "928. Minimize Malware Spread II",
- difficulty: "Hard",
- leetCodeLink: "https://leetcode.com/problems/minimize-malware-spread-ii",
- solutionLink: "#"
- },
- {
- problemName: "929. Unique Email Addresses",
- difficulty: "Easy",
- leetCodeLink: "https://leetcode.com/problems/unique-email-addresses",
- solutionLink: "#"
- },
- {
- problemName: "930. Binary Subarrays With Sum",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/binary-subarrays-with-sum",
- solutionLink: "#"
- },
- {
- problemName: "931. Minimum Falling Path Sum",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/minimum-falling-path-sum",
- solutionLink: "#"
- },
- {
- problemName: "932. Beautiful Array",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/beautiful-array",
- solutionLink: "#"
- },
- {
- problemName: "933. Number of Recent Calls",
- difficulty: "Easy",
- leetCodeLink: "https://leetcode.com/problems/number-of-recent-calls",
- solutionLink: "#"
- },
- {
- problemName: "934. Shortest Bridge",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/shortest-bridge",
- solutionLink: "#"
- },
- {
- problemName: "935. Knight Dialer",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/knight-dialer",
- solutionLink: "#"
- },
- {
- problemName: "936. Stamping The Sequence",
- difficulty: "Hard",
- leetCodeLink: "https://leetcode.com/problems/stamping-the-sequence",
- solutionLink: "#"
- },
- {
- problemName: "937. Reorder Data in Log Files",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/reorder-data-in-log-files",
- solutionLink: "#"
- },
- {
- problemName: "938. Range Sum of BST",
- difficulty: "Easy",
- leetCodeLink: "https://leetcode.com/problems/range-sum-of-bst",
- solutionLink: "#"
- },
- {
- problemName: "939. Minimum Area Rectangle",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/minimum-area-rectangle",
- solutionLink: "#"
- },
- {
- problemName: "940. Distinct Subsequences II",
- difficulty: "Hard",
- leetCodeLink: "https://leetcode.com/problems/distinct-subsequences-ii",
- solutionLink: "#"
- },
- {
- problemName: "941. Valid Mountain Array",
- difficulty: "Easy",
- leetCodeLink: "https://leetcode.com/problems/valid-mountain-array",
- solutionLink: "#"
- },
- {
- problemName: "942. DI String Match",
- difficulty: "Easy",
- leetCodeLink: "https://leetcode.com/problems/di-string-match",
- solutionLink: "#"
- },
- {
- problemName: "943. Find the Shortest Superstring",
- difficulty: "Hard",
- leetCodeLink: "https://leetcode.com/problems/find-the-shortest-superstring",
- solutionLink: "#"
- },
- {
- problemName: "944. Delete Columns to Make Sorted",
- difficulty: "Easy",
- leetCodeLink: "https://leetcode.com/problems/delete-columns-to-make-sorted",
- solutionLink: "#"
- },
- {
- problemName: "945. Minimum Increment to Make Array Unique",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/minimum-increment-to-make-array-unique",
- solutionLink: "/dsa-solutions/lc-solutions/0900-0999/minimum-increment-to-make-array-unique"
- },
- {
- problemName: "946. Validate Stack Sequences",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/validate-stack-sequences",
- solutionLink: "#"
- },
- {
- problemName: "947. Most Stones Removed with Same Row or Column",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/most-stones-removed-with-same-row-or-column",
- solutionLink: "#"
- },
- {
- problemName: "948. Bag of Tokens",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/bag-of-tokens",
- solutionLink: "#"
- },
- {
- problemName: "949. Largest Time for Given Digits",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/largest-time-for-given-digits",
- solutionLink: "#"
- },
- {
- problemName: "950. Reveal Cards In Increasing Order",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/reveal-cards-in-increasing-order",
- solutionLink: "#"
- },
- {
- problemName: "951. Flip Equivalent Binary Trees",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/flip-equivalent-binary-trees",
- solutionLink: "#"
- },
- {
- problemName: "952. Largest Component Size by Common Factor",
- difficulty: "Hard",
- leetCodeLink: "https://leetcode.com/problems/largest-component-size-by-common-factor",
- solutionLink: "#"
- },
- {
- problemName: "953. Verifying an Alien Dictionary",
- difficulty: "Easy",
- leetCodeLink: "https://leetcode.com/problems/verifying-an-alien-dictionary",
- solutionLink: "#"
- },
- {
- problemName: "954. Array of Doubled Pairs",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/array-of-doubled-pairs",
- solutionLink: "#"
- },
- {
- problemName: "955. Delete Columns to Make Sorted II",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/delete-columns-to-make-sorted-ii",
- solutionLink: "#"
- },
- {
- problemName: "956. Tallest Billboard",
- difficulty: "Hard",
- leetCodeLink: "https://leetcode.com/problems/tallest-billboard",
- solutionLink: "#"
- },
- {
- problemName: "957. Prison Cells After N Days",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/prison-cells-after-n-days",
- solutionLink: "#"
- },
- {
- problemName: "958. Check Completeness of a Binary Tree",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/check-completeness-of-a-binary-tree",
- solutionLink: "#"
- },
- {
- problemName: "959. Regions Cut By Slashes",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/regions-cut-by-slashes",
- solutionLink: "#"
- },
- {
- problemName: "960. Delete Columns to Make Sorted III",
- difficulty: "Hard",
- leetCodeLink: "https://leetcode.com/problems/delete-columns-to-make-sorted-iii",
- solutionLink: "#"
- },
- {
- problemName: "961. N-Repeated Element in Size 2N Array",
- difficulty: "Easy",
- leetCodeLink: "https://leetcode.com/problems/n-repeated-element-in-size-2n-array",
- solutionLink: "#"
- },
- {
- problemName: "962. Maximum Width Ramp",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/maximum-width-ramp",
- solutionLink: "#"
- },
- {
- problemName: "963. Minimum Area Rectangle II",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/minimum-area-rectangle-ii",
- solutionLink: "#"
- },
- {
- problemName: "964. Least Operators to Express Number",
- difficulty: "Hard",
- leetCodeLink: "https://leetcode.com/problems/least-operators-to-express-number",
- solutionLink: "#"
- },
- {
- problemName: "965. Univalued Binary Tree",
- difficulty: "Easy",
- leetCodeLink: "https://leetcode.com/problems/univalued-binary-tree",
- solutionLink: "#"
- },
- {
- problemName: "966. Vowel Spellchecker",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/vowel-spellchecker",
- solutionLink: "#"
- },
- {
- problemName: "967. Numbers With Same Consecutive Differences",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/numbers-with-same-consecutive-differences",
- solutionLink: "#"
- },
- {
- problemName: "968. Binary Tree Cameras",
- difficulty: "Hard",
- leetCodeLink: "https://leetcode.com/problems/binary-tree-cameras",
- solutionLink: "/dsa-solutions/lc-solutions/0900-0999/binary-tree-cameras"
- },
- {
- problemName: "969. Pancake Sorting",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/pancake-sorting",
- solutionLink: "#"
- },
- {
- problemName: "970. Powerful Integers",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/powerful-integers",
- solutionLink: "#"
- },
- {
- problemName: "971. Flip Binary Tree To Match Preorder Traversal",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/flip-binary-tree-to-match-preorder-traversal",
- solutionLink: "#"
- },
- {
- problemName: "972. Equal Rational Numbers",
- difficulty: "Hard",
- leetCodeLink: "https://leetcode.com/problems/equal-rational-numbers",
- solutionLink: "#"
- },
- {
- problemName: "973. K Closest Points to Origin",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/k-closest-points-to-origin",
- solutionLink: "/dsa-solutions/lc-solutions/0900-0999/k-closest-points-to-origin"
- },
- {
- problemName: "974. Subarray Sums Divisible by K",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/subarray-sums-divisible-by-k",
- solutionLink: "/dsa-solutions/lc-solutions/0900-0999/subarray-sums-divisible-by-k"
- },
- {
- problemName: "975. Odd Even Jump",
- difficulty: "Hard",
- leetCodeLink: "https://leetcode.com/problems/odd-even-jump",
- solutionLink: "#"
- },
- {
- problemName: "976. Largest Perimeter Triangle",
- difficulty: "Easy",
- leetCodeLink: "https://leetcode.com/problems/largest-perimeter-triangle",
- solutionLink: "#"
- },
- {
- problemName: "977. Squares of a Sorted Array",
- difficulty: "Easy",
- leetCodeLink: "https://leetcode.com/problems/squares-of-a-sorted-array",
- solutionLink: "/dsa-solutions/lc-solutions/0900-0999/squares-of-a-sorted-array"
- },
- {
- problemName: "978. Longest Turbulent Subarray",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/longest-turbulent-subarray",
- solutionLink: "#"
- },
- {
- problemName: "979. Distribute Coins in Binary Tree",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/distribute-coins-in-binary-tree",
- solutionLink: "#"
- },
- {
- problemName: "980. Unique Paths III",
- difficulty: "Hard",
- leetCodeLink: "https://leetcode.com/problems/unique-paths-iii",
- solutionLink: "#"
- },
- {
- problemName: "981. Time Based Key-Value Store",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/time-based-key-value-store",
- solutionLink: "#"
- },
- {
- problemName: "982. Triples with Bitwise AND Equal To Zero",
- difficulty: "Hard",
- leetCodeLink: "https://leetcode.com/problems/triples-with-bitwise-and-equal-to-zero",
- solutionLink: "#"
- },
- {
- problemName: "983. Minimum Cost For Tickets",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/minimum-cost-for-tickets",
- solutionLink: "#"
- },
- {
- problemName: "984. String Without AAA or BBB",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/string-without-aaa-or-bbb",
- solutionLink: "#"
- },
- {
- problemName: "985. Sum of Even Numbers After Queries",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/sum-of-even-numbers-after-queries",
- solutionLink: "#"
- },
- {
- problemName: "986. Interval List Intersections",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/interval-list-intersections",
- solutionLink: "#"
- },
- {
- problemName: "987. Vertical Order Traversal of a Binary Tree",
- difficulty: "Hard",
- leetCodeLink: "https://leetcode.com/problems/vertical-order-traversal-of-a-binary-tree",
- solutionLink: "/dsa-solutions/lc-solutions/0900-0999/vertical-order-traversal-binary-tree"
- },
- {
- problemName: "988. Smallest String Starting From Leaf",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/smallest-string-starting-from-leaf",
- solutionLink: "#"
- },
- {
- problemName: "989. Add to Array-Form of Integer",
- difficulty: "Easy",
- leetCodeLink: "https://leetcode.com/problems/add-to-array-form-of-integer",
- solutionLink: "#"
- },
- {
- problemName: "990. Satisfiability of Equality Equations",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/satisfiability-of-equality-equations",
- solutionLink: "#"
- },
- {
- problemName: "991. Broken Calculator",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/broken-calculator",
- solutionLink: "#"
- },
- {
- problemName: "992. Subarrays with K Different Integers",
- difficulty: "Hard",
- leetCodeLink: "https://leetcode.com/problems/subarrays-with-k-different-integers",
- solutionLink: "#"
- },
- {
- problemName: "993. Cousins in Binary Tree",
- difficulty: "Easy",
- leetCodeLink: "https://leetcode.com/problems/cousins-in-binary-tree",
- solutionLink: "#"
- },
- {
- problemName: "994. Rotting Oranges",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/rotting-oranges",
- solutionLink: "/dsa-solutions/lc-solutions/0900-0999/rotting-oranges"
- },
- {
- problemName: "995. Minimum Number of K Consecutive Bit Flips",
- difficulty: "Hard",
- leetCodeLink: "https://leetcode.com/problems/minimum-number-of-k-consecutive-bit-flips",
- solutionLink: "#"
- },
- {
- problemName: "996. Number of Squareful Arrays",
- difficulty: "Hard",
- leetCodeLink: "https://leetcode.com/problems/number-of-squareful-arrays",
- solutionLink: "#"
- },
- {
- problemName: "997. Find the Town Judge",
- difficulty: "Easy",
- leetCodeLink: "https://leetcode.com/problems/find-the-town-judge",
- solutionLink: "/dsa-solutions/lc-solutions/0900-0999/find-the-town-judge"
- },
- {
- problemName: "998. Maximum Binary Tree II",
- difficulty: "Medium",
- leetCodeLink: "https://leetcode.com/problems/maximum-binary-tree-ii",
- solutionLink: "#"
- },
- {
- problemName: "999. Available Captures for Rook",
- difficulty: "Easy",
- leetCodeLink: "https://leetcode.com/problems/available-captures-for-rook",
- solutionLink: "#"
- }
-]
-
-
-
-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 LeetCode website. You can also click on the solution link to view the solution of the problem.
diff --git a/dsa-problems/leetcode-problems/1000-1099.md b/dsa-problems/leetcode-problems/1000-1099.md
deleted file mode 100644
index d371e2e1d..000000000
--- a/dsa-problems/leetcode-problems/1000-1099.md
+++ /dev/null
@@ -1,622 +0,0 @@
----
-id: 1000-1099
-title: LeetCode Problems 1000 - 1099
-sidebar_label: 1000 - 1099
-keywords:
- - LeetCode
- - LeetCode Problems
- - LeetCode Problems 1000 - 1099
- - DSA problems
----
-
-export const problems = [
- {
- "problemName": "1000. Minimum Cost to Merge Stones",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-cost-to-merge-stones",
- "solutionLink": "#"
- },
- {
- "problemName": "1001. Grid Illumination",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/grid-illumination",
- "solutionLink": "#"
- },
- {
- "problemName": "1002. Find Common Characters",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-common-characters",
- "solutionLink": "#"
- },
- {
- "problemName": "1003. Check If Word Is Valid After Substitutions",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/check-if-word-is-valid-after-substitutions",
- "solutionLink": "#"
- },
- {
- "problemName": "1004. Max Consecutive Ones III",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/max-consecutive-ones-iii",
- "solutionLink": "#"
- },
- {
- "problemName": "1005. Maximize Sum Of Array After K Negations",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/maximize-sum-of-array-after-k-negations",
- "solutionLink": "#"
- },
- {
- "problemName": "1006. Clumsy Factorial",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/clumsy-factorial",
- "solutionLink": "#"
- },
- {
- "problemName": "1007. Minimum Domino Rotations For Equal Row",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-domino-rotations-for-equal-row",
- "solutionLink": "#"
- },
- {
- "problemName": "1008. Construct Binary Search Tree from Preorder Traversal",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/construct-binary-search-tree-from-preorder-traversal",
- "solutionLink": "#"
- },
- {
- "problemName": "1009. Complement of Base 10 Integer",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/complement-of-base-10-integer",
- "solutionLink": "#"
- },
- {
- "problemName": "1010. Pairs of Songs With Total Durations Divisible by 60",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/pairs-of-songs-with-total-durations-divisible-by-60",
- "solutionLink": "#"
- },
- {
- "problemName": "1011. Capacity To Ship Packages Within D Days",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/capacity-to-ship-packages-within-d-days",
- "solutionLink": "#"
- },
- {
- "problemName": "1012. Numbers With Repeated Digits",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/numbers-with-repeated-digits",
- "solutionLink": "#"
- },
- {
- "problemName": "1013. Partition Array Into Three Parts With Equal Sum",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/partition-array-into-three-parts-with-equal-sum",
- "solutionLink": "#"
- },
- {
- "problemName": "1014. Best Sightseeing Pair",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/best-sightseeing-pair",
- "solutionLink": "#"
- },
- {
- "problemName": "1015. Smallest Integer Divisible by K",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/smallest-integer-divisible-by-k",
- "solutionLink": "#"
- },
- {
- "problemName": "1016. Binary String With Substrings Representing 1 To N",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/binary-string-with-substrings-representing-1-to-n",
- "solutionLink": "#"
- },
- {
- "problemName": "1017. Convert to Base -2",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/convert-to-base-2",
- "solutionLink": "#"
- },
- {
- "problemName": "1018. Binary Prefix Divisible By 5",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/binary-prefix-divisible-by-5",
- "solutionLink": "#"
- },
- {
- "problemName": "1019. Next Greater Node In Linked List",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/next-greater-node-in-linked-list",
- "solutionLink": "#"
- },
- {
- "problemName": "1020. Number of Enclaves",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-enclaves",
- "solutionLink": "#"
- },
- {
- "problemName": "1021. Remove Outermost Parentheses",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/remove-outermost-parentheses",
- "solutionLink": "#"
- },
- {
- "problemName": "1022. Sum of Root To Leaf Binary Numbers",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/sum-of-root-to-leaf-binary-numbers",
- "solutionLink": "#"
- },
- {
- "problemName": "1023. Camelcase Matching",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/camelcase-matching",
- "solutionLink": "#"
- },
- {
- "problemName": "1024. Video Stitching",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/video-stitching",
- "solutionLink": "#"
- },
- {
- "problemName": "1025. Divisor Game",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/divisor-game",
- "solutionLink": "#"
- },
- {
- "problemName": "1026. Maximum Difference Between Node and Ancestor",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-difference-between-node-and-ancestor",
- "solutionLink": "#"
- },
- {
- "problemName": "1027. Longest Arithmetic Subsequence",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/longest-arithmetic-subsequence",
- "solutionLink": "#"
- },
- {
- "problemName": "1028. Recover a Tree From Preorder Traversal",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/recover-a-tree-from-preorder-traversal",
- "solutionLink": "#"
- },
- {
- "problemName": "1029. Two City Scheduling",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/two-city-scheduling",
- "solutionLink": "#"
- },
- {
- "problemName": "1030. Matrix Cells in Distance Order",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/matrix-cells-in-distance-order",
- "solutionLink": "#"
- },
- {
- "problemName": "1031. Maximum Sum of Two Non-Overlapping Subarrays",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-sum-of-two-non-overlapping-subarrays",
- "solutionLink": "#"
- },
- {
- "problemName": "1032. Stream of Characters",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/stream-of-characters",
- "solutionLink": "#"
- },
- {
- "problemName": "1033. Moving Stones Until Consecutive",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/moving-stones-until-consecutive",
- "solutionLink": "#"
- },
- {
- "problemName": "1034. Coloring A Border",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/coloring-a-border",
- "solutionLink": "#"
- },
- {
- "problemName": "1035. Uncrossed Lines",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/uncrossed-lines",
- "solutionLink": "#"
- },
- {
- "problemName": "1036. Escape a Large Maze",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/escape-a-large-maze",
- "solutionLink": "#"
- },
- {
- "problemName": "1037. Valid Boomerang",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/valid-boomerang",
- "solutionLink": "#"
- },
- {
- "problemName": "1038. Binary Search Tree to Greater Sum Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/binary-search-tree-to-greater-sum-tree",
- "solutionLink": "/dsa-solutions/lc-solutions/1000-1099/binary-search-tree-to-greater-sum-tree"
- },
- {
- "problemName": "1039. Minimum Score Triangulation of Polygon",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-score-triangulation-of-polygon",
- "solutionLink": "#"
- },
- {
- "problemName": "1040. Moving Stones Until Consecutive II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/moving-stones-until-consecutive-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "1041. Robot Bounded In Circle",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/robot-bounded-in-circle",
- "solutionLink": "#"
- },
- {
- "problemName": "1042. Flower Planting With No Adjacent",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/flower-planting-with-no-adjacent",
- "solutionLink": "#"
- },
- {
- "problemName": "1043. Partition Array for Maximum Sum",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/partition-array-for-maximum-sum",
- "solutionLink": "#"
- },
- {
- "problemName": "1044. Longest Duplicate Substring",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/longest-duplicate-substring",
- "solutionLink": "#"
- },
- {
- "problemName": "1045. Customers Who Bought All Products",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/customers-who-bought-all-products",
- "solutionLink": "#"
- },
- {
- "problemName": "1046. Last Stone Weight",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/last-stone-weight",
- "solutionLink": "#"
- },
- {
- "problemName": "1047. Remove All Adjacent Duplicates In String",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string",
- "solutionLink": "#"
- },
- {
- "problemName": "1048. Longest String Chain",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/longest-string-chain",
- "solutionLink": "#"
- },
- {
- "problemName": "1049. Last Stone Weight II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/last-stone-weight-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "1050. Actors and Directors Who Cooperated At Least Three Times",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/actors-and-directors-who-cooperated-at-least-three-times",
- "solutionLink": "#"
- },
- {
- "problemName": "1051. Height Checker",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/height-checker",
- "solutionLink": "#"
- },
- {
- "problemName": "1052. Grumpy Bookstore Owner",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/grumpy-bookstore-owner",
- "solutionLink": "#"
- },
- {
- "problemName": "1053. Previous Permutation With One Swap",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/previous-permutation-with-one-swap",
- "solutionLink": "#"
- },
- {
- "problemName": "1054. Distant Barcodes",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/distant-barcodes",
- "solutionLink": "#"
- },
- {
- "problemName": "1055. Shortest Way to Form String",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/shortest-way-to-form-string",
- "solutionLink": "#"
- },
- {
- "problemName": "1056. Confusing Number",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/confusing-number",
- "solutionLink": "#"
- },
- {
- "problemName": "1057. Campus Bikes",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/campus-bikes",
- "solutionLink": "#"
- },
- {
- "problemName": "1058. Minimize Rounding Error to Meet Target",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimize-rounding-error-to-meet-target",
- "solutionLink": "#"
- },
- {
- "problemName": "1059. All Paths from Source Lead to Destination",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/all-paths-from-source-lead-to-destination",
- "solutionLink": "#"
- },
- {
- "problemName": "1060. Missing Element in Sorted Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/missing-element-in-sorted-array",
- "solutionLink": "#"
- },
- {
- "problemName": "1061. Lexicographically Smallest Equivalent String",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/lexicographically-smallest-equivalent-string",
- "solutionLink": "#"
- },
- {
- "problemName": "1062. Longest Repeating Substring",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/longest-repeating-substring",
- "solutionLink": "#"
- },
- {
- "problemName": "1063. Number of Valid Subarrays",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/number-of-valid-subarrays",
- "solutionLink": "#"
- },
- {
- "problemName": "1064. Fixed Point",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/fixed-point",
- "solutionLink": "#"
- },
- {
- "problemName": "1065. Index Pairs of a String",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/index-pairs-of-a-string",
- "solutionLink": "#"
- },
- {
- "problemName": "1066. Campus Bikes II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/campus-bikes-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "1067. Digit Count in Range",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/digit-count-in-range",
- "solutionLink": "#"
- },
- {
- "problemName": "1068. Product Sales Analysis I",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/product-sales-analysis-i",
- "solutionLink": "#"
- },
- {
- "problemName": "1069. Product Sales Analysis II",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/product-sales-analysis-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "1070. Product Sales Analysis III",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/product-sales-analysis-iii",
- "solutionLink": "#"
- },
- {
- "problemName": "1071. Greatest Common Divisor of Strings",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/greatest-common-divisor-of-strings",
- "solutionLink": "#"
- },
- {
- "problemName": "1072. Flip Columns For Maximum Number of Equal Rows",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/flip-columns-for-maximum-number-of-equal-rows",
- "solutionLink": "#"
- },
- {
- "problemName": "1073. Adding Two Negabinary Numbers",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/adding-two-negabinary-numbers",
- "solutionLink": "#"
- },
- {
- "problemName": "1074. Number of Submatrices That Sum to Target",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/number-of-submatrices-that-sum-to-target",
- "solutionLink": "#"
- },
- {
- "problemName": "1075. Project Employees I",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/project-employees-i",
- "solutionLink": "#"
- },
- {
- "problemName": "1076. Project Employees II",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/project-employees-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "1077. Project Employees III",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/project-employees-iii",
- "solutionLink": "#"
- },
- {
- "problemName": "1078. Occurrences After Bigram",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/occurrences-after-bigram",
- "solutionLink": "#"
- },
- {
- "problemName": "1079. Letter Tile Possibilities",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/letter-tile-possibilities",
- "solutionLink": "#"
- },
- {
- "problemName": "1080. Insufficient Nodes in Root to Leaf Paths",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/insufficient-nodes-in-root-to-leaf-paths",
- "solutionLink": "#"
- },
- {
- "problemName": "1081. Smallest Subsequence of Distinct Characters",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/smallest-subsequence-of-distinct-characters",
- "solutionLink": "#"
- },
- {
- "problemName": "1082. Sales Analysis I",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/sales-analysis-i",
- "solutionLink": "#"
- },
- {
- "problemName": "1083. Sales Analysis II",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/sales-analysis-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "1084. Sales Analysis III",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/sales-analysis-iii",
- "solutionLink": "#"
- },
- {
- "problemName": "1085. Sum of Digits in the Minimum Number",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/sum-of-digits-in-the-minimum-number",
- "solutionLink": "#"
- },
- {
- "problemName": "1086. High Five",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/high-five",
- "solutionLink": "#"
- },
- {
- "problemName": "1087. Brace Expansion",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/brace-expansion",
- "solutionLink": "#"
- },
- {
- "problemName": "1088. Confusing Number II",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/confusing-number-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "1089. Duplicate Zeros",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/duplicate-zeros",
- "solutionLink": "#"
- },
- {
- "problemName": "1090. Largest Values From Labels",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/largest-values-from-labels",
- "solutionLink": "#"
- },
- {
- "problemName": "1091. Shortest Path in Binary Matrix",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/shortest-path-in-binary-matrix",
- "solutionLink": "#"
- },
- {
- "problemName": "1092. Shortest Common Supersequence",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/shortest-common-supersequence",
- "solutionLink": "#"
- },
- {
- "problemName": "1093. Statistics from a Large Sample",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/statistics-from-a-large-sample",
- "solutionLink": "#"
- },
- {
- "problemName": "1094. Car Pooling",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/car-pooling",
- "solutionLink": "#"
- },
- {
- "problemName": "1095. Find in Mountain Array",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/find-in-mountain-array",
- "solutionLink": "#"
- },
- {
- "problemName": "1096. Brace Expansion II",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/brace-expansion-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "1097. Game Play Analysis V",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/game-play-analysis-v",
- "solutionLink": "#"
- },
- {
- "problemName": "1098. Unpopular Books",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/unpopular-books",
- "solutionLink": "#"
- },
- {
- "problemName": "1099. Two Sum Less Than K",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/two-sum-less-than-k",
- "solutionLink": "#"
- }
-]
-
-
-
-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 LeetCode website. You can also click on the solution link to view the solution of the problem.
\ No newline at end of file
diff --git a/dsa-problems/leetcode-problems/1100-1199.md b/dsa-problems/leetcode-problems/1100-1199.md
deleted file mode 100644
index c1d704aac..000000000
--- a/dsa-problems/leetcode-problems/1100-1199.md
+++ /dev/null
@@ -1,562 +0,0 @@
----
-id: 1100-1199
-title: LeetCode Problems 1100 - 1199
-sidebar_label: 1100 - 1199
-keywords:
- - LeetCode
- - LeetCode Problems
- - LeetCode Problems 1100 - 1199
- - DSA problems
----
-
-export const problems = [
- {
- "problemName": "1100. Find K-Length Substrings With No Repeated Characters",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-k-length-substrings-with-no-repeated-characters",
- "solutionLink": "#"
- },
- {
- "problemName": "1111. Maximum Nesting Depth of Two Valid Parentheses Strings",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-nesting-depth-of-two-valid-parentheses-strings",
- "solutionLink": "#"
- },
- {
- "problemName": "1112. Highest Grade For Each Student",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/highest-grade-for-each-student",
- "solutionLink": "#"
- },
- {
- "problemName": "1113. Reported Posts",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/reported-posts",
- "solutionLink": "#"
- },
- {
- "problemName": "1114. Print in Order",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/print-in-order",
- "solutionLink": "#"
- },
- {
- "problemName": "1115. Print FooBar Alternately",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/print-foobar-alternately",
- "solutionLink": "#"
- },
- {
- "problemName": "1116. Print Zero Even Odd",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/print-zero-even-odd",
- "solutionLink": "#"
- },
- {
- "problemName": "1117. Building H2O",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/building-h2o",
- "solutionLink": "#"
- },
- {
- "problemName": "1118. Number of Days in a Month",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/number-of-days-in-a-month",
- "solutionLink": "#"
- },
- {
- "problemName": "1119. Remove Vowels from a String",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/remove-vowels-from-a-string",
- "solutionLink": "#"
- },
- {
- "problemName": "1120. Maximum Average Subtree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-average-subtree",
- "solutionLink": "#"
- },
- {
- "problemName": "1121. Divide Array Into Increasing Sequences",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/divide-array-into-increasing-sequences",
- "solutionLink": "#"
- },
- {
- "problemName": "1122. Relative Sort Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/relative-sort-array",
- "solutionLink": "#"
- },
- {
- "problemName": "1123. Lowest Common Ancestor of Deepest Leaves",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/lowest-common-ancestor-of-deepest-leaves",
- "solutionLink": "#"
- },
- {
- "problemName": "1124. Longest Well-Performing Interval",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/longest-well-performing-interval",
- "solutionLink": "#"
- },
- {
- "problemName": "1125. Smallest Sufficient Team",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/smallest-sufficient-team",
- "solutionLink": "#"
- },
- {
- "problemName": "1126. Active Businesses",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/active-businesses",
- "solutionLink": "#"
- },
- {
- "problemName": "1127. User Purchase Platform",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/user-purchase-platform",
- "solutionLink": "#"
- },
- {
- "problemName": "1128. Number of Equivalent Domino Pairs",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/number-of-equivalent-domino-pairs",
- "solutionLink": "#"
- },
- {
- "problemName": "1129. Shortest Path with Alternating Colors",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/shortest-path-with-alternating-colors",
- "solutionLink": "/dsa-solutions/lc-solutions/1100-1200/shortest-path-with-allternating-colors"
- },
- {
- "problemName": "1130. Minimum Cost Tree From Leaf Values",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-cost-tree-from-leaf-values",
- "solutionLink": "#"
- },
- {
- "problemName": "1131. Maximum of Absolute Value Expression",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-of-absolute-value-expression",
- "solutionLink": "#"
- },
- {
- "problemName": "1132. Reported Posts",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/reported-posts",
- "solutionLink": "#"
- },
- {
- "problemName": "1133. Largest Unique Number",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/largest-unique-number",
- "solutionLink": "#"
- },
- {
- "problemName": "1134. Armstrong Number",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/armstrong-number",
- "solutionLink": "#"
- },
- {
- "problemName": "1135. Connecting Cities With Minimum Cost",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/connecting-cities-with-minimum-cost",
- "solutionLink": "#"
- },
- {
- "problemName": "1136. Parallel Courses",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/parallel-courses",
- "solutionLink": "#"
- },
- {
- "problemName": "1137. N-th Tribonacci Number",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/n-th-tribonacci-number",
- "solutionLink": "#"
- },
- {
- "problemName": "1138. Alphabet Board Path",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/alphabet-board-path",
- "solutionLink": "#"
- },
- {
- "problemName": "1139. Largest 1-Bordered Square",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/largest-1-bordered-square",
- "solutionLink": "#"
- },
- {
- "problemName": "1140. Stone Game II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/stone-game-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "1141. User Activity for the Past 30 Days I",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/user-activity-for-the-past-30-days-i",
- "solutionLink": "#"
- },
- {
- "problemName": "1142. User Activity for the Past 30 Days II",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/user-activity-for-the-past-30-days-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "1143. Longest Common Subsequence",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/longest-common-subsequence",
- "solutionLink": "/dsa-solutions/lc-solutions/1100-1199/longest common subsequence"
- },
- {
- "problemName": "1144. Decrease Elements To Make Array Zigzag",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/decrease-elements-to-make-array-zigzag",
- "solutionLink": "#"
- },
- {
- "problemName": "1145. Binary Tree Coloring Game",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/binary-tree-coloring-game",
- "solutionLink": "#"
- },
- {
- "problemName": "1146. Snapshot Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/snapshot-array",
- "solutionLink": "#"
- },
- {
- "problemName": "1147. Longest Chunked Palindrome Decomposition",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/longest-chunked-palindrome-decomposition",
- "solutionLink": "#"
- },
- {
- "problemName": "1148. Article Views I",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/article-views-i",
- "solutionLink": "#"
- },
- {
- "problemName": "1149. Article Views II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/article-views-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "1150. Check If a Number Is Majority Element in a Sorted Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/check-if-a-number-is-majority-element-in-a-sorted-array",
- "solutionLink": "#"
- },
- {
- "problemName": "1151. Minimum Swaps to Group All 1's Together",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-swaps-to-group-all-1s-together",
- "solutionLink": "#"
- },
- {
- "problemName": "1152. Analyze User Website Visit Pattern",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/analyze-user-website-visit-pattern",
- "solutionLink": "#"
- },
- {
- "problemName": "1153. String Transforms Into Another String",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/string-transforms-into-another-string",
- "solutionLink": "#"
- },
- {
- "problemName": "1154. Day of the Year",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/day-of-the-year",
- "solutionLink": "#"
- },
- {
- "problemName": "1155. Number of Dice Rolls With Target Sum",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-dice-rolls-with-target-sum",
- "solutionLink": "#"
- },
- {
- "problemName": "1156. Swap For Longest Repeated Character Substring",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/swap-for-longest-repeated-character-substring",
- "solutionLink": "#"
- },
- {
- "problemName": "1157. Online Majority Element In Subarray",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/online-majority-element-in-subarray",
- "solutionLink": "#"
- },
- {
- "problemName": "1158. Market Analysis I",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/market-analysis-i",
- "solutionLink": "#"
- },
- {
- "problemName": "1159. Market Analysis II",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/market-analysis-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "1160. Find Words That Can Be Formed by Characters",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-words-that-can-be-formed-by-characters",
- "solutionLink": "#"
- },
- {
- "problemName": "1161. Maximum Level Sum of a Binary Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-level-sum-of-a-binary-tree",
- "solutionLink": "/dsa-solutions/lc-solutions/1100-1199/maximum-level-sum-of-a-binary-tree"
- },
- {
- "problemName": "1162. As Far from Land as Possible",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/as-far-from-land-as-possible",
- "solutionLink": "#"
- },
- {
- "problemName": "1163. Last Substring in Lexicographical Order",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/last-substring-in-lexicographical-order",
- "solutionLink": "#"
- },
- {
- "problemName": "1164. Product Price at a Given Date",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/product-price-at-a-given-date",
- "solutionLink": "#"
- },
- {
- "problemName": "1165. Single-Row Keyboard",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/single-row-keyboard",
- "solutionLink": "#"
- },
- {
- "problemName": "1166. Design File System",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/design-file-system",
- "solutionLink": "#"
- },
- {
- "problemName": "1167. Minimum Cost to Connect Sticks",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-cost-to-connect-sticks",
- "solutionLink": "#"
- },
- {
- "problemName": "1168. Optimize Water Distribution in a Village",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/optimize-water-distribution-in-a-village",
- "solutionLink": "#"
- },
- {
- "problemName": "1169. Invalid Transactions",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/invalid-transactions",
- "solutionLink": "#"
- },
- {
- "problemName": "1170. Compare Strings by Frequency of the Smallest Character",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/compare-strings-by-frequency-of-the-smallest-character",
- "solutionLink": "#"
- },
- {
- "problemName": "1171. Remove Zero Sum Consecutive Nodes from Linked List",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/remove-zero-sum-consecutive-nodes-from-linked-list",
- "solutionLink": "#"
- },
- {
- "problemName": "1172. Dinner Plate Stacks",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/dinner-plate-stacks",
- "solutionLink": "#"
- },
- {
- "problemName": "1173. Immediate Food Delivery I",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/immediate-food-delivery-i",
- "solutionLink": "#"
- },
- {
- "problemName": "1174. Immediate Food Delivery II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/immediate-food-delivery-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "1175. Prime Arrangements",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/prime-arrangements",
- "solutionLink": "#"
- },
- {
- "problemName": "1176. Diet Plan Performance",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/diet-plan-performance",
- "solutionLink": "#"
- },
- {
- "problemName": "1177. Can Make Palindrome from Substring",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/can-make-palindrome-from-substring",
- "solutionLink": "#"
- },
- {
- "problemName": "1178. Number of Valid Words for Each Puzzle",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/number-of-valid-words-for-each-puzzle",
- "solutionLink": "#"
- },
- {
- "problemName": "1179. Reformat Department Table",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/reformat-department-table",
- "solutionLink": "#"
- },
- {
- "problemName": "1180. Count Substrings with Only One Distinct Letter",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/count-substrings-with-only-one-distinct-letter",
- "solutionLink": "#"
- },
- {
- "problemName": "1181. Before and After Puzzle",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/before-and-after-puzzle",
- "solutionLink": "#"
- },
- {
- "problemName": "1182. Shortest Distance to Target Color",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/shortest-distance-to-target-color",
- "solutionLink": "#"
- },
- {
- "problemName": "1183. Maximum Number of Ones",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-number-of-ones",
- "solutionLink": "#"
- },
- {
- "problemName": "1184. Distance Between Bus Stops",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/distance-between-bus-stops",
- "solutionLink": "#"
- },
- {
- "problemName": "1185. Day of the Week",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/day-of-the-week",
- "solutionLink": "#"
- },
- {
- "problemName": "1186. Maximum Subarray Sum with One Deletion",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-subarray-sum-with-one-deletion",
- "solutionLink": "#"
- },
- {
- "problemName": "1187. Make Array Strictly Increasing",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/make-array-strictly-increasing",
- "solutionLink": "#"
- },
- {
- "problemName": "1188. Design Bounded Blocking Queue",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/design-bounded-blocking-queue",
- "solutionLink": "#"
- },
- {
- "problemName": "1189. Maximum Number of Balloons",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/maximum-number-of-balloons",
- "solutionLink": "#"
- },
- {
- "problemName": "1190. Reverse Substrings Between Each Pair of Parentheses",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/reverse-substrings-between-each-pair-of-parentheses",
- "solutionLink": "/dsa-solutions/lc-solutions/1100-1199/reverse-substrings-between-each-pair-of-parentheses"
- },
- {
- "problemName": "1191. K-Concatenation Maximum Sum",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/k-concatenation-maximum-sum",
- "solutionLink": "#"
- },
- {
- "problemName": "1192. Critical Connections in a Network",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/critical-connections-in-a-network",
- "solutionLink": "#"
- },
- {
- "problemName": "1193. Monthly Transactions I",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/monthly-transactions-i",
- "solutionLink": "#"
- },
- {
- "problemName": "1194. Tournament Winners",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/tournament-winners",
- "solutionLink": "#"
- },
- {
- "problemName": "1195. Fizz Buzz Multithreaded",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/fizz-buzz-multithreaded",
- "solutionLink": "#"
- },
- {
- "problemName": "1196. How Many Apples Can You Put into the Basket",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/how-many-apples-can-you-put-into-the-basket",
- "solutionLink": "#"
- },
- {
- "problemName": "1197. Minimum Knight Moves",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-knight-moves",
- "solutionLink": "#"
- },
- {
- "problemName": "1198. Find Smallest Common Element in All Rows",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-smallest-common-element-in-all-rows",
- "solutionLink": "#"
- },
- {
- "problemName": "1199. Minimum Time to Build Blocks",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-time-to-build-blocks",
- "solutionLink": "#"
- }
-]
-
-
-
-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 LeetCode website. You can also click on the solution link to view the solution of the problem.
diff --git a/dsa-problems/leetcode-problems/1200-1299.md b/dsa-problems/leetcode-problems/1200-1299.md
deleted file mode 100644
index 47ccdc8a5..000000000
--- a/dsa-problems/leetcode-problems/1200-1299.md
+++ /dev/null
@@ -1,621 +0,0 @@
----
-id: 1200-1299
-title: LeetCode Problems 1200 - 1299
-sidebar_label: 1200 - 1299
-keywords:
- - LeetCode
- - LeetCode Problems
- - LeetCode Problems 1200 - 1299
- - DSA problems
----
-export const problems = [
- {
- "problemName": "1200. Minimum Absolute Difference",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/minimum-absolute-difference",
- "solutionLink": "/dsa-solutions/lc-solutions/1200-1299/minimum-absolute-difference"
- },
- {
- "problemName": "1201. Ugly Number III",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/ugly-number-iii",
- "solutionLink": "#"
- },
- {
- "problemName": "1202. Smallest String With Swaps",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/smallest-string-with-swaps",
- "solutionLink": "#"
- },
- {
- "problemName": "1203. Sort Items by Groups Respecting Dependencies",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/sort-items-by-groups-respecting-dependencies",
- "solutionLink": "#"
- },
- {
- "problemName": "1204. Last Person to Fit in the Elevator",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/last-person-to-fit-in-the-elevator",
- "solutionLink": "#"
- },
- {
- "problemName": "1205. Monthly Transactions I",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/monthly-transactions-i",
- "solutionLink": "#"
- },
- {
- "problemName": "1206. Design Skiplist",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/design-skiplist",
- "solutionLink": "#"
- },
- {
- "problemName": "1207. Unique Number of Occurrences",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/unique-number-of-occurrences",
- "solutionLink": "#"
- },
- {
- "problemName": "1208. Get Equal Substrings Within Budget",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/get-equal-substrings-within-budget",
- "solutionLink": "#"
- },
- {
- "problemName": "1209. Remove All Adjacent Duplicates in String II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "1210. Minimum Moves to Reach Target with Rotations",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-moves-to-reach-target-with-rotations",
- "solutionLink": "#"
- },
- {
- "problemName": "1211. Queries Quality and Percentage",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/queries-quality-and-percentage",
- "solutionLink": "#"
- },
- {
- "problemName": "1212. Team Scores in Football Tournament",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/team-scores-in-football-tournament",
- "solutionLink": "#"
- },
- {
- "problemName": "1213. Intersection of Three Sorted Arrays",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/intersection-of-three-sorted-arrays",
- "solutionLink": "#"
- },
- {
- "problemName": "1214. Two Sum BSTs",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/two-sum-bsts",
- "solutionLink": "#"
- },
- {
- "problemName": "1215. Stepping Numbers",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/stepping-numbers",
- "solutionLink": "#"
- },
- {
- "problemName": "1216. Valid Palindrome III",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/valid-palindrome-iii",
- "solutionLink": "#"
- },
- {
- "problemName": "1217. Play with Chips",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/play-with-chips",
- "solutionLink": "#"
- },
- {
- "problemName": "1218. Longest Arithmetic Subsequence of Given Difference",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/longest-arithmetic-subsequence-of-given-difference",
- "solutionLink": "#"
- },
- {
- "problemName": "1219. Path with Maximum Gold",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/path-with-maximum-gold",
- "solutionLink": "#"
- },
- {
- "problemName": "1220. Count Vowels Permutation",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-vowels-permutation",
- "solutionLink": "#"
- },
- {
- "problemName": "1221. Split a String in Balanced Strings",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/split-a-string-in-balanced-strings",
- "solutionLink": "#"
- },
- {
- "problemName": "1222. Queens That Can Attack the King",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/queens-that-can-attack-the-king",
- "solutionLink": "#"
- },
- {
- "problemName": "1223. Dice Roll Simulation",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/dice-roll-simulation",
- "solutionLink": "#"
- },
- {
- "problemName": "1224. Maximum Equal Frequency",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-equal-frequency",
- "solutionLink": "#"
- },
- {
- "problemName": "1225. Report Contiguous Dates",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/report-contiguous-dates",
- "solutionLink": "#"
- },
- {
- "problemName": "1226. The Dining Philosophers",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/the-dining-philosophers",
- "solutionLink": "#"
- },
- {
- "problemName": "1227. Airplane Seat Assignment Probability",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/airplane-seat-assignment-probability",
- "solutionLink": "#"
- },
- {
- "problemName": "1228. Missing Number In Arithmetic Progression",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/missing-number-in-arithmetic-progression",
- "solutionLink": "#"
- },
- {
- "problemName": "1229. Meeting Scheduler",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/meeting-scheduler",
- "solutionLink": "#"
- },
- {
- "problemName": "1230. Toss Strange Coins",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/toss-strange-coins",
- "solutionLink": "#"
- },
- {
- "problemName": "1231. Divide Chocolate",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/divide-chocolate",
- "solutionLink": "#"
- },
- {
- "problemName": "1232. Check If It Is a Straight Line",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/check-if-it-is-a-straight-line",
- "solutionLink": "/dsa-solutions/lc-solutions/1200-1299/check-if-it-is-a-straight-line"
- },
- {
- "problemName": "1233. Remove Sub-Folders from the Filesystem",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/remove-sub-folders-from-the-filesystem",
- "solutionLink": "#"
- },
- {
- "problemName": "1234. Replace the Substring for Balanced String",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/replace-the-substring-for-balanced-string",
- "solutionLink": "#"
- },
- {
- "problemName": "1235. Maximum Profit in Job Scheduling",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-profit-in-job-scheduling",
- "solutionLink": "#"
- },
- {
- "problemName": "1236. Web Crawler",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/web-crawler",
- "solutionLink": "#"
- },
- {
- "problemName": "1237. Find Positive Integer Solution for a Given Equation",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-positive-integer-solution-for-a-given-equation",
- "solutionLink": "#"
- },
- {
- "problemName": "1238. Circular Permutation in Binary Representation",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/circular-permutation-in-binary-representation",
- "solutionLink": "#"
- },
- {
- "problemName": "1239. Maximum Length of a Concatenated String with Unique Characters",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-length-of-a-concatenated-string-with-unique-characters",
- "solutionLink": "#"
- },
- {
- "problemName": "1240. Tiling a Rectangle with the Fewest Squares",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/tiling-a-rectangle-with-the-fewest-squares",
- "solutionLink": "#"
- },
- {
- "problemName": "1241. Number of Comments per Post",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/number-of-comments-per-post",
- "solutionLink": "#"
- },
- {
- "problemName": "1242. Web Crawler Multithreaded",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/web-crawler-multithreaded",
- "solutionLink": "#"
- },
- {
- "problemName": "1243. Array Transformation",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/array-transformation",
- "solutionLink": "#"
- },
- {
- "problemName": "1244. Design A Leaderboard",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/design-a-leaderboard",
- "solutionLink": "#"
- },
- {
- "problemName": "1245. Tree Diameter",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/tree-diameter",
- "solutionLink": "#"
- },
- {
- "problemName": "1246. Palindrome Removal",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/palindrome-removal",
- "solutionLink": "#"
- },
- {
- "problemName": "1247. Minimum Swaps to Make Strings Equal",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-swaps-to-make-strings-equal",
- "solutionLink": "#"
- },
- {
- "problemName": "1248. Count Number of Nice Subarrays",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-number-of-nice-subarrays",
- "solutionLink": "/dsa-solutions/lc-solutions/1200-1299/count-number-of-nice-subarrays"
- },
- {
- "problemName": "1249. Minimum Remove to Make Valid Parentheses",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-remove-to-make-valid-parentheses",
- "solutionLink": "#"
- },
- {
- "problemName": "1250. Check If It Is a Good Array",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/check-if-it-is-a-good-array",
- "solutionLink": "#"
- },
- {
- "problemName": "1251. Average Selling Price",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/average-selling-price",
- "solutionLink": "#"
- },
- {
- "problemName": "1252. Cells with Odd Values in a Matrix",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/cells-with-odd-values-in-a-matrix",
- "solutionLink": "#"
- },
- {
- "problemName": "1253. Reconstruct a 2-Row Binary Matrix",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/reconstruct-a-2-row-binary-matrix",
- "solutionLink": "#"
- },
- {
- "problemName": "1254. Number of Closed Islands",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-closed-islands",
- "solutionLink": "#"
- },
- {
- "problemName": "1255. Maximum Score Words Formed by Letters",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-score-words-formed-by-letters",
- "solutionLink": "#"
- },
- {
- "problemName": "1256. Encode Number",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/encode-number",
- "solutionLink": "#"
- },
- {
- "problemName": "1257. Smallest Common Region",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/smallest-common-region",
- "solutionLink": "#"
- },
- {
- "problemName": "1258. Synonymous Sentences",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/synonymous-sentences",
- "solutionLink": "#"
- },
- {
- "problemName": "1259. Handshakes That Don't Cross",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/handshakes-that-dont-cross",
- "solutionLink": "#"
- },
- {
- "problemName": "1260. Shift 2D Grid",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/shift-2d-grid",
- "solutionLink": "#"
- },
- {
- "problemName": "1261. Find Elements in a Contaminated Binary Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-elements-in-a-contaminated-binary-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "1262. Greatest Sum Divisible by Three",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/greatest-sum-divisible-by-three",
- "solutionLink": "#"
- },
- {
- "problemName": "1263. Minimum Moves to Move a Box to Their Target Location",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-moves-to-move-a-box-to-their-target-location",
- "solutionLink": "#"
- },
- {
- "problemName": "1264. Page Recommendations",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/page-recommendations",
- "solutionLink": "#"
- },
- {
- "problemName": "1265. Print Immutable Linked List in Reverse",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/print-immutable-linked-list-in-reverse",
- "solutionLink": "#"
- },
- {
- "problemName": "1266. Minimum Time Visiting All Points",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/minimum-time-visiting-all-points",
- "solutionLink": "#"
- },
- {
- "problemName": "1267. Count Servers that Communicate",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-servers-that-communicate",
- "solutionLink": "#"
- },
- {
- "problemName": "1268. Search Suggestions System",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/search-suggestions-system",
- "solutionLink": "#"
- },
- {
- "problemName": "1269. Number of Ways to Stay in the Same Place After Some Steps",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/number-of-ways-to-stay-in-the-same-place-after-some-steps",
- "solutionLink": "#"
- },
- {
- "problemName": "1270. All People Report to the Given Manager",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/all-people-report-to-the-given-manager",
- "solutionLink": "#"
- },
- {
- "problemName": "1271. Hexspeak",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/hexspeak",
- "solutionLink": "#"
- },
- {
- "problemName": "1272. Remove Interval",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/remove-interval",
- "solutionLink": "#"
- },
- {
- "problemName": "1273. Delete Tree Nodes",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/delete-tree-nodes",
- "solutionLink": "#"
- },
- {
- "problemName": "1274. Number of Ships in a Rectangle",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/number-of-ships-in-a-rectangle",
- "solutionLink": "#"
- },
- {
- "problemName": "1275. Find Winner on a Tic Tac Toe Game",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-winner-on-a-tic-tac-toe-game",
- "solutionLink": "#"
- },
- {
- "problemName": "1276. Number of Burgers with No Waste of Ingredients",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-burgers-with-no-waste-of-ingredients",
- "solutionLink": "#"
- },
- {
- "problemName": "1277. Count Square Submatrices with All Ones",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-square-submatrices-with-all-ones",
- "solutionLink": "#"
- },
- {
- "problemName": "1278. Palindrome Partitioning III",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/palindrome-partitioning-iii",
- "solutionLink": "#"
- },
- {
- "problemName": "1279. Traffic Light Controlled Intersection",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/traffic-light-controlled-intersection",
- "solutionLink": "#"
- },
- {
- "problemName": "1280. Students and Examinations",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/students-and-examinations",
- "solutionLink": "#"
- },
- {
- "problemName": "1281. Subtract the Product and Sum of Digits of an Integer",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/subtract-the-product-and-sum-of-digits-of-an-integer",
- "solutionLink": "#"
- },
- {
- "problemName": "1282. Group the People Given the Group Size They Belong To",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/group-the-people-given-the-group-size-they-belong-to",
- "solutionLink": "#"
- },
- {
- "problemName": "1283. Find the Smallest Divisor Given a Threshold",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-the-smallest-divisor-given-a-threshold",
- "solutionLink": "#"
- },
- {
- "problemName": "1284. Minimum Number of Flips to Convert Binary Matrix to Zero Matrix",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-number-of-flips-to-convert-binary-matrix-to-zero-matrix",
- "solutionLink": "#"
- },
- {
- "problemName": "1285. Find the Start and End Number of Continuous Ranges",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-the-start-and-end-number-of-continuous-ranges",
- "solutionLink": "#"
- },
- {
- "problemName": "1286. Iterator for Combination",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/iterator-for-combination",
- "solutionLink": "#"
- },
- {
- "problemName": "1287. Element Appearing More Than 25% In Sorted Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/element-appearing-more-than-25-in-sorted-array",
- "solutionLink": "#"
- },
- {
- "problemName": "1288. Remove Covered Intervals",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/remove-covered-intervals",
- "solutionLink": "/dsa-solutions/lc-solutions/1200-1299/remove-covered-intervals"
- },
- {
- "problemName": "1289. Minimum Falling Path Sum II",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-falling-path-sum-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "1290. Convert Binary Number in a Linked List to Integer",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/convert-binary-number-in-a-linked-list-to-integer",
- "solutionLink": "#"
- },
- {
- "problemName": "1291. Sequential Digits",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/sequential-digits",
- "solutionLink": "#"
- },
- {
- "problemName": "1292. Maximum Side Length of a Square with Sum Less than or Equal to Threshold",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-side-length-of-a-square-with-sum-less-than-or-equal-to-threshold",
- "solutionLink": "#"
- },
- {
- "problemName": "1293. Shortest Path in a Grid with Obstacles Elimination",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/shortest-path-in-a-grid-with-obstacles-elimination",
- "solutionLink": "#"
- },
- {
- "problemName": "1294. Weather Type in Each Country",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/weather-type-in-each-country",
- "solutionLink": "#"
- },
- {
- "problemName": "1295. Find Numbers with Even Number of Digits",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-numbers-with-even-number-of-digits",
- "solutionLink": "#"
- },
- {
- "problemName": "1296. Divide Array in Sets of K Consecutive Numbers",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/divide-array-in-sets-of-k-consecutive-numbers",
- "solutionLink": "#"
- },
- {
- "problemName": "1297. Maximum Number of Occurrences of a Substring",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-number-of-occurrences-of-a-substring",
- "solutionLink": "#"
- },
- {
- "problemName": "1298. Maximum Candies You Can Get from Boxes",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-candies-you-can-get-from-boxes",
- "solutionLink": "#"
- },
- {
- "problemName": "1299. Replace Elements with Greatest Element on Right Side",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/replace-elements-with-greatest-element-on-right-side",
- "solutionLink": "#"
- }
-]
-
-
-
-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 LeetCode website. You can also click on the solution link to view the solution of the problem.
\ No newline at end of file
diff --git a/dsa-problems/leetcode-problems/1300-1399.md b/dsa-problems/leetcode-problems/1300-1399.md
deleted file mode 100644
index 424d1f5cb..000000000
--- a/dsa-problems/leetcode-problems/1300-1399.md
+++ /dev/null
@@ -1,622 +0,0 @@
----
-id: 1300-1399
-title: LeetCode Problems 1300 - 1399
-sidebar_label: 1300 - 1399
-keywords:
- - LeetCode
- - LeetCode Problems
- - LeetCode Problems 1300 - 1399
- - DSA problems
----
-
-export const problems = [
- {
- "problemName": "1300. Sum of Mutated Array Closest to Target",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/sum-of-mutated-array-closest-to-target",
- "solutionLink": "#"
- },
- {
- "problemName": "1301. Number of Paths with Max Score",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/number-of-paths-with-max-score",
- "solutionLink": "#"
- },
- {
- "problemName": "1302. Deepest Leaves Sum",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/deepest-leaves-sum",
- "solutionLink": "/dsa-solutions/lc-solutions/1300-1399/1302-Deepest-Leaves-Sum"
- },
- {
- "problemName": "1303. Find the Team Size",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-the-team-size",
- "solutionLink": "#"
- },
- {
- "problemName": "1304. Find N Unique Integers Sum up to Zero",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-n-unique-integers-sum-up-to-zero",
- "solutionLink": "#"
- },
- {
- "problemName": "1305. All Elements in Two Binary Search Trees",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/all-elements-in-two-binary-search-trees",
- "solutionLink": "/dsa-solutions/lc-solutions/1300-1399/all-elements-in-two-binary-search-trees"
- },
- {
- "problemName": "1306. Jump Game III",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/jump-game-iii",
- "solutionLink": "#"
- },
- {
- "problemName": "1307. Verbal Arithmetic Puzzle",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/verbal-arithmetic-puzzle",
- "solutionLink": "#"
- },
- {
- "problemName": "1308. Running Total for Different Genders",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/running-total-for-different-genders",
- "solutionLink": "#"
- },
- {
- "problemName": "1309. Decrypt String from Alphabet to Integer Mapping",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/decrypt-string-from-alphabet-to-integer-mapping",
- "solutionLink": "#"
- },
- {
- "problemName": "1310. XOR Queries of a Subarray",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/xor-queries-of-a-subarray",
- "solutionLink": "/dsa-solutions/lc-solutions/1300-1399/xor-queries-of-a-subarray"
- },
- {
- "problemName": "1311. Get Watched Videos by Your Friends",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/get-watched-videos-by-your-friends",
- "solutionLink": "#"
- },
- {
- "problemName": "1312. Minimum Insertion Steps to Make a String Palindrome",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-insertion-steps-to-make-a-string-palindrome",
- "solutionLink": "#"
- },
- {
- "problemName": "1313. Decompress Run-Length Encoded List",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/decompress-run-length-encoded-list",
- "solutionLink": "#"
- },
- {
- "problemName": "1314. Matrix Block Sum",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/matrix-block-sum",
- "solutionLink": "#"
- },
- {
- "problemName": "1315. Sum of Nodes with Even-Valued Grandparent",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/sum-of-nodes-with-even-valued-grandparent",
- "solutionLink": "#"
- },
- {
- "problemName": "1316. Distinct Echo Substrings",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/distinct-echo-substrings",
- "solutionLink": "#"
- },
- {
- "problemName": "1317. Convert Integer to the Sum of Two No-Zero Integers",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/convert-integer-to-the-sum-of-two-no-zero-integers",
- "solutionLink": "#"
- },
- {
- "problemName": "1318. Minimum Flips to Make a OR b Equal to c",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-flips-to-make-a-or-b-equal-to-c",
- "solutionLink": "#"
- },
- {
- "problemName": "1319. Number of Operations to Make Network Connected",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-operations-to-make-network-connected",
- "solutionLink": "#"
- },
- {
- "problemName": "1320. Minimum Distance to Type a Word Using Two Fingers",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-distance-to-type-a-word-using-two-fingers",
- "solutionLink": "#"
- },
- {
- "problemName": "1321. Restaurant Growth",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/restaurant-growth",
- "solutionLink": "#"
- },
- {
- "problemName": "1322. Ads Performance",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/ads-performance",
- "solutionLink": "#"
- },
- {
- "problemName": "1323. Maximum 69 Number",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/maximum-69-number",
- "solutionLink": "#"
- },
- {
- "problemName": "1324. Print Words Vertically",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/print-words-vertically",
- "solutionLink": "#"
- },
- {
- "problemName": "1325. Delete Leaves With a Given Value",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/delete-leaves-with-a-given-value",
- "solutionLink": "#"
- },
- {
- "problemName": "1326. Minimum Number of Taps to Open to Water a Garden",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-number-of-taps-to-open-to-water-a-garden",
- "solutionLink": "#"
- },
- {
- "problemName": "1327. List the Products Ordered in a Period",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/list-the-products-ordered-in-a-period",
- "solutionLink": "#"
- },
- {
- "problemName": "1328. Break a Palindrome",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/break-a-palindrome",
- "solutionLink": "#"
- },
- {
- "problemName": "1329. Sort the Matrix Diagonally",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/sort-the-matrix-diagonally",
- "solutionLink": "#"
- },
- {
- "problemName": "1330. Reverse Subarray To Maximize Array Value",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/reverse-subarray-to-maximize-array-value",
- "solutionLink": "#"
- },
- {
- "problemName": "1331. Rank Transform of an Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/rank-transform-of-an-array",
- "solutionLink": "#"
- },
- {
- "problemName": "1332. Remove Palindromic Subsequences",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/remove-palindromic-subsequences",
- "solutionLink": "#"
- },
- {
- "problemName": "1333. Filter Restaurants by Vegan-Friendly, Price and Distance",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/filter-restaurants-by-vegan-friendly-price-and-distance",
- "solutionLink": "#"
- },
- {
- "problemName": "1334. Find the City With the Smallest Number of Neighbors at a Threshold Distance",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance",
- "solutionLink": "#"
- },
- {
- "problemName": "1335. Minimum Difficulty of a Job Schedule",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-difficulty-of-a-job-schedule",
- "solutionLink": "#"
- },
- {
- "problemName": "1336. Number of Transactions per Visit",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/number-of-transactions-per-visit",
- "solutionLink": "#"
- },
- {
- "problemName": "1337. The K Weakest Rows in a Matrix",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/the-k-weakest-rows-in-a-matrix",
- "solutionLink": "#"
- },
- {
- "problemName": "1338. Reduce Array Size to The Half",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/reduce-array-size-to-the-half",
- "solutionLink": "#"
- },
- {
- "problemName": "1339. Maximum Product of Splitted Binary Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-product-of-splitted-binary-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "1340. Jump Game V",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/jump-game-v",
- "solutionLink": "#"
- },
- {
- "problemName": "1341. The K Weakest Rows in a Matrix",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/the-k-weakest-rows-in-a-matrix",
- "solutionLink": "#"
- },
- {
- "problemName": "1342. Reduce Array Size to The Half",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/reduce-array-size-to-the-half",
- "solutionLink": "#"
- },
- {
- "problemName": "1343. Maximum Product of Splitted Binary Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-product-of-splitted-binary-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "1344. Jump Game V",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/jump-game-v",
- "solutionLink": "#"
- },
- {
- "problemName": "1345. List the Products Ordered in a Period",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/list-the-products-ordered-in-a-period",
- "solutionLink": "#"
- },
- {
- "problemName": "1346. Break a Palindrome",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/break-a-palindrome",
- "solutionLink": "#"
- },
- {
- "problemName": "1347. Sort the Matrix Diagonally",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/sort-the-matrix-diagonally",
- "solutionLink": "#"
- },
- {
- "problemName": "1348. Reverse Subarray To Maximize Array Value",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/reverse-subarray-to-maximize-array-value",
- "solutionLink": "#"
- },
- {
- "problemName": "1349. Rank Transform of an Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/rank-transform-of-an-array",
- "solutionLink": "#"
- },
- {
- "problemName": "1350. Remove Palindromic Subsequences",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/remove-palindromic-subsequences",
- "solutionLink": "#"
- },
- {
- "problemName": "1351. Filter Restaurants by Vegan-Friendly, Price and Distance",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/filter-restaurants-by-vegan-friendly-price-and-distance",
- "solutionLink": "#"
- },
- {
- "problemName": "1352. Find the City With the Smallest Number of Neighbors at a Threshold Distance",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance",
- "solutionLink": "#"
- },
- {
- "problemName": "1353. Minimum Difficulty of a Job Schedule",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-difficulty-of-a-job-schedule",
- "solutionLink": "#"
- },
- {
- "problemName": "1354. Number of Transactions per Visit",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/number-of-transactions-per-visit",
- "solutionLink": "#"
- },
- {
- "problemName": "1355. The K Weakest Rows in a Matrix",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/the-k-weakest-rows-in-a-matrix",
- "solutionLink": "#"
- },
- {
- "problemName": "1356. Reduce Array Size to The Half",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/reduce-array-size-to-the-half",
- "solutionLink": "#"
- },
- {
- "problemName": "1357. Maximum Product of Splitted Binary Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-product-of-splitted-binary-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "1358. Jump Game V",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/jump-game-v",
- "solutionLink": "#"
- },
- {
- "problemName": "1359. List the Products Ordered in a Period",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/list-the-products-ordered-in-a-period",
- "solutionLink": "#"
- },
- {
- "problemName": "1360. Break a Palindrome",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/break-a-palindrome",
- "solutionLink": "#"
- },
- {
- "problemName": "1361. Sort the Matrix Diagonally",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/sort-the-matrix-diagonally",
- "solutionLink": "#"
- },
- {
- "problemName": "1362. Reverse Subarray To Maximize Array Value",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/reverse-subarray-to-maximize-array-value",
- "solutionLink": "#"
- },
- {
- "problemName": "1363. Rank Transform of an Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/rank-transform-of-an-array",
- "solutionLink": "#"
- },
- {
- "problemName": "1364. Remove Palindromic Subsequences",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/remove-palindromic-subsequences",
- "solutionLink": "#"
- },
- {
- "problemName": "1365. Filter Restaurants by Vegan-Friendly, Price and Distance",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/filter-restaurants-by-vegan-friendly-price-and-distance",
- "solutionLink": "#"
- },
- {
- "problemName": "1366. Find the City With the Smallest Number of Neighbors at a Threshold Distance",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance",
- "solutionLink": "#"
- },
- {
- "problemName": "1367. Minimum Difficulty of a Job Schedule",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-difficulty-of-a-job-schedule",
- "solutionLink": "#"
- },
- {
- "problemName": "1368. Number of Transactions per Visit",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/number-of-transactions-per-visit",
- "solutionLink": "#"
- },
- {
- "problemName": "1369. The K Weakest Rows in a Matrix",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/the-k-weakest-rows-in-a-matrix",
- "solutionLink": "#"
- },
- {
- "problemName": "1370. Reduce Array Size to The Half",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/reduce-array-size-to-the-half",
- "solutionLink": "#"
- },
- {
- "problemName": "1371. Find the Longest Substring Containing Vowels in Even Counts",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-the-longest-substring-containing-vowels-in-even-counts",
- "solutionLink": "#"
- },
- {
- "problemName": "1372. Longest ZigZag Path in a Binary Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/longest-zigzag-path-in-a-binary-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "1373. Maximum Sum BST in Binary Tree",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-sum-bst-in-binary-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "1374. Generate a String With Characters That Have Odd Counts",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/generate-a-string-with-characters-that-have-odd-counts",
- "solutionLink": "#"
- },
- {
- "problemName": "1375. Bulb Switcher III",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/bulb-switcher-iii",
- "solutionLink": "#"
- },
- {
- "problemName": "1376. Time Needed to Inform All Employees",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/time-needed-to-inform-all-employees",
- "solutionLink": "#"
- },
- {
- "problemName": "1377. Frog Position After T Seconds",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/frog-position-after-t-seconds",
- "solutionLink": "#"
- },
- {
- "problemName": "1378. Replace Elements with Greatest Element on Right Side",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/replace-elements-with-greatest-element-on-right-side",
- "solutionLink": "#"
- },
- {
- "problemName": "1379. Find a Corresponding Node of a Binary Tree in a Clone of That Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-a-corresponding-node-of-a-binary-tree-in-a-clone-of-that-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "1380. Lucky Numbers in a Matrix",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/lucky-numbers-in-a-matrix",
- "solutionLink": "#"
- },
- {
- "problemName": "1381. Design a Stack With Increment Operation",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/design-a-stack-with-increment-operation",
- "solutionLink": "#"
- },
- {
- "problemName": "1382. Balance a Binary Search Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/balance-a-binary-search-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "1383. Maximum Performance of a Team",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-performance-of-a-team",
- "solutionLink": "#"
- },
- {
- "problemName": "1384. Count Good Nodes in Binary Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-good-nodes-in-binary-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "1385. Find the Distance Value Between Two Arrays",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-the-distance-value-between-two-arrays",
- "solutionLink": "#"
- },
- {
- "problemName": "1386. Cinema Seat Allocation",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/cinema-seat-allocation",
- "solutionLink": "#"
- },
- {
- "problemName": "1387. Sort Integers by The Power Value",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/sort-integers-by-the-power-value",
- "solutionLink": "#"
- },
- {
- "problemName": "1388. Pizza With 3n Slices",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/pizza-with-3n-slices",
- "solutionLink": "#"
- },
- {
- "problemName": "1389. Create Target Array in the Given Order",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/create-target-array-in-the-given-order",
- "solutionLink": "#"
- },
- {
- "problemName": "1390. Four Divisors",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/four-divisors",
- "solutionLink": "#"
- },
- {
- "problemName": "1391. Check if There is a Valid Path in a Grid",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/check-if-there-is-a-valid-path-in-a-grid",
- "solutionLink": "#"
- },
- {
- "problemName": "1392. Longest Happy Prefix",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/longest-happy-prefix",
- "solutionLink": "#"
- },
- {
- "problemName": "1393. Capital Gain/Loss",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/capital-gainloss",
- "solutionLink": "#"
- },
- {
- "problemName": "1394. Find Lucky Integer in an Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-lucky-integer-in-an-array",
- "solutionLink": "#"
- },
- {
- "problemName": "1395. Count Number of Teams",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-number-of-teams",
- "solutionLink": "#"
- },
- {
- "problemName": "1396. Design Underground System",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/design-underground-system",
- "solutionLink": "#"
- },
- {
- "problemName": "1397. Find All Good Strings",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/find-all-good-strings",
- "solutionLink": "#"
- },
- {
- "problemName": "1398. Customers Who Bought Products A and B but Not C",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/customers-who-bought-products-a-and-b-but-not-c",
- "solutionLink": "#"
- },
- {
- "problemName": "1399. Count Largest Group",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/count-largest-group",
- "solutionLink": "#"
- }
-]
-
-
-
-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 LeetCode website. You can also click on the solution link to view the solution of the problem.
diff --git a/dsa-problems/leetcode-problems/1400-1499.md b/dsa-problems/leetcode-problems/1400-1499.md
deleted file mode 100644
index 222c015e0..000000000
--- a/dsa-problems/leetcode-problems/1400-1499.md
+++ /dev/null
@@ -1,622 +0,0 @@
----
-id: 1400-1499
-title: LeetCode Problems 1400 - 1499
-sidebar_label: 1400 - 1499
-keywords:
- - LeetCode
- - LeetCode Problems
- - LeetCode Problems 1400 - 1499
- - DSA problems
----
-
-export const problems = [
- {
- "problemName": "1400. Construct K Palindrome Strings",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/construct-k-palindrome-strings",
- "solutionLink": "#"
- },
- {
- "problemName": "1401. Circle and Rectangle Overlapping",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/circle-and-rectangle-overlapping",
- "solutionLink": "#"
- },
- {
- "problemName": "1402. Reducing Dishes",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/reducing-dishes",
- "solutionLink": "/dsa-solutions/lc-solutions/1400-1500/reducing-dishes"
- },
- {
- "problemName": "1403. Minimum Subsequence in Non-Increasing Order",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/minimum-subsequence-in-non-increasing-order",
- "solutionLink": "#"
- },
- {
- "problemName": "1404. Number of Steps to Reduce a Number in binary representation to one",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-steps-to-reduce-a-number-in-binary-representation-to-one",
- "solutionLink": "#"
- },
- {
- "problemName": "1405. Longest Happy String",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/longest-happy-string",
- "solutionLink": "#"
- },
- {
- "problemName": "1406. Stone Game III",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/stone-game-iii",
- "solutionLink": "#"
- },
- {
- "problemName": "1407. Top Travellers",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/top-travellers",
- "solutionLink": "#"
- },
- {
- "problemName": "1408. String Matching in an Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/string-matching-in-an-array",
- "solutionLink": "#"
- },
- {
- "problemName": "1409. Queries on a Permutation With Key",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/queries-on-a-permutation-with-key",
- "solutionLink": "#"
- },
- {
- "problemName": "1410. HTML Entity Parser",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/html-entity-parser",
- "solutionLink": "#"
- },
- {
- "problemName": "1411. Number of Ways to Paint N × 3 Grid",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/number-of-ways-to-paint-n-3-grid",
- "solutionLink": "#"
- },
- {
- "problemName": "1412. Find the Quiet Students in All Exams",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/find-the-quiet-students-in-all-exams",
- "solutionLink": "#"
- },
- {
- "problemName": "1413. Minimum Value to Get Positive Step by Step Sum",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/minimum-value-to-get-positive-step-by-step-sum",
- "solutionLink": "#"
- },
- {
- "problemName": "1414. Find the Minimum Number of Fibonacci Numbers Whose Sum Is K",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-the-minimum-number-of-fibonacci-numbers-whose-sum-is-k",
- "solutionLink": "#"
- },
- {
- "problemName": "1415. The k-th Lexicographical String of All Happy Strings of Length n",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/the-k-th-lexicographical-string-of-all-happy-strings-of-length-n",
- "solutionLink": "#"
- },
- {
- "problemName": "1416. Restore The Array",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/restore-the-array",
- "solutionLink": "#"
- },
- {
- "problemName": "1417. Reformat The String",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/reformat-the-string",
- "solutionLink": "#"
- },
- {
- "problemName": "1418. Display Table of Food Orders in a Restaurants",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/display-table-of-food-orders-in-a-restaurant",
- "solutionLink": "#"
- },
- {
- "problemName": "1419. Minimum Number of Frogs Croaking",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-number-of-frogs-croaking",
- "solutionLink": "#"
- },
- {
- "problemName": "1420. Build Array Where You Can Find The maximum exactly k comparisons",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/build-array-where-you-can-find-the-maximum-exactly-k-comparisons",
- "solutionLink": "#"
- },
- {
- "problemName": "1421. NPV Queries",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/npv-queries",
- "solutionLink": "#"
- },
- {
- "problemName": "1422. Maximum Score After Splitting a String",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/maximum-score-after-splitting-a-string",
- "solutionLink": "#"
- },
- {
- "problemName": "1423. Maximum Points You Can Obtain from",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-points-you-can-obtain-from-cards",
- "solutionLink": "#"
- },
- {
- "problemName": "1424. Diagonal Traverse II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/diagonal-traverse-ii",
- "solutionLink": "/dsa-solutions/lc-solutions/1400-1499/diagonal-traverse-ii"
- },
- {
- "problemName": "1425. Constrained Subsequence Sum",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/constrained-subsequence-sum",
- "solutionLink": "#"
- },
- {
- "problemName": "1426. Counting Elements",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/counting-elements",
- "solutionLink": "#"
- },
- {
- "problemName": "1427. Perform String Shifts",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/perform-string-shifts",
- "solutionLink": "#"
- },
- {
- "problemName": "1428. Leftmost Column with at least a one",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/leftmost-column-with-at-least-a-one",
- "solutionLink": "#"
- },
- {
- "problemName": "1429. First Unique Number",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/first-unique-number",
- "solutionLink": "#"
- },
- {
- "problemName": "1430. Check If a String Is a Valid Sequence from Root to Leaves Path in a Binary Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/check-if-a-string-is-a-valid-sequence-from-root-to-leaves-path-in-a-binary-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "1431. Kids With the Greatest Number of Candies",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/kids-with-the-greatest-number-of-candies",
- "solutionLink": "#"
- },
- {
- "problemName": "1432. Max Difference You Can Get From Changing an Integer",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/max-difference-you-can-get-from-changing-an-integer",
- "solutionLink": "#"
- },
- {
- "problemName": "1433. Check If a String Can Break Another String",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/check-if-a-string-can-break-another-string",
- "solutionLink": "#"
- },
- {
- "problemName": "1434. Number of Ways to Wear Different Hats to each other",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/number-of-ways-to-wear-different-hats-to-each-other",
- "solutionLink": "#"
- },
- {
- "problemName": "1435. Create a Session Bar Chart",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/create-a-session-bar-chart",
- "solutionLink": "#"
- },
- {
- "problemName": "1436. Destination City",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/destination-city",
- "solutionLink": "#"
- },
- {
- "problemName": "1437. Check If All 1's Are at Least Length K places away",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/check-if-all-1s-are-at-least-length-k-places-away",
- "solutionLink": "#"
- },
- {
- "problemName": "1438. Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit",
- "solutionLink": "#"
- },
- {
- "problemName": "1439. Find the Kth Smallest Sum of a Matrix With Sorted Rows",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/find-the-kth-smallest-sum-of-a-matrix-with-sorted-rows",
- "solutionLink": "#"
- },
- {
- "problemName": "1440. Evaluate Boolean Expression",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/evaluate-boolean-expression",
- "solutionLink": "#"
- },
- {
- "problemName": "1441. Build an Array With Stack Operations",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/build-an-array-with-stack-operations",
- "solutionLink": "#"
- },
- {
- "problemName": "1442. Count Triplets That Can Form Two Arrays of Equal XOR",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-triplets-that-can-form-two-arrays-of-equal-xor",
- "solutionLink": "#"
- },
- {
- "problemName": "1443. Minimum Time to Collect All Apples in a tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-time-to-collect-all-apples-in-a-tree",
- "solutionLink": "/dsa-solutions/lc-solutions/1400-1499/minimum-time-to-collect-all-apples-in-a-tree"
- },
- {
- "problemName": "1444. Number of Ways of Cutting a Pizza",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/number-of-ways-of-cutting-a-pizza",
- "solutionLink": "#"
- },
- {
- "problemName": "1445. Apples & Oranges",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/apples-oranges",
- "solutionLink": "#"
- },
- {
- "problemName": "1446. Consecutive Characters",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/consecutive-characters",
- "solutionLink": "#"
- },
- {
- "problemName": "1447. Simplified Fractions",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/simplified-fractions",
- "solutionLink": "#"
- },
- {
- "problemName": "1448. Count Good Nodes in Binary Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-good-nodes-in-binary-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "1449. Form Largest Integer With Digits That Add up to Target",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/form-largest-integer-with-digits-that-add-up-to-target",
- "solutionLink": "#"
- },
- {
- "problemName": "1450. Number of Students Doing Homework at a Given Time",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/number-of-students-doing-homework-at-a-given-time",
- "solutionLink": "#"
- },
- {
- "problemName": "1451. Rearrange Words in a Sentence",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/rearrange-words-in-a-sentence",
- "solutionLink": "#"
- },
- {
- "problemName": "1452. People Whose List of Favorite Companies Is Not a Subset of Another List",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/people-whose-list-of-favorite-companies-is-not-a-subset-of-another-list",
- "solutionLink": "#"
- },
- {
- "problemName": "1453. Maximum Number of Darts Inside of a Circular Dartboard",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-number-of-darts-inside-of-a-circular-dartboard",
- "solutionLink": "#"
- },
- {
- "problemName": "1454. Active Users",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/active-users",
- "solutionLink": "#"
- },
- {
- "problemName": "1455. Check If a Word Occurs As a Prefix of Any Word in a Sentence",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence",
- "solutionLink": "#"
- },
- {
- "problemName": "1456. Maximum Number of Vowels in a Substring of given length",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-number-of-vowels-in-a-substring-of-given-length",
- "solutionLink": "#"
- },
- {
- "problemName": "1457. Pseudo-Palindromic Paths in a Binary Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/pseudo-palindromic-paths-in-a-binary-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "1458. Max Dot Product of Two Subsequences",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/max-dot-product-of-two-subsequences",
- "solutionLink": "#"
- },
- {
- "problemName": "1459. Rectangles Area",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/rectangles-area",
- "solutionLink": "#"
- },
- {
- "problemName": "1460. Make Two Arrays Equal by Reversing Subarrays",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/make-two-arrays-equal-by-reversing-subarrays",
- "solutionLink": "#"
- },
- {
- "problemName": "1461. Check If a String Contains All Binary codes of size k",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/check-if-a-string-contains-all-binary-codes-of-size-k",
- "solutionLink": "#"
- },
- {
- "problemName": "1462. Course Schedule IV",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/course-schedule-iv",
- "solutionLink": "#"
- },
- {
- "problemName": "1463. Cherry Pickup II",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/cherry-pickup-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "1464. Maximum Product of Two Elements in an Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/maximum-product-of-two-elements-in-an-array",
- "solutionLink": "#"
- },
- {
- "problemName": "1465. Maximum Area of a Piece of Cake After horizontal and vertical cuts",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-area-of-a-piece-of-cake-after-horizontal-and-vertical-cuts",
- "solutionLink": "#"
- },
- {
- "problemName": "1466. Reorder Routes to Make All Paths Lead to the city zero",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/reorder-routes-to-make-all-paths-lead-to-the-city-zero",
- "solutionLink": "#"
- },
- {
- "problemName": "1467. Probability of a Two Boxes Having The Same Number of Distinct Balls",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/probability-of-a-two-boxes-having-the-same-number-of-distinct-balls",
- "solutionLink": "#"
- },
- {
- "problemName": "1468. Calculate Salaries",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/calculate-salaries",
- "solutionLink": "#"
- },
- {
- "problemName": "1469. Find All The Lonely Nodes",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-all-the-lonely-nodes",
- "solutionLink": "#"
- },
- {
- "problemName": "1470. Shuffle the Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/shuffle-the-array",
- "solutionLink": "#"
- },
- {
- "problemName": "1471. The k Strongest Values in an Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/the-k-strongest-values-in-an-array",
- "solutionLink": "#"
- },
- {
- "problemName": "1472. Design Browser History",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/design-browser-history",
- "solutionLink": "#"
- },
- {
- "problemName": "1473. Paint House III",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/paint-house-iii",
- "solutionLink": "#"
- },
- {
- "problemName": "1474. Delete N Nodes After M Nodes after m node of a linked list",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/delete-n-nodes-after-m-nodes-of-a-linked-list",
- "solutionLink": "#"
- },
- {
- "problemName": "1475. Final Prices With a Special Discount in a Shop",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/final-prices-with-a-special-discount-in-a-shop",
- "solutionLink": "#"
- },
- {
- "problemName": "1476. Subrectangle Queries",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/subrectangle-queries",
- "solutionLink": "#"
- },
- {
- "problemName": "1477. Find Two Non-overlapping Sub-arrays Each With Target Sum",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-two-non-overlapping-sub-arrays-each-with-target-sum",
- "solutionLink": "#"
- },
- {
- "problemName": "1478. Allocate Mailboxes",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/allocate-mailboxes",
- "solutionLink": "#"
- },
- {
- "problemName": "1479. Sales by Day of the Week",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/sales-by-day-of-the-week",
- "solutionLink": "#"
- },
- {
- "problemName": "1480. Running Sum of 1d Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/running-sum-of-1d-array",
- "solutionLink": "#"
- },
- {
- "problemName": "1481. Least Number of Unique Integers after k removals",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/least-number-of-unique-integers-after-k-removals",
- "solutionLink": "#"
- },
- {
- "problemName": "1482. Minimum Number of Days to Make m Bouquets",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-number-of-days-to-make-m-bouquets",
- "solutionLink": "#"
- },
- {
- "problemName": "1483. Kth Ancestor of a Tree Node",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/kth-ancestor-of-a-tree-node",
- "solutionLink": "/dsa-solutions/lc-solutions/1400-1500/kth-ancestor-of-a-tree node"
- },
- {
- "problemName": "1484. Group Sold Products By The Date",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/group-sold-products-by-the-date",
- "solutionLink": "#"
- },
- {
- "problemName": "1485. Clone Binary Tree With Random Pointer",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/clone-binary-tree-with-random-pointer",
- "solutionLink": "#"
- },
- {
- "problemName": "1486. XOR Operation in an Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/making-file-names-unique",
- "solutionLink": "#"
- },
- {
- "problemName": "1487. Making File Names Unique",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/making-file-names-unique",
- "solutionLink": "#"
- },
- {
- "problemName": "1488. Avoid Flood in The City",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/avoid-flood-in-the-city",
- "solutionLink": "#"
- },
- {
- "problemName": "1489. Find Critical and Pseudo-Critical Edges in Minimum Spanning Tree",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/find-critical-and-pseudo-critical-edges-in-minimum-spanning-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "1490. Clone N-ary Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/clone-n-ary-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "1491. Average Salary Excluding the Minimum and maximum salary",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/average-salary-excluding-the-minimum-and-maximum-salary",
- "solutionLink": "#"
- },
- {
- "problemName": "1492. The kth Factor of n",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/the-kth-factor-of-n",
- "solutionLink": "#"
- },
- {
- "problemName": "1493. Longest Subarray of 1's After Deleting one element",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/longest-subarray-of-1s-after-deleting-one-element",
- "solutionLink": "#"
- },
- {
- "problemName": "1494. Parallel Courses II",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/parallel-courses-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "1495. Friendly Movies Streamed Last Month",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/friendly-movies-streamed-last-month",
- "solutionLink": "#"
- },
- {
- "problemName": "1496. Path Crossing",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/path-crossing",
- "solutionLink": "#"
- },
- {
- "problemName": "1497. Check If Array Pairs Are Divisible by k",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/check-if-array-pairs-are-divisible-by-k",
- "solutionLink": "/dsa-solutions/lc-solutions/1400-1499/check-if-array-pairs-are-divisible-by-k"
- },
- {
- "problemName": "1498. Number of Subsequences That Satisfy the given sum condition",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-subsequences-that-satisfy-the-given-sum-condition",
- "solutionLink": "#"
- },
- {
- "problemName": "1499. Max Value of Equation",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/max-value-of-equation",
- "solutionLink": "#"
- }
-]
-
-
-
-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 LeetCode website. You can also click on the solution link to view the solution of the problem.
\ No newline at end of file
diff --git a/dsa-problems/leetcode-problems/1500-1599.md b/dsa-problems/leetcode-problems/1500-1599.md
deleted file mode 100644
index a4a3e65c2..000000000
--- a/dsa-problems/leetcode-problems/1500-1599.md
+++ /dev/null
@@ -1,622 +0,0 @@
----
-id: 1500-1599
-title: LeetCode Problems 1500 - 1599
-sidebar_label: 1500 - 1599
-keywords:
- - LeetCode
- - LeetCode Problems
- - LeetCode Problems 1500 - 1599
- - DSA problems
----
-
-export const problems = [
- {
- "problemName": "1500. Design a File Sharing System",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/design-a-file-sharing-system",
- "solutionLink": "#"
- },
- {
- "problemName": "1501. Countries You Can Safely Invest In",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/countries-you-can-safely-invest-in",
- "solutionLink": "#"
- },
- {
- "problemName": "1502. Can Make Arithmetic Progression From Sequence",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/can-make-arithmetic-progression-from-sequence",
- "solutionLink": "#"
- },
- {
- "problemName": "1503. Last Moment Before All Ants Fall Out of a Plank",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/last-moment-before-all-ants-fall-out-of-a-plank",
- "solutionLink": "/dsa-solutions/lc-solutions/1500-1599/last-moment-before-all-ants-fall-out-of-a-plank"
- },
- {
- "problemName": "1504. Count Submatrices With All Ones",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-submatrices-with-all-ones",
- "solutionLink": "#"
- },
- {
- "problemName": "1505. Minimum Possible Integer After at Most K Adjacent Swaps On Digits",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-possible-integer-after-at-most-k-adjacent-swaps-on-digits",
- "solutionLink": "#"
- },
- {
- "problemName": "1506. Find Root of N-Ary Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-root-of-n-ary-tree",
- "solutionLink": "/dsa-solutions/lc-solutions/1500-1599/find-root-of-n-ary-tree"
- },
- {
- "problemName": "1507. Reformat Date",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/reformat-date",
- "solutionLink": "#"
- },
- {
- "problemName": "1508. Range Sum of Sorted Subarray Sums",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/range-sum-of-sorted-subarray-sums",
- "solutionLink": "/dsa-solutions/lc-solutions/1500-1599/range-sum-of-sorted-subarray-sums"
- },
- {
- "problemName": "1509. Minimum Difference Between Largest and Smallest Value in Three Moves",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-difference-between-largest-and-smallest-value-in-three-moves",
- "solutionLink": "/dsa-solutions/lc-solutions/1500-1599/minimum-difference-between-largest-and-smallest-value-in-three-moves"
- },
- {
- "problemName": "1510. Stone Game IV",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/stone-game-iv",
- "solutionLink": "#"
- },
- {
- "problemName": "1511. Customer Order Frequency",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/customer-order-frequency",
- "solutionLink": "#"
- },
- {
- "problemName": "1512. Number of Good Pairs",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/number-of-good-pairs",
- "solutionLink": "/dsa-solutions/lc-solutions/1500-1599/number-of-good-pairs"
- },
- {
- "problemName": "1513. Number of Substrings With Only 1s",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-substrings-with-only-1s",
- "solutionLink": "#"
- },
- {
- "problemName": "1514. Path with Maximum Probability",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/path-with-maximum-probability",
- "solutionLink": "/dsa-solutions/lc-solutions/1400-1499/path-with-maximum-probability"
- },
- {
- "problemName": "1515. Best Position for a Service Centre",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/best-position-for-a-service-centre",
- "solutionLink": "#"
- },
- {
- "problemName": "1516. Move Sub-Tree of N-Ary Tree",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/move-sub-tree-of-n-ary-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "1517. Find Users With Valid E-Mails",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-users-with-valid-e-mails",
- "solutionLink": "#"
- },
- {
- "problemName": "1518. Water Bottles",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/water-bottles",
- "solutionLink": "/dsa-solutions/lc-solutions/1500-1599/water-bottles"
- },
- {
- "problemName": "1519. Number of Nodes in the Sub-Tree With the Same Label",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-nodes-in-the-sub-tree-with-the-same-label",
- "solutionLink": "#"
- },
- {
- "problemName": "1520. Maximum Number of Non-Overlapping Substrings",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-number-of-non-overlapping-substrings",
- "solutionLink": "#"
- },
- {
- "problemName": "1521. Find a Value of a Mysterious Function Closest to Target",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/find-a-value-of-a-mysterious-function-closest-to-target",
- "solutionLink": "#"
- },
- {
- "problemName": "1522. Diameter of N-Ary Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/diameter-of-n-ary-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "1523. Count Odd Numbers in an Interval Range",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/count-odd-numbers-in-an-interval-range",
- "solutionLink": "#"
- },
- {
- "problemName": "1524. Number of Sub-arrays With Odd Sum",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-sub-arrays-with-odd-sum",
- "solutionLink": "#"
- },
- {
- "problemName": "1525. Number of Good Ways to Split a String",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-good-ways-to-split-a-string",
- "solutionLink": "#"
- },
- {
- "problemName": "1526. Minimum Number of Increments on Subarrays to Form a Target Array",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-number-of-increments-on-subarrays-to-form-a-target-array",
- "solutionLink": "#"
- },
- {
- "problemName": "1527. Patients With a Condition",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/patients-with-a-condition",
- "solutionLink": "#"
- },
- {
- "problemName": "1528. Shuffle String",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/shuffle-string",
- "solutionLink": "/dsa-solutions/lc-solutions/1500-1599/shuffle-string"
- },
- {
- "problemName": "1529. Bulb Switcher IV",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/bulb-switcher-iv",
- "solutionLink": "#"
- },
- {
- "problemName": "1530. Number of Good Leaf Nodes Pairs",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-good-leaf-nodes-pairs",
- "solutionLink": "#"
- },
- {
- "problemName": "1531. String Compression II",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/string-compression-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "1532. The Most Recent Three Orders",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/the-most-recent-three-orders",
- "solutionLink": "#"
- },
- {
- "problemName": "1533. Find the Index of the Large Integer",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-the-index-of-the-large-integer",
- "solutionLink": "#"
- },
- {
- "problemName": "1534. Count Good Triplets",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/count-good-triplets",
- "solutionLink": "/dsa-solutions/lc-solutions/1500-1599/count-good-triplets"
- },
- {
- "problemName": "1535. Find the Winner of an Array Game",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-the-winner-of-an-array-game",
- "solutionLink": "#"
- },
- {
- "problemName": "1536. Minimum Swaps to Arrange a Binary Grid",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-swaps-to-arrange-a-binary-grid",
- "solutionLink": "#"
- },
- {
- "problemName": "1537. Get the Maximum Score",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/get-the-maximum-score",
- "solutionLink": "#"
- },
- {
- "problemName": "1538. Guess the Majority in a Hidden Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/guess-the-majority-in-a-hidden-array",
- "solutionLink": "#"
- },
- {
- "problemName": "1539. Kth Missing Positive Number",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/kth-missing-positive-number",
- "solutionLink": "/dsa-solutions/lc-solutions/1500-1599/kth-missing-positive-number"
- },
- {
- "problemName": "1540. Can Convert String in K Moves",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/can-convert-string-in-k-moves",
- "solutionLink": "#"
- },
- {
- "problemName": "1541. Minimum Insertions to Balance a Parentheses String",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-insertions-to-balance-a-parentheses-string",
- "solutionLink": "#"
- },
- {
- "problemName": "1542. Find Longest Awesome Substring",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/find-longest-awesome-substring",
- "solutionLink": "#"
- },
- {
- "problemName": "1543. Fix Product Name Format",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/fix-product-name-format",
- "solutionLink": "#"
- },
- {
- "problemName": "1544. Make The String Great",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/make-the-string-great",
- "solutionLink": "/dsa-solutions/lc-solutions/1500-1599/make-the-string-great"
- },
- {
- "problemName": "1545. Find Kth Bit in Nth Binary String",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-kth-bit-in-nth-binary-string",
- "solutionLink": "#"
- },
- {
- "problemName": "1546. Maximum Number of Non-Overlapping Subarrays With Sum Equals Target",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-number-of-non-overlapping-subarrays-with-sum-equals-target",
- "solutionLink": "#"
- },
- {
- "problemName": "1547. Minimum Cost to Cut a Stick",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-cost-to-cut-a-stick",
- "solutionLink": "#"
- },
- {
- "problemName": "1548. The Most Similar Path in a Graph",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/the-most-similar-path-in-a-graph",
- "solutionLink": "#"
- },
- {
- "problemName": "1549. The Most Recent Orders for Each Product",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/the-most-recent-orders-for-each-product",
- "solutionLink": "#"
- },
- {
- "problemName": "1550. Three Consecutive Odds",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/three-consecutive-odds",
- "solutionLink": "#"
- },
- {
- "problemName": "1551. Minimum Operations to Make Array Equal",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-operations-to-make-array-equal",
- "solutionLink": "#"
- },
- {
- "problemName": "1552. Magnetic Force Between Two Balls",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/magnetic-force-between-two-balls",
- "solutionLink": "/dsa-solutions/lc-solutions/1500-1599/magnetic-force-between-two-balls"
- },
- {
- "problemName": "1553. Minimum Number of Days to Eat N Oranges",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-number-of-days-to-eat-n-oranges",
- "solutionLink": "#"
- },
- {
- "problemName": "1554. Strings Differ by One Character",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/strings-differ-by-one-character",
- "solutionLink": "#"
- },
- {
- "problemName": "1555. Bank Account Summary II",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/bank-account-summary-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "1556. Thousand Separator",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/thousand-separator",
- "solutionLink": "#"
- },
- {
- "problemName": "1557. Minimum Number of Vertices to Reach All Nodes",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-number-of-vertices-to-reach-all-nodes",
- "solutionLink": "#"
- },
- {
- "problemName": "1558. Minimum Numbers of Function Calls to Make Target Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-numbers-of-function-calls-to-make-target-array",
- "solutionLink": "#"
- },
- {
- "problemName": "1559. Detect Cycles in 2D Grid",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/detect-cycles-in-2d-grid",
- "solutionLink": "#"
- },
- {
- "problemName": "1560. Most Visited Sector in a Circular Track",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/most-visited-sector-in-a-circular-track",
- "solutionLink": "#"
- },
- {
- "problemName": "1561. Maximum Number of Coins You Can Get",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-number-of-coins-you-can-get",
- "solutionLink": "#"
- },
- {
- "problemName": "1562. Find Latest Group of Size M",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-latest-group-of-size-m",
- "solutionLink": "#"
- },
- {
- "problemName": "1563. Stone Game V",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/stone-game-v",
- "solutionLink": "#"
- },
- {
- "problemName": "1564. Put Boxes Into the Warehouse I",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/put-boxes-into-the-warehouse-i",
- "solutionLink": "#"
- },
- {
- "problemName": "1565. Unique Orders and Customers Per Month",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/unique-orders-and-customers-per-month",
- "solutionLink": "#"
- },
- {
- "problemName": "1566. Detect Pattern of Length M Repeated K or More Times",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/detect-pattern-of-length-m-repeated-k-or-more-times",
- "solutionLink": "/dsa-solutions/lc-solutions/1500-1599/detect-pattern"
- },
- {
- "problemName": "1567. Maximum Length of Subarray With Positive Product",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-length-of-subarray-with-positive-product",
- "solutionLink": "/dsa-solutions/lc-solutions/1500-1599/maximum-length-of-subarray-with-positive-product"
- },
- {
- "problemName": "1568. Minimum Number of Days to Disconnect Island",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-number-of-days-to-disconnect-island",
- "solutionLink": "#"
- },
- {
- "problemName": "1569. Number of Ways to Reorder Array to Get Same BST",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/number-of-ways-to-reorder-array-to-get-same-bst",
- "solutionLink": "#"
- },
- {
- "problemName": "1570. Dot Product of Two Sparse Vectors",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/dot-product-of-two-sparse-vectors",
- "solutionLink": "#"
- },
- {
- "problemName": "1571. Warehouse Manager",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/warehouse-manager",
- "solutionLink": "#"
- },
- {
- "problemName": "1572. Matrix Diagonal Sum",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/matrix-diagonal-sum",
- "solutionLink": "/dsa-solutions/lc-solutions/1500-1599/matrix-diagonal-sum"
- },
- {
- "problemName": "1573. Number of Ways to Split a String",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-ways-to-split-a-string",
- "solutionLink": "#"
- },
- {
- "problemName": "1574. Shortest Subarray to be Removed to Make Array Sorted",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/shortest-subarray-to-be-removed-to-make-array-sorted",
- "solutionLink": "#"
- },
- {
- "problemName": "1575. Count All Possible Routes",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-all-possible-routes",
- "solutionLink": "#"
- },
- {
- "problemName": "1576. Replace All ?'s to Avoid Consecutive Repeating Characters",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/replace-all-s-to-avoid-consecutive-repeating-characters",
- "solutionLink": "/dsa-solutions/lc-solutions/1500-1599/replace-all-s-to-avoid-consecutive-repeating-characters"
- },
- {
- "problemName": "1577. Number of Ways Where Square of Number Is Equal to Product of Two Numbers",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-ways-where-square-of-number-is-equal-to-product-of-two-numbers",
- "solutionLink": "#"
- },
- {
- "problemName": "1578. Minimum Deletion Cost to Avoid Repeating Letters",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-deletion-cost-to-avoid-repeating-letters",
- "solutionLink": "#"
- },
- {
- "problemName": "1579. Remove Max Number of Edges to Keep Graph Fully Traversable",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/remove-max-number-of-edges-to-keep-graph-fully-traversable",
- "solutionLink": "#"
- },
- {
- "problemName": "1580. Put Boxes Into the Warehouse II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/put-boxes-into-the-warehouse-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "1581. Customer Who Visited but Did Not Make Any Transactions",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/customer-who-visited-but-did-not-make-any-transactions",
- "solutionLink": "#"
- },
- {
- "problemName": "1582. Special Positions in a Binary Matrix",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/special-positions-in-a-binary-matrix",
- "solutionLink": "#"
- },
- {
- "problemName": "1583. Count Unhappy Friends",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-unhappy-friends",
- "solutionLink": "#"
- },
- {
- "problemName": "1584. Min Cost to Connect All Points",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/min-cost-to-connect-all-points",
- "solutionLink": "/dsa-solutions/lc-solutions/1500-1599/min-cost-to-connect-all-points"
- },
- {
- "problemName": "1585. Check If String Is Transformable With Substring Sort Operations",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/check-if-string-is-transformable-with-substring-sort-operations",
- "solutionLink": "#"
- },
- {
- "problemName": "1586. Binary Search Tree Iterator II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/binary-search-tree-iterator-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "1587. Bank Account Summary III",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/bank-account-summary-iii",
- "solutionLink": "#"
- },
- {
- "problemName": "1588. Sum of All Odd Length Subarrays",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/sum-of-all-odd-length-subarrays",
- "solutionLink": "/dsa-solutions/lc-solutions/1500-1599/sum-of-all-odd-length-subarrays"
- },
- {
- "problemName": "1589. Maximum Sum Obtained of Any Permutation",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-sum-obtained-of-any-permutation",
- "solutionLink": "#"
- },
- {
- "problemName": "1590. Make Sum Divisible by P",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/make-sum-divisible-by-p",
- "solutionLink": "/dsa-solutions/lc-solutions/1500-1599/make-sum-divisible-by-p"
- },
- {
- "problemName": "1591. Strange Printer II",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/strange-printer-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "1592. Rearrange Spaces Between Words",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/rearrange-spaces-between-words",
- "solutionLink": "/dsa-solutions/lc-solutions/1500-1599/rearrange-spaces-between-words"
- },
- {
- "problemName": "1593. Split a String Into the Max Number of Unique Substrings",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/split-a-string-into-the-max-number-of-unique-substrings",
- "solutionLink": "/dsa-solutions/lc-solutions/1500-1599/split-a-string-into-the-max-number-of-unique-substrings"
- },
- {
- "problemName": "1594. Maximum Non Negative Product in a Matrix",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-non-negative-product-in-a-matrix",
- "solutionLink": "/dsa-solutions/lc-solutions/1500-1599/maximum-non-negative-product-in-a-matrix"
- },
- {
- "problemName": "1595. Minimum Cost to Connect Two Groups of Points",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-cost-to-connect-two-groups-of-points",
- "solutionLink": "/dsa-solutions/lc-solutions/1500-1599/Minimum Cost to Connect Two Groups of Points"
- },
- {
- "problemName": "1596. The Most Frequently Ordered Products for Each Customer",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/the-most-frequently-ordered-products-for-each-customer",
- "solutionLink": "#"
- },
- {
- "problemName": "1597. Build Binary Expression Tree From Infix Expression",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/build-binary-expression-tree-from-infix-expression",
- "solutionLink": "#"
- },
- {
- "problemName": "1598. Crawler Log Folder",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/crawler-log-folder",
- "solutionLink": "/dsa-solutions/lc-solutions/1500-1599/crawler-log-folder"
- },
- {
- "problemName": "1599. Maximum Profit of Operating a Centennial Wheel",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-profit-of-operating-a-centennial-wheel",
- "solutionLink": "#"
- }
-];
-
-
-
-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 LeetCode website. You can also click on the solution link to view the solution of the problem.
\ No newline at end of file
diff --git a/dsa-problems/leetcode-problems/1600-1699.md b/dsa-problems/leetcode-problems/1600-1699.md
deleted file mode 100644
index 5a7814a6c..000000000
--- a/dsa-problems/leetcode-problems/1600-1699.md
+++ /dev/null
@@ -1,622 +0,0 @@
----
-id: 1600-1699
-title: LeetCode Problems 1600 - 1699
-sidebar_label: 1600 - 1699
-keywords:
- - LeetCode
- - LeetCode Problems
- - LeetCode Problems 1600 - 1699
- - DSA problems
----
-
-export const problems = [
- {
- "problemName": "1600. Throne Inheritance",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/throne-inheritance",
- "solutionLink": "#"
- },
- {
- "problemName": "1601. Maximum Number of Achievable Transfer Requests",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-number-of-achievable-transfer-requests",
- "solutionLink": "#"
- },
- {
- "problemName": "1602. Find Nearest Right Node in Binary Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-nearest-right-node-in-binary-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "1603. Design Parking System",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/design-parking-system",
- "solutionLink": "#"
- },
- {
- "problemName": "1604. Alert Using Same Key-Card Three or More Times in a One Hour Period",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/alert-using-same-key-card-three-or-more-times-in-a-one-hour-period",
- "solutionLink": "#"
- },
- {
- "problemName": "1605. Find Valid Matrix Given Row and Column Sums",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-valid-matrix-given-row-and-column-sums",
- "solutionLink": "#"
- },
- {
- "problemName": "1606. Find Servers That Handled Most Number of Requests",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/find-servers-that-handled-most-number-of-requests",
- "solutionLink": "#"
- },
- {
- "problemName": "1607. Sellers With No Sales",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/sellers-with-no-sales",
- "solutionLink": "#"
- },
- {
- "problemName": "1608. Special Array With X Elements Greater Than or Equal X",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/special-array-with-x-elements-greater-than-or-equal-x",
- "solutionLink": "#"
- },
- {
- "problemName": "1609. Even Odd Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/even-odd-tree",
- "solutionLink": "/dsa-solutions/lc-solutions/1600-1699/even-odd-tree"
- },
- {
- "problemName": "1610. Maximum Number of Visible Points",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-number-of-visible-points",
- "solutionLink": "#"
- },
- {
- "problemName": "1611. Minimum One Bit Operations to Make Integers Zero",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-one-bit-operations-to-make-integers-zero",
- "solutionLink": "#"
- },
- {
- "problemName": "1612. Check If Two Expression Trees are Equivalent",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/check-if-two-expression-trees-are-equivalent",
- "solutionLink": "#"
- },
- {
- "problemName": "1613. Find the Missing IDs",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-the-missing-ids",
- "solutionLink": "#"
- },
- {
- "problemName": "1614. Maximum Nesting Depth of the Parentheses",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/maximum-nesting-depth-of-the-parentheses",
- "solutionLink": "#"
- },
- {
- "problemName": "1615. Maximal Network Rank",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximal-network-rank",
- "solutionLink": "#"
- },
- {
- "problemName": "1616. Split Two Strings to Make Palindrome",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/split-two-strings-to-make-palindrome",
- "solutionLink": "#"
- },
- {
- "problemName": "1617. Count Subtrees With Max Distance Between Cities",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-subtrees-with-max-distance-between-cities",
- "solutionLink": "#"
- },
- {
- "problemName": "1618. Maximum Font to Fit a Sentence in a Screen",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-font-to-fit-a-sentence-in-a-screen",
- "solutionLink": "#"
- },
- {
- "problemName": "1619. Mean of Array After Removing Some Elements",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/mean-of-array-after-removing-some-elements",
- "solutionLink": "#"
- },
- {
- "problemName": "1620. Coordinate With Maximum Network Quality",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/coordinate-with-maximum-network-quality",
- "solutionLink": "#"
- },
- {
- "problemName": "1621. Number of Sets of K Non-Overlapping Line Segments",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-sets-of-k-non-overlapping-line-segments",
- "solutionLink": "#"
- },
- {
- "problemName": "1622. Fancy Sequence",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/fancy-sequence",
- "solutionLink": "/dsa-solutions/lc-solutions/1600-1699/fancy-sequence"
- },
- {
- "problemName": "1623. All Valid Triplets That Can Represent a Country",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/all-valid-triplets-that-can-represent-a-country",
- "solutionLink": "#"
- },
- {
- "problemName": "1624. Largest Substring Between Two Equal Characters",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/largest-substring-between-two-equal-characters",
- "solutionLink": "#"
- },
- {
- "problemName": "1625. Lexicographically Smallest String After Applying Operations",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/lexicographically-smallest-string-after-applying-operations",
- "solutionLink": "#"
- },
- {
- "problemName": "1626. Best Team With No Conflicts",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/best-team-with-no-conflicts",
- "solutionLink": "#"
- },
- {
- "problemName": "1627. Graph Connectivity With Threshold",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/graph-connectivity-with-threshold",
- "solutionLink": "#"
- },
- {
- "problemName": "1628. Design an Expression Tree With Evaluate Function",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/design-an-expression-tree-with-evaluate-function",
- "solutionLink": "#"
- },
- {
- "problemName": "1629. Slowest Key",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/slowest-key",
- "solutionLink": "#"
- },
- {
- "problemName": "1630. Arithmetic Subarrays",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/arithmetic-subarrays",
- "solutionLink": "#"
- },
- {
- "problemName": "1631. Path With Minimum Effort",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/path-with-minimum-effort",
- "solutionLink": "/dsa-solutions/lc-solutions/1600-1699/path-with-minimum-effort"
- },
- {
- "problemName": "1632. Rank Transform of a Matrix",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/rank-transform-of-a-matrix",
- "solutionLink": "#"
- },
- {
- "problemName": "1633. Percentage of Users Attended a Contest",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/percentage-of-users-attended-a-contest",
- "solutionLink": "#"
- },
- {
- "problemName": "1634. Add Two Polynomials Represented as Linked Lists",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/add-two-polynomials-represented-as-linked-lists",
- "solutionLink": "#"
- },
- {
- "problemName": "1635. Hopper Company Queries I",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/hopper-company-queries-i",
- "solutionLink": "#"
- },
- {
- "problemName": "1636. Sort Array by Increasing Frequency",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/sort-array-by-increasing-frequency",
- "solutionLink": "#"
- },
- {
- "problemName": "1637. Widest Vertical Area Between Two Points Containing No Points",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/widest-vertical-area-between-two-points-containing-no-points",
- "solutionLink": "#"
- },
- {
- "problemName": "1638. Count Substrings That Differ by One Character",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-substrings-that-differ-by-one-character",
- "solutionLink": "#"
- },
- {
- "problemName": "1639. Number of Ways to Form a Target String Given a Dictionary",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/number-of-ways-to-form-a-target-string-given-a-dictionary",
- "solutionLink": "#"
- },
- {
- "problemName": "1640. Check Array Formation Through Concatenation",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/check-array-formation-through-concatenation",
- "solutionLink": "#"
- },
- {
- "problemName": "1641. Count Sorted Vowel Strings",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-sorted-vowel-strings",
- "solutionLink": "#"
- },
- {
- "problemName": "1642. Furthest Building You Can Reach",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/furthest-building-you-can-reach",
- "solutionLink": "#"
- },
- {
- "problemName": "1643. Kth Smallest Instructions",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/kth-smallest-instructions",
- "solutionLink": "#"
- },
- {
- "problemName": "1644. Lowest Common Ancestor of a Binary Tree II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "1645. Hopper Company Queries II",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/hopper-company-queries-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "1646. Get Maximum in Generated Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/get-maximum-in-generated-array",
- "solutionLink": "#"
- },
- {
- "problemName": "1647. Minimum Deletions to Make Character Frequencies Unique",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-deletions-to-make-character-frequencies-unique",
- "solutionLink": "#"
- },
- {
- "problemName": "1648. Sell Diminishing-Valued Colored Balls",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/sell-diminishing-valued-colored-balls",
- "solutionLink": "#"
- },
- {
- "problemName": "1649. Create Sorted Array through Instructions",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/create-sorted-array-through-instructions",
- "solutionLink": "#"
- },
- {
- "problemName": "1650. Lowest Common Ancestor of a Binary Tree III",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree-iii",
- "solutionLink": "#"
- },
- {
- "problemName": "1651. Hopper Company Queries III",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/hopper-company-queries-iii",
- "solutionLink": "#"
- },
- {
- "problemName": "1652. Defuse the Bomb",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/defuse-the-bomb",
- "solutionLink": "#"
- },
- {
- "problemName": "1653. Minimum Deletions to Make String Balanced",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-deletions-to-make-string-balanced",
- "solutionLink": "#"
- },
- {
- "problemName": "1654. Minimum Jumps to Reach Home",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-jumps-to-reach-home",
- "solutionLink": "#"
- },
- {
- "problemName": "1655. Distribute Repeating Integers",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/distribute-repeating-integers",
- "solutionLink": "#"
- },
- {
- "problemName": "1656. Design an Ordered Stream",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/design-an-ordered-stream",
- "solutionLink": "#"
- },
- {
- "problemName": "1657. Determine if Two Strings Are Close",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/determine-if-two-strings-are-close",
- "solutionLink": "#"
- },
- {
- "problemName": "1658. Minimum Operations to Reduce X to Zero",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-operations-to-reduce-x-to-zero",
- "solutionLink": "#"
- },
- {
- "problemName": "1659. Maximize Grid Happiness",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximize-grid-happiness",
- "solutionLink": "#"
- },
- {
- "problemName": "1660. Correct a Binary Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/correct-a-binary-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "1661. Average Time of Process per Machine",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/average-time-of-process-per-machine",
- "solutionLink": "#"
- },
- {
- "problemName": "1662. Check If Two String Arrays are Equivalent",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/check-if-two-string-arrays-are-equivalent",
- "solutionLink": "#"
- },
- {
- "problemName": "1663. Smallest String With A Given Numeric Value",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/smallest-string-with-a-given-numeric-value",
- "solutionLink": "#"
- },
- {
- "problemName": "1664. Ways to Make a Fair Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/ways-to-make-a-fair-array",
- "solutionLink": "#"
- },
- {
- "problemName": "1665. Minimum Initial Energy to Finish Tasks",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-initial-energy-to-finish-tasks",
- "solutionLink": "#"
- },
- {
- "problemName": "1666. Change the Root of a Binary Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/change-the-root-of-a-binary-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "1667. Fix Names in a Table",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/fix-names-in-a-table",
- "solutionLink": "#"
- },
- {
- "problemName": "1668. Maximum Repeating Substring",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/maximum-repeating-substring",
- "solutionLink": "#"
- },
- {
- "problemName": "1669. Merge In Between Linked Lists",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/merge-in-between-linked-lists",
- "solutionLink": "#"
- },
- {
- "problemName": "1670. Design Front Middle Back Queue",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/design-front-middle-back-queue",
- "solutionLink": "/dsa-solutions/lc-solutions/1600-1699/design-front-middle-back-queue"
- },
- {
- "problemName": "1671. Minimum Number of Removals to Make Mountain Array",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-number-of-removals-to-make-mountain-array",
- "solutionLink": "#"
- },
- {
- "problemName": "1672. Richest Customer Wealth",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/richest-customer-wealth",
- "solutionLink": "#"
- },
- {
- "problemName": "1673. Find the Most Competitive Subsequence",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-the-most-competitive-subsequence",
- "solutionLink": "#"
- },
- {
- "problemName": "1674. Minimum Moves to Make Array Complementary",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-moves-to-make-array-complementary",
- "solutionLink": "#"
- },
- {
- "problemName": "1675. Minimize Deviation in Array",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimize-deviation-in-array",
- "solutionLink": "#"
- },
- {
- "problemName": "1676. Lowest Common Ancestor of a Binary Tree IV",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree-iv",
- "solutionLink": "#"
- },
- {
- "problemName": "1677. Product's Worth Over Invoices",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/products-worth-over-invoices",
- "solutionLink": "#"
- },
- {
- "problemName": "1678. Goal Parser Interpretation",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/goal-parser-interpretation",
- "solutionLink": "#"
- },
- {
- "problemName": "1679. Max Number of K-Sum Pairs",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/max-number-of-k-sum-pairs",
- "solutionLink": "/dsa-solutions/lc-solutions/1600-1699/design-front-middle-back-queue"
- },
- {
- "problemName": "1680. Concatenation of Consecutive Binary Numbers",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/concatenation-of-consecutive-binary-numbers",
- "solutionLink": "#"
- },
- {
- "problemName": "1681. Minimum Incompatibility",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-incompatibility",
- "solutionLink": "#"
- },
- {
- "problemName": "1682. Longest Palindromic Subsequence II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/longest-palindromic-subsequence-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "1683. Invalid Tweets",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/invalid-tweets",
- "solutionLink": "#"
- },
- {
- "problemName": "1684. Count the Number of Consistent Strings",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/count-the-number-of-consistent-strings",
- "solutionLink": "#"
- },
- {
- "problemName": "1685. Sum of Absolute Differences in a Sorted Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/sum-of-absolute-differences-in-a-sorted-array",
- "solutionLink": "#"
- },
- {
- "problemName": "1686. Stone Game VI",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/stone-game-vi",
- "solutionLink": "#"
- },
- {
- "problemName": "1687. Delivering Boxes from Storage to Ports",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/delivering-boxes-from-storage-to-ports",
- "solutionLink": "#"
- },
- {
- "problemName": "1688. Count of Matches in Tournament",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/count-of-matches-in-tournament",
- "solutionLink": "#"
- },
- {
- "problemName": "1689. Partitioning Into Minimum Number Of Deci-Binary Numbers",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/partitioning-into-minimum-number-of-deci-binary-numbers",
- "solutionLink": "#"
- },
- {
- "problemName": "1690. Stone Game VII",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/stone-game-vii",
- "solutionLink": "#"
- },
- {
- "problemName": "1691. Maximum Height by Stacking Cuboids",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-height-by-stacking-cuboids",
- "solutionLink": "#"
- },
- {
- "problemName": "1692. Count Ways to Distribute Candies",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-ways-to-distribute-candies",
- "solutionLink": "#"
- },
- {
- "problemName": "1693. Daily Leads and Partners",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/daily-leads-and-partners",
- "solutionLink": "#"
- },
- {
- "problemName": "1694. Reformat Phone Number",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/reformat-phone-number",
- "solutionLink": "#"
- },
- {
- "problemName": "1695. Maximum Erasure Value",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-erasure-value",
- "solutionLink": "#"
- },
- {
- "problemName": "1696. Jump Game VI",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/jump-game-vi",
- "solutionLink": "#"
- },
- {
- "problemName": "1697. Checking Existence of Edge Length Limited Paths",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/checking-existence-of-edge-length-limited-paths",
- "solutionLink": "#"
- },
- {
- "problemName": "1698. Number of Distinct Substrings in a String",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-distinct-substrings-in-a-string",
- "solutionLink": "#"
- },
- {
- "problemName": "1699. Number of Calls Between Two Persons",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-calls-between-two-persons",
- "solutionLink": "#"
- }
-];
-
-
-
-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 LeetCode website. You can also click on the solution link to view the solution of the problem.
\ No newline at end of file
diff --git a/dsa-problems/leetcode-problems/1700-1799.md b/dsa-problems/leetcode-problems/1700-1799.md
deleted file mode 100644
index 4066d0492..000000000
--- a/dsa-problems/leetcode-problems/1700-1799.md
+++ /dev/null
@@ -1,622 +0,0 @@
----
-id: 1700-1799
-title: LeetCode Problems 1700 - 1799
-sidebar_label: 1700 - 1799
-keywords:
- - LeetCode
- - LeetCode Problems
- - LeetCode Problems 1700 - 1799
- - DSA problems
----
-
-export const problems = [
- {
- "problemName": "1700. Number of Students Unable to Eat Lunch",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/number-of-students-unable-to-eat-lunch",
- "solutionLink": "#"
- },
- {
- "problemName": "1701. Average Waiting Time",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/average-waiting-time",
- "solutionLink": "#"
- },
- {
- "problemName": "1702. Maximum Binary String After Change",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-binary-string-after-change",
- "solutionLink": "#"
- },
- {
- "problemName": "1703. Minimum Adjacent Swaps for K Consecutive Ones",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-adjacent-swaps-for-k-consecutive-ones",
- "solutionLink": "#"
- },
- {
- "problemName": "1704. Determine if String Halves Are Alike",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/determine-if-string-halves-are-alike",
- "solutionLink": "#"
- },
- {
- "problemName": "1705. Maximum Number of Eaten Apples",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-number-of-eaten-apples",
- "solutionLink": "#"
- },
- {
- "problemName": "1706. Where Will the Ball Fall",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/where-will-the-ball-fall",
- "solutionLink": "#"
- },
- {
- "problemName": "1707. Maximum XOR With an Element From Array",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-xor-with-an-element-from-array",
- "solutionLink": "#"
- },
- {
- "problemName": "1708. Largest Subarray Length K",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/largest-subarray-length-k",
- "solutionLink": "#"
- },
- {
- "problemName": "1709. Biggest Window Between Visits",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/biggest-window-between-visits",
- "solutionLink": "#"
- },
- {
- "problemName": "1710. Maximum Units on a Truck",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/maximum-units-on-a-truck",
- "solutionLink": "#"
- },
- {
- "problemName": "1711. Count Good Meals",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-good-meals",
- "solutionLink": "#"
- },
- {
- "problemName": "1712. Ways to Split Array Into Three Subarrays",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/ways-to-split-array-into-three-subarrays",
- "solutionLink": "#"
- },
- {
- "problemName": "1713. Minimum Operations to Make a Subsequence",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-operations-to-make-a-subsequence",
- "solutionLink": "#"
- },
- {
- "problemName": "1714. Sum Of Special Evenly-Spaced Elements In Array",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/sum-of-special-evenly-spaced-elements-in-array",
- "solutionLink": "#"
- },
- {
- "problemName": "1715. Count Apples and Oranges",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-apples-and-oranges",
- "solutionLink": "#"
- },
- {
- "problemName": "1716. Calculate Money in Leetcode Bank",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/calculate-money-in-leetcode-bank",
- "solutionLink": "#"
- },
- {
- "problemName": "1717. Maximum Score From Removing Substrings",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-score-from-removing-substrings",
- "solutionLink": "/dsa-solutions/lc-solutions/1700-1799/maximum-score-from-removing-substrings"
- },
- {
- "problemName": "1718. Construct the Lexicographically Largest Valid Sequence",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/construct-the-lexicographically-largest-valid-sequence",
- "solutionLink": "#"
- },
- {
- "problemName": "1719. Number Of Ways To Reconstruct A Tree",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/number-of-ways-to-reconstruct-a-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "1720. Decode XORed Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/decode-xored-array",
- "solutionLink": "#"
- },
- {
- "problemName": "1721. Swapping Nodes in a Linked List",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/swapping-nodes-in-a-linked-list",
- "solutionLink": "#"
- },
- {
- "problemName": "1722. Minimize Hamming Distance After Swap Operations",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimize-hamming-distance-after-swap-operations",
- "solutionLink": "#"
- },
- {
- "problemName": "1723. Find Minimum Time to Finish All Jobs",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/find-minimum-time-to-finish-all-jobs",
- "solutionLink": "#"
- },
- {
- "problemName": "1724. Checking Existence of Edge Length Limited Paths II",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/checking-existence-of-edge-length-limited-paths-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "1725. Number Of Rectangles That Can Form The Largest Square",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/number-of-rectangles-that-can-form-the-largest-square",
- "solutionLink": "#"
- },
- {
- "problemName": "1726. Tuple with Same Product",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/tuple-with-same-product",
- "solutionLink": "/dsa-solutions/lc-solutions/1700-1799/tuple-with-same-product"
- },
- {
- "problemName": "1727. Largest Submatrix With Rearrangements",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/largest-submatrix-with-rearrangements",
- "solutionLink": "#"
- },
- {
- "problemName": "1728. Cat and Mouse II",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/cat-and-mouse-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "1729. Find Followers Count",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-followers-count",
- "solutionLink": "#"
- },
- {
- "problemName": "1730. Shortest Path to Get Food",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/shortest-path-to-get-food",
- "solutionLink": "#"
- },
- {
- "problemName": "1731. The Number of Employees Which Report to Each Employee",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/the-number-of-employees-which-report-to-each-employee",
- "solutionLink": "#"
- },
- {
- "problemName": "1732. Find the Highest Altitude",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-the-highest-altitude",
- "solutionLink": "#"
- },
- {
- "problemName": "1733. Minimum Number of People to Teach",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-number-of-people-to-teach",
- "solutionLink": "#"
- },
- {
- "problemName": "1734. Decode XORed Permutation",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/decode-xored-permutation",
- "solutionLink": "#"
- },
- {
- "problemName": "1735. Count Ways to Make Array With Product",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-ways-to-make-array-with-product",
- "solutionLink": "#"
- },
- {
- "problemName": "1736. Latest Time by Replacing Hidden Digits",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/latest-time-by-replacing-hidden-digits",
- "solutionLink": "#"
- },
- {
- "problemName": "1737. Change Minimum Characters to Satisfy One of Three Conditions",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/change-minimum-characters-to-satisfy-one-of-three-conditions",
- "solutionLink": "#"
- },
- {
- "problemName": "1738. Find Kth Largest XOR Coordinate Value",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-kth-largest-xor-coordinate-value",
- "solutionLink": "#"
- },
- {
- "problemName": "1739. Building Boxes",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/building-boxes",
- "solutionLink": "#"
- },
- {
- "problemName": "1740. Find Distance in a Binary Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-distance-in-a-binary-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "1741. Find Total Time Spent by Each Employee",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-total-time-spent-by-each-employee",
- "solutionLink": "#"
- },
- {
- "problemName": "1742. Maximum Number of Balls in a Box",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/maximum-number-of-balls-in-a-box",
- "solutionLink": "#"
- },
- {
- "problemName": "1743. Restore the Array From Adjacent Pairs",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/restore-the-array-from-adjacent-pairs",
- "solutionLink": "#"
- },
- {
- "problemName": "1744. Can You Eat Your Favorite Candy on Your Favorite Day?",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/can-you-eat-your-favorite-candy-on-your-favorite-day",
- "solutionLink": "#"
- },
- {
- "problemName": "1745. Palindrome Partitioning IV",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/palindrome-partitioning-iv",
- "solutionLink": "#"
- },
- {
- "problemName": "1746. Maximum Subarray Sum After One Operation",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-subarray-sum-after-one-operation",
- "solutionLink": "#"
- },
- {
- "problemName": "1747. Leetflex Banned Accounts",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/leetflex-banned-accounts",
- "solutionLink": "#"
- },
- {
- "problemName": "1748. Sum of Unique Elements",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/sum-of-unique-elements",
- "solutionLink": "#"
- },
- {
- "problemName": "1749. Maximum Absolute Sum of Any Subarray",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-absolute-sum-of-any-subarray",
- "solutionLink": "#"
- },
- {
- "problemName": "1750. Minimum Length of String After Deleting Similar Ends",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-length-of-string-after-deleting-similar-ends",
- "solutionLink": "#"
- },
- {
- "problemName": "1751. Maximum Number of Events That Can Be Attended II",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-number-of-events-that-can-be-attended-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "1752. Check if Array Is Sorted and Rotated",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/check-if-array-is-sorted-and-rotated",
- "solutionLink": "#"
- },
- {
- "problemName": "1753. Maximum Score From Removing Stones",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-score-from-removing-stones",
- "solutionLink": "#"
- },
- {
- "problemName": "1754. Largest Merge Of Two Strings",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/largest-merge-of-two-strings",
- "solutionLink": "#"
- },
- {
- "problemName": "1755. Closest Subsequence Sum",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/closest-subsequence-sum",
- "solutionLink": "#"
- },
- {
- "problemName": "1756. Design Most Recently Used Queue",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/design-most-recently-used-queue",
- "solutionLink": "#"
- },
- {
- "problemName": "1757. Recyclable and Low Fat Products",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/recyclable-and-low-fat-products",
- "solutionLink": "#"
- },
- {
- "problemName": "1758. Minimum Changes To Make Alternating Binary String",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/minimum-changes-to-make-alternating-binary-string",
- "solutionLink": "#"
- },
- {
- "problemName": "1759. Count Number of Homogenous Substrings",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-number-of-homogenous-substrings",
- "solutionLink": "#"
- },
- {
- "problemName": "1760. Minimum Limit of Balls in a Bag",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-limit-of-balls-in-a-bag",
- "solutionLink": "#"
- },
- {
- "problemName": "1761. Minimum Degree of a Connected Trio in a Graph",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-degree-of-a-connected-trio-in-a-graph",
- "solutionLink": "#"
- },
- {
- "problemName": "1762. Buildings With an Ocean View",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/buildings-with-an-ocean-view",
- "solutionLink": "#"
- },
- {
- "problemName": "1763. Longest Nice Substring",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/longest-nice-substring",
- "solutionLink": "#"
- },
- {
- "problemName": "1764. Form Array by Concatenating Subarrays of Another Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/form-array-by-concatenating-subarrays-of-another-array",
- "solutionLink": "#"
- },
- {
- "problemName": "1765. Map of Highest Peak",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/map-of-highest-peak",
- "solutionLink": "#"
- },
- {
- "problemName": "1766. Tree of Coprimes",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/tree-of-coprimes",
- "solutionLink": "#"
- },
- {
- "problemName": "1767. Find the Subtasks That Did Not Execute",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/find-the-subtasks-that-did-not-execute",
- "solutionLink": "#"
- },
- {
- "problemName": "1768. Merge Strings Alternately",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/merge-strings-alternately",
- "solutionLink": "#"
- },
- {
- "problemName": "1769. Minimum Number of Operations to Move All Balls to Each Box",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-number-of-operations-to-move-all-balls-to-each-box",
- "solutionLink": "#"
- },
- {
- "problemName": "1770. Maximum Score from Performing Multiplication Operations",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-score-from-performing-multiplication-operations",
- "solutionLink": "#"
- },
- {
- "problemName": "1771. Maximize Palindrome Length From Subsequences",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximize-palindrome-length-from-subsequences",
- "solutionLink": "#"
- },
- {
- "problemName": "1772. Sort Features by Popularity",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/sort-features-by-popularity",
- "solutionLink": "#"
- },
- {
- "problemName": "1773. Count Items Matching a Rule",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/count-items-matching-a-rule",
- "solutionLink": "#"
- },
- {
- "problemName": "1774. Closest Dessert Cost",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/closest-dessert-cost",
- "solutionLink": "#"
- },
- {
- "problemName": "1775. Equal Sum Arrays With Minimum Number of Operations",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/equal-sum-arrays-with-minimum-number-of-operations",
- "solutionLink": "#"
- },
- {
- "problemName": "1776. Car Fleet II",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/car-fleet-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "1777. Product's Price for Each Store",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/products-price-for-each-store",
- "solutionLink": "#"
- },
- {
- "problemName": "1778. Shortest Path in a Hidden Grid",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/shortest-path-in-a-hidden-grid",
- "solutionLink": "#"
- },
- {
- "problemName": "1779. Find Nearest Point That Has the Same X or Y Coordinate",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-nearest-point-that-has-the-same-x-or-y-coordinate",
- "solutionLink": "#"
- },
- {
- "problemName": "1780. Check if Number is a Sum of Powers of Three",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/check-if-number-is-a-sum-of-powers-of-three",
- "solutionLink": "#"
- },
- {
- "problemName": "1781. Sum of Beauty of All Substrings",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/sum-of-beauty-of-all-substrings",
- "solutionLink": "/dsa-solutions/lc-solutions/1700-1799/sum-of-beauty-of-all-substrings"
- },
- {
- "problemName": "1782. Count Pairs Of Nodes",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-pairs-of-nodes",
- "solutionLink": "#"
- },
- {
- "problemName": "1783. Grand Slam Titles",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/grand-slam-titles",
- "solutionLink": "#"
- },
- {
- "problemName": "1784. Check if Binary String Has at Most One Segment of Ones",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/check-if-binary-string-has-at-most-one-segment-of-ones",
- "solutionLink": "#"
- },
- {
- "problemName": "1785. Minimum Elements to Add to Form a Given Sum",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-elements-to-add-to-form-a-given-sum",
- "solutionLink": "#"
- },
- {
- "problemName": "1786. Number of Restricted Paths From First to Last Node",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-restricted-paths-from-first-to-last-node",
- "solutionLink": "#"
- },
- {
- "problemName": "1787. Make the XOR of All Segments Equal to Zero",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/make-the-xor-of-all-segments-equal-to-zero",
- "solutionLink": "#"
- },
- {
- "problemName": "1788. Maximize the Beauty of the Garden",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximize-the-beauty-of-the-garden",
- "solutionLink": "#"
- },
- {
- "problemName": "1789. Primary Department for Each Employee",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/primary-department-for-each-employee",
- "solutionLink": "#"
- },
- {
- "problemName": "1790. Check if One String Swap Can Make Strings Equal",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/check-if-one-string-swap-can-make-strings-equal",
- "solutionLink": "#"
- },
- {
- "problemName": "1791. Find Center of Star Graph",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-center-of-star-graph",
- "solutionLink": "/dsa-solutions/lc-solutions/1700-1799/find-center-of-star-graph"
- },
- {
- "problemName": "1792. Maximum Average Pass Ratio",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-average-pass-ratio",
- "solutionLink": "#"
- },
- {
- "problemName": "1793. Maximum Score of a Good Subarray",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-score-of-a-good-subarray",
- "solutionLink": "#"
- },
- {
- "problemName": "1794. Count Pairs of Equal Substrings With Minimum Difference",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-pairs-of-equal-substrings-with-minimum-difference",
- "solutionLink": "#"
- },
- {
- "problemName": "1795. Rearrange Products Table",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/rearrange-products-table",
- "solutionLink": "#"
- },
- {
- "problemName": "1796. Second Largest Digit in a String",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/second-largest-digit-in-a-string",
- "solutionLink": "#"
- },
- {
- "problemName": "1797. Design Authentication Manager",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/design-authentication-manager",
- "solutionLink": "#"
- },
- {
- "problemName": "1798. Maximum Number of Consecutive Values You Can Make",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-number-of-consecutive-values-you-can-make",
- "solutionLink": "#"
- },
- {
- "problemName": "1799. Maximize Score After N Operations",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximize-score-after-n-operations",
- "solutionLink": "#"
- }
-];
-
-
-
-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 LeetCode website. You can also click on the solution link to view the solution of the problem.
\ No newline at end of file
diff --git a/dsa-problems/leetcode-problems/1800-1899.md b/dsa-problems/leetcode-problems/1800-1899.md
deleted file mode 100644
index c05965dc4..000000000
--- a/dsa-problems/leetcode-problems/1800-1899.md
+++ /dev/null
@@ -1,622 +0,0 @@
----
-id: 1800-1899
-title: LeetCode Problems 1800 - 1899
-sidebar_label: 1800 - 1899
-keywords:
- - LeetCode
- - LeetCode Problems
- - LeetCode Problems 1800 - 1899
- - DSA problems
----
-
-export const problems = [
- {
- "problemName": "1800. Maximum Ascending Subarray Sum",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/maximum-ascending-subarray-sum",
- "solutionLink": "/dsa-solutions/lc-solutions/1800-1899/maximum-ascending-subarray-sum"
- },
- {
- "problemName": "1801. Number of Orders in the Backlog",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-orders-in-the-backlog",
- "solutionLink": "#"
- },
- {
- "problemName": "1802. Maximum Value at a Given Index in a Bounded Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-value-at-a-given-index-in-a-bounded-array",
- "solutionLink": "#"
- },
- {
- "problemName": "1803. Count Pairs With XOR in a Range",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-pairs-with-xor-in-a-range",
- "solutionLink": "#"
- },
- {
- "problemName": "1804. Implement Trie II (Prefix Tree)",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/implement-trie-ii-prefix-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "1805. Number of Different Integers in a String",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/number-of-different-integers-in-a-string",
- "solutionLink": "#"
- },
- {
- "problemName": "1806. Minimum Number of Operations to Reinitialize a Permutation",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-number-of-operations-to-reinitialize-a-permutation",
- "solutionLink": "#"
- },
- {
- "problemName": "1807. Evaluate the Bracket Pairs of a String",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/evaluate-the-bracket-pairs-of-a-string",
- "solutionLink": "#"
- },
- {
- "problemName": "1808. Maximize Number of Nice Divisors",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximize-number-of-nice-divisors",
- "solutionLink": "#"
- },
- {
- "problemName": "1809. Ad-Free Sessions",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/ad-free-sessions",
- "solutionLink": "#"
- },
- {
- "problemName": "1810. Minimum Path Cost in a Hidden Grid",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-path-cost-in-a-hidden-grid",
- "solutionLink": "#"
- },
- {
- "problemName": "1811. Find Interview Candidates",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-interview-candidates",
- "solutionLink": "#"
- },
- {
- "problemName": "1812. Determine Color of a Chessboard Square",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/determine-color-of-a-chessboard-square",
- "solutionLink": "#"
- },
- {
- "problemName": "1813. Sentence Similarity III",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/sentence-similarity-iii",
- "solutionLink": "#"
- },
- {
- "problemName": "1814. Count Nice Pairs in an Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-nice-pairs-in-an-array",
- "solutionLink": "#"
- },
- {
- "problemName": "1815. Maximum Number of Groups Getting Fresh Donuts",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-number-of-groups-getting-fresh-donuts",
- "solutionLink": "#"
- },
- {
- "problemName": "1816. Truncate Sentence",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/truncate-sentence",
- "solutionLink": "#"
- },
- {
- "problemName": "1817. Finding the Users Active Minutes",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/finding-the-users-active-minutes",
- "solutionLink": "#"
- },
- {
- "problemName": "1818. Minimum Absolute Sum Difference",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-absolute-sum-difference",
- "solutionLink": "#"
- },
- {
- "problemName": "1819. Number of Different Subsequences GCDs",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/number-of-different-subsequences-gcds",
- "solutionLink": "#"
- },
- {
- "problemName": "1820. Maximum Number of Accepted Invitations",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-number-of-accepted-invitations",
- "solutionLink": "#"
- },
- {
- "problemName": "1821. Find Customers With Positive Revenue this Year",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-customers-with-positive-revenue-this-year",
- "solutionLink": "#"
- },
- {
- "problemName": "1822. Sign of the Product of an Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/sign-of-the-product-of-an-array",
- "solutionLink": "#"
- },
- {
- "problemName": "1823. Find the Winner of the Circular Game",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-the-winner-of-the-circular-game",
- "solutionLink": "#"
- },
- {
- "problemName": "1824. Minimum Sideway Jumps",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-sideway-jumps",
- "solutionLink": "#"
- },
- {
- "problemName": "1825. Finding MK Average",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/finding-mk-average",
- "solutionLink": "#"
- },
- {
- "problemName": "1826. Faulty Sensor",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/faulty-sensor",
- "solutionLink": "#"
- },
- {
- "problemName": "1827. Minimum Operations to Make the Array Increasing",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/minimum-operations-to-make-the-array-increasing",
- "solutionLink": "#"
- },
- {
- "problemName": "1828. Queries on Number of Points Inside a Circle",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/queries-on-number-of-points-inside-a-circle",
- "solutionLink": "#"
- },
- {
- "problemName": "1829. Maximum XOR for Each Query",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-xor-for-each-query",
- "solutionLink": "#"
- },
- {
- "problemName": "1830. Minimum Number of Operations to Make String Sorted",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-number-of-operations-to-make-string-sorted",
- "solutionLink": "#"
- },
- {
- "problemName": "1831. Maximum Transaction Each Day",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-transaction-each-day",
- "solutionLink": "#"
- },
- {
- "problemName": "1832. Check if the Sentence Is Pangram",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/check-if-the-sentence-is-pangram",
- "solutionLink": "/dsa-solutions/lc-solutions/1800-1899/check-if-the-sentence-is-pangram"
- },
- {
- "problemName": "1833. Maximum Ice Cream Bars",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-ice-cream-bars",
- "solutionLink": "#"
- },
- {
- "problemName": "1834. Single-Threaded CPU",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/single-threaded-cpu",
- "solutionLink": "#"
- },
- {
- "problemName": "1835. Find XOR Sum of All Pairs Bitwise AND",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/find-xor-sum-of-all-pairs-bitwise-and",
- "solutionLink": "#"
- },
- {
- "problemName": "1836. Remove Duplicates From an Unsorted Linked List",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/remove-duplicates-from-an-unsorted-linked-list",
- "solutionLink": "#"
- },
- {
- "problemName": "1837. Sum of Digits in Base K",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/sum-of-digits-in-base-k",
- "solutionLink": "#"
- },
- {
- "problemName": "1838. Frequency of the Most Frequent Element",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/frequency-of-the-most-frequent-element",
- "solutionLink": "/dsa-solutions/lc-solutions/1800-1899/frequency-of-the-most-frequent-element"
- },
- {
- "problemName": "1839. Longest Substring Of All Vowels in Order",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/longest-substring-of-all-vowels-in-order",
- "solutionLink": "/dsa-solutions/lc-solutions/1800-1899/longest-substring-of-all-vowels-in-order"
- },
- {
- "problemName": "1840. Maximum Building Height",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-building-height",
- "solutionLink": "#"
- },
- {
- "problemName": "1841. League Statistics",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/league-statistics",
- "solutionLink": "#"
- },
- {
- "problemName": "1842. Next Palindrome Using Same Digits",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/next-palindrome-using-same-digits",
- "solutionLink": "#"
- },
- {
- "problemName": "1843. Suspicious Bank Accounts",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/suspicious-bank-accounts",
- "solutionLink": "#"
- },
- {
- "problemName": "1844. Replace All Digits with Characters",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/replace-all-digits-with-characters",
- "solutionLink": "#"
- },
- {
- "problemName": "1845. Seat Reservation Manager",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/seat-reservation-manager",
- "solutionLink": "#"
- },
- {
- "problemName": "1846. Maximum Element After Decreasing and Rearranging",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-element-after-decreasing-and-rearranging",
- "solutionLink": "#"
- },
- {
- "problemName": "1847. Closest Room",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/closest-room",
- "solutionLink": "#"
- },
- {
- "problemName": "1848. Minimum Distance to the Target Element",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/minimum-distance-to-the-target-element",
- "solutionLink": "#"
- },
- {
- "problemName": "1849. Splitting a String Into Descending Consecutive Values",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/splitting-a-string-into-descending-consecutive-values",
- "solutionLink": "#"
- },
- {
- "problemName": "1850. Minimum Adjacent Swaps to Reach the Kth Smallest Number",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-adjacent-swaps-to-reach-the-kth-smallest-number",
- "solutionLink": "#"
- },
- {
- "problemName": "1851. Minimum Interval to Include Each Query",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-interval-to-include-each-query",
- "solutionLink": "#"
- },
- {
- "problemName": "1852. Distinct Numbers in Each Subarray",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/distinct-numbers-in-each-subarray",
- "solutionLink": "#"
- },
- {
- "problemName": "1853. Convert Date Format",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/convert-date-format",
- "solutionLink": "#"
- },
- {
- "problemName": "1854. Maximum Population Year",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/maximum-population-year",
- "solutionLink": "#"
- },
- {
- "problemName": "1855. Maximum Distance Between a Pair of Values",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-distance-between-a-pair-of-values",
- "solutionLink": "#"
- },
- {
- "problemName": "1856. Maximum Subarray Min-Product",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-subarray-min-product",
- "solutionLink": "#"
- },
- {
- "problemName": "1857. Largest Color Value in a Directed Graph",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/largest-color-value-in-a-directed-graph",
- "solutionLink": "#"
- },
- {
- "problemName": "1858. Longest Word With All Prefixes",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/longest-word-with-all-prefixes",
- "solutionLink": "#"
- },
- {
- "problemName": "1859. Sorting the Sentence",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/sorting-the-sentence",
- "solutionLink": "#"
- },
- {
- "problemName": "1860. Incremental Memory Leak",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/incremental-memory-leak",
- "solutionLink": "#"
- },
- {
- "problemName": "1861. Rotating the Box",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/rotating-the-box",
- "solutionLink": "#"
- },
- {
- "problemName": "1862. Sum of Floored Pairs",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/sum-of-floored-pairs",
- "solutionLink": "#"
- },
- {
- "problemName": "1863. Sum of All Subset XOR Totals",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/sum-of-all-subset-xor-totals",
- "solutionLink": "#"
- },
- {
- "problemName": "1864. Minimum Number of Swaps to Make the Binary String Alternating",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-number-of-swaps-to-make-the-binary-string-alternating",
- "solutionLink": "#"
- },
- {
- "problemName": "1865. Finding Pairs With a Certain Sum",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/finding-pairs-with-a-certain-sum",
- "solutionLink": "#"
- },
- {
- "problemName": "1866. Number of Ways to Rearrange Sticks With K Sticks Visible",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/number-of-ways-to-rearrange-sticks-with-k-sticks-visible",
- "solutionLink": "#"
- },
- {
- "problemName": "1867. Orders With Maximum Quantity Above Average",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/orders-with-maximum-quantity-above-average",
- "solutionLink": "#"
- },
- {
- "problemName": "1868. Product of Two Run-Length Encoded Arrays",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/product-of-two-run-length-encoded-arrays",
- "solutionLink": "#"
- },
- {
- "problemName": "1869. Longer Contiguous Segments of Ones than Zeros",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/longer-contiguous-segments-of-ones-than-zeros",
- "solutionLink": "#"
- },
- {
- "problemName": "1870. Minimum Speed to Arrive on Time",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-speed-to-arrive-on-time",
- "solutionLink": "#"
- },
- {
- "problemName": "1871. Jump Game VII",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/jump-game-vii",
- "solutionLink": "#"
- },
- {
- "problemName": "1872. Stone Game VIII",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/stone-game-viii",
- "solutionLink": "#"
- },
- {
- "problemName": "1873. Calculate Special Bonus",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/calculate-special-bonus",
- "solutionLink": "#"
- },
- {
- "problemName": "1874. Minimize Product Sum of Two Arrays",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimize-product-sum-of-two-arrays",
- "solutionLink": "#"
- },
- {
- "problemName": "1875. Group Employees of the Same Salary",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/group-employees-of-the-same-salary",
- "solutionLink": "#"
- },
- {
- "problemName": "1876. Substrings of Size Three with Distinct Characters",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/substrings-of-size-three-with-distinct-characters",
- "solutionLink": "#"
- },
- {
- "problemName": "1877. Minimize Maximum Pair Sum in Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimize-maximum-pair-sum-in-array",
- "solutionLink": "#"
- },
- {
- "problemName": "1878. Get Biggest Three Rhombus Sums in a Grid",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/get-biggest-three-rhombus-sums-in-a-grid",
- "solutionLink": "#"
- },
- {
- "problemName": "1879. Minimum XOR Sum of Two Arrays",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-xor-sum-of-two-arrays",
- "solutionLink": "#"
- },
- {
- "problemName": "1880. Check if Word Equals Summation of Two Words",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/check-if-word-equals-summation-of-two-words",
- "solutionLink": "#"
- },
- {
- "problemName": "1881. Maximum Value after Insertion",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-value-after-insertion",
- "solutionLink": "#"
- },
- {
- "problemName": "1882. Process Tasks Using Servers",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/process-tasks-using-servers",
- "solutionLink": "#"
- },
- {
- "problemName": "1883. Minimum Skips to Arrive at Meeting On Time",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-skips-to-arrive-at-meeting-on-time",
- "solutionLink": "#"
- },
- {
- "problemName": "1884. Egg Drop With 2 Eggs and N Floors",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/egg-drop-with-2-eggs-and-n-floors",
- "solutionLink": "#"
- },
- {
- "problemName": "1885. Count Pairs in Two Arrays",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-pairs-in-two-arrays",
- "solutionLink": "#"
- },
- {
- "problemName": "1886. Determine Whether Matrix Can Be Obtained By Rotation",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/determine-whether-matrix-can-be-obtained-by-rotation",
- "solutionLink": "#"
- },
- {
- "problemName": "1887. Reduction Operations to Make the Array Elements Equal",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/reduction-operations-to-make-the-array-elements-equal",
- "solutionLink": "#"
- },
- {
- "problemName": "1888. Minimum Number of Flips to Make the Binary String Alternating",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-number-of-flips-to-make-the-binary-string-alternating",
- "solutionLink": "#"
- },
- {
- "problemName": "1889. Minimum Space Wasted From Packaging",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-space-wasted-from-packaging",
- "solutionLink": "#"
- },
- {
- "problemName": "1890. The Latest Login in 2020",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/the-latest-login-in-2020",
- "solutionLink": "#"
- },
- {
- "problemName": "1891. Cutting Ribbons",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/cutting-ribbons",
- "solutionLink": "#"
- },
- {
- "problemName": "1892. Page Recommendations II",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/page-recommendations-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "1893. Check if All the Integers in a Range Are Covered",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/check-if-all-the-integers-in-a-range-are-covered",
- "solutionLink": "#"
- },
- {
- "problemName": "1894. Find the Student that Will Replace the Chalk",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-the-student-that-will-replace-the-chalk",
- "solutionLink": "#"
- },
- {
- "problemName": "1895. Largest Magic Square",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/largest-magic-square",
- "solutionLink": "#"
- },
- {
- "problemName": "1896. Minimum Cost to Change the Final Value of Expression",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-cost-to-change-the-final-value-of-expression",
- "solutionLink": "#"
- },
- {
- "problemName": "1897. Redistribute Characters to Make All Strings Equal",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/redistribute-characters-to-make-all-strings-equal",
- "solutionLink": "#"
- },
- {
- "problemName": "1898. Maximum Number of Removable Characters",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-number-of-removable-characters",
- "solutionLink": "#"
- },
- {
- "problemName": "1899. Merge Triplets to Form Target Triplet",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/merge-triplets-to-form-target-triplet",
- "solutionLink": "#"
- }
-];
-
-
-
-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 LeetCode website. You can also click on the solution link to view the solution of the problem.
\ No newline at end of file
diff --git a/dsa-problems/leetcode-problems/1900-1999.md b/dsa-problems/leetcode-problems/1900-1999.md
deleted file mode 100644
index 869da856c..000000000
--- a/dsa-problems/leetcode-problems/1900-1999.md
+++ /dev/null
@@ -1,622 +0,0 @@
----
-id: 1900-1999
-title: LeetCode Problems 1900 - 1999
-sidebar_label: 1900 - 1999
-keywords:
- - LeetCode
- - LeetCode Problems
- - LeetCode Problems 1900 - 1999
- - DSA problems
----
-
-export const problems = [
- {
- "problemName": "1900. The Earliest and Latest Rounds Where Players Compete",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/the-earliest-and-latest-rounds-where-players-compete",
- "solutionLink": "#"
- },
- {
- "problemName": "1901. Find a Peak Element II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-a-peak-element-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "1902. Depth of BST Given Insertion Order",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/depth-of-bst-given-insertion-order",
- "solutionLink": "#"
- },
- {
- "problemName": "1903. Largest Odd Number in String",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/largest-odd-number-in-string",
- "solutionLink": "#"
- },
- {
- "problemName": "1904. The Number of Full Rounds You Have Played",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/the-number-of-full-rounds-you-have-played",
- "solutionLink": "#"
- },
- {
- "problemName": "1905. Count Sub Islands",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-sub-islands",
- "solutionLink": "#"
- },
- {
- "problemName": "1906. Minimum Absolute Difference Queries",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-absolute-difference-queries",
- "solutionLink": "#"
- },
- {
- "problemName": "1907. Count Salary Categories",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-salary-categories",
- "solutionLink": "#"
- },
- {
- "problemName": "1908. Game of Nim",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/game-of-nim",
- "solutionLink": "#"
- },
- {
- "problemName": "1909. Remove One Element to Make the Array Strictly Increasing",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/remove-one-element-to-make-the-array-strictly-increasing",
- "solutionLink": "#"
- },
- {
- "problemName": "1910. Remove All Occurrences of a Substring",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/remove-all-occurrences-of-a-substring",
- "solutionLink": "#"
- },
- {
- "problemName": "1911. Maximum Alternating Subsequence Sum",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-alternating-subsequence-sum",
- "solutionLink": "#"
- },
- {
- "problemName": "1912. Design Movie Rental System",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/design-movie-rental-system",
- "solutionLink": "#"
- },
- {
- "problemName": "1913. Maximum Product Difference Between Two Pairs",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/maximum-product-difference-between-two-pairs",
- "solutionLink": "#"
- },
- {
- "problemName": "1914. Cyclically Rotating a Grid",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/cyclically-rotating-a-grid",
- "solutionLink": "#"
- },
- {
- "problemName": "1915. Number of Wonderful Substrings",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-wonderful-substrings",
- "solutionLink": "#"
- },
- {
- "problemName": "1916. Count Ways to Build Rooms in an Ant Colony",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-ways-to-build-rooms-in-an-ant-colony",
- "solutionLink": "#"
- },
- {
- "problemName": "1917. Leetcodify Friends Recommendations",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/leetcodify-friends-recommendations",
- "solutionLink": "#"
- },
- {
- "problemName": "1918. Kth Smallest Subarray Sum",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/kth-smallest-subarray-sum",
- "solutionLink": "#"
- },
- {
- "problemName": "1919. Leetcodify Similar Friends",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/leetcodify-similar-friends",
- "solutionLink": "#"
- },
- {
- "problemName": "1920. Build Array from Permutation",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/build-array-from-permutation",
- "solutionLink": "#"
- },
- {
- "problemName": "1921. Eliminate Maximum Number of Monsters",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/eliminate-maximum-number-of-monsters",
- "solutionLink": "#"
- },
- {
- "problemName": "1922. Count Good Numbers",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-good-numbers",
- "solutionLink": "#"
- },
- {
- "problemName": "1923. Longest Common Subpath",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/longest-common-subpath",
- "solutionLink": "#"
- },
- {
- "problemName": "1924. Erect the Fence II",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/erect-the-fence-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "1925. Count Square Sum Triples",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/count-square-sum-triples",
- "solutionLink": "#"
- },
- {
- "problemName": "1926. Nearest Exit from Entrance in Maze",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/nearest-exit-from-entrance-in-maze",
- "solutionLink": "/dsa-solutions/lc-solutions/1900-1999/nearest-exit-from-entrance-in-maze"
- },
- {
- "problemName": "1927. Sum Game",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/sum-game",
- "solutionLink": "#"
- },
- {
- "problemName": "1928. Minimum Cost to Reach Destination in Time",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-cost-to-reach-destination-in-time",
- "solutionLink": "#"
- },
- {
- "problemName": "1929. Concatenation of Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/concatenation-of-array",
- "solutionLink": "#"
- },
- {
- "problemName": "1930. Unique Length-3 Palindromic Subsequences",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/unique-length-3-palindromic-subsequences",
- "solutionLink": "#"
- },
- {
- "problemName": "1931. Painting a Grid With Three Different Colors",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/painting-a-grid-with-three-different-colors",
- "solutionLink": "#"
- },
- {
- "problemName": "1932. Merge BSTs to Create Single BST",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/merge-bsts-to-create-single-bst",
- "solutionLink": "#"
- },
- {
- "problemName": "1933. Check if String Is Decomposable Into Value-Equal Substrings",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/check-if-string-is-decomposable-into-value-equal-substrings",
- "solutionLink": "#"
- },
- {
- "problemName": "1934. Confirmation Rate",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/confirmation-rate",
- "solutionLink": "#"
- },
- {
- "problemName": "1935. Maximum Number of Words You Can Type",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/maximum-number-of-words-you-can-type",
- "solutionLink": "#"
- },
- {
- "problemName": "1936. Add Minimum Number of Rungs",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/add-minimum-number-of-rungs",
- "solutionLink": "#"
- },
- {
- "problemName": "1937. Maximum Number of Points with Cost",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-number-of-points-with-cost",
- "solutionLink": "#"
- },
- {
- "problemName": "1938. Maximum Genetic Difference Query",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-genetic-difference-query",
- "solutionLink": "#"
- },
- {
- "problemName": "1939. Users That Actively Request Confirmation Messages",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/users-that-actively-request-confirmation-messages",
- "solutionLink": "#"
- },
- {
- "problemName": "1940. Longest Common Subsequence Between Sorted Arrays",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/longest-common-subsequence-between-sorted-arrays",
- "solutionLink": "#"
- },
- {
- "problemName": "1941. Check if All Characters Have Equal Number of Occurrences",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/check-if-all-characters-have-equal-number-of-occurrences",
- "solutionLink": "#"
- },
- {
- "problemName": "1942. The Number of the Smallest Unoccupied Chair",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/the-number-of-the-smallest-unoccupied-chair",
- "solutionLink": "#"
- },
- {
- "problemName": "1943. Describe the Painting",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/describe-the-painting",
- "solutionLink": "#"
- },
- {
- "problemName": "1944. Number of Visible People in a Queue",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/number-of-visible-people-in-a-queue",
- "solutionLink": "#"
- },
- {
- "problemName": "1945. Sum of Digits of String After Convert",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/sum-of-digits-of-string-after-convert",
- "solutionLink": "#"
- },
- {
- "problemName": "1946. Largest Number After Mutating Substring",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/largest-number-after-mutating-substring",
- "solutionLink": "#"
- },
- {
- "problemName": "1947. Maximum Compatibility Score Sum",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-compatibility-score-sum",
- "solutionLink": "#"
- },
- {
- "problemName": "1948. Delete Duplicate Folders in System",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/delete-duplicate-folders-in-system",
- "solutionLink": "#"
- },
- {
- "problemName": "1949. Strong Friendship",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/strong-friendship",
- "solutionLink": "#"
- },
- {
- "problemName": "1950. Maximum of Minimum Values in All Subarrays",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-of-minimum-values-in-all-subarrays",
- "solutionLink": "#"
- },
- {
- "problemName": "1951. All the Pairs With the Maximum Number of Common Followers",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/all-the-pairs-with-the-maximum-number-of-common-followers",
- "solutionLink": "#"
- },
- {
- "problemName": "1952. Three Divisors",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/three-divisors",
- "solutionLink": "#"
- },
- {
- "problemName": "1953. Maximum Number of Weeks for Which You Can Work",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-number-of-weeks-for-which-you-can-work",
- "solutionLink": "#"
- },
- {
- "problemName": "1954. Minimum Garden Perimeter to Collect Enough Apples",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-garden-perimeter-to-collect-enough-apples",
- "solutionLink": "#"
- },
- {
- "problemName": "1955. Count Number of Special Subsequences",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-number-of-special-subsequences",
- "solutionLink": "#"
- },
- {
- "problemName": "1956. Minimum Time For K Virus Variants to Spread",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-time-for-k-virus-variants-to-spread",
- "solutionLink": "#"
- },
- {
- "problemName": "1957. Delete Characters to Make Fancy String",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/delete-characters-to-make-fancy-string",
- "solutionLink": "#"
- },
- {
- "problemName": "1958. Check if Move is Legal",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/check-if-move-is-legal",
- "solutionLink": "#"
- },
- {
- "problemName": "1959. Minimum Total Space Wasted With K Resizing Operations",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-total-space-wasted-with-k-resizing-operations",
- "solutionLink": "#"
- },
- {
- "problemName": "1960. Maximum Product of the Length of Two Palindromic Substrings",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-product-of-the-length-of-two-palindromic-substrings",
- "solutionLink": "#"
- },
- {
- "problemName": "1961. Check If String Is a Prefix of Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/check-if-string-is-a-prefix-of-array",
- "solutionLink": "#"
- },
- {
- "problemName": "1962. Remove Stones to Minimize the Total",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/remove-stones-to-minimize-the-total",
- "solutionLink": "/dsa-solutions/lc-solutions/1900-1999/remove-stones-to-minimize-the-total"
- },
- {
- "problemName": "1963. Minimum Number of Swaps to Make the String Balanced",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-number-of-swaps-to-make-the-string-balanced",
- "solutionLink": "#"
- },
- {
- "problemName": "1964. Find the Longest Valid Obstacle Course at Each Position",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/find-the-longest-valid-obstacle-course-at-each-position",
- "solutionLink": "#"
- },
- {
- "problemName": "1965. Employees With Missing Information",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/employees-with-missing-information",
- "solutionLink": "#"
- },
- {
- "problemName": "1966. Binary Searchable Numbers in an Unsorted Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/binary-searchable-numbers-in-an-unsorted-array",
- "solutionLink": "#"
- },
- {
- "problemName": "1967. Number of Strings That Appear as Substrings in Word",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/number-of-strings-that-appear-as-substrings-in-word",
- "solutionLink": "#"
- },
- {
- "problemName": "1968. Array With Elements Not Equal to Average of Neighbors",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/array-with-elements-not-equal-to-average-of-neighbors",
- "solutionLink": "#"
- },
- {
- "problemName": "1969. Minimum Non-Zero Product of the Array Elements",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-non-zero-product-of-the-array-elements",
- "solutionLink": "#"
- },
- {
- "problemName": "1970. Last Day Where You Can Still Cross",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/last-day-where-you-can-still-cross",
- "solutionLink": "#"
- },
- {
- "problemName": "1971. Find if Path Exists in Graph",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-if-path-exists-in-graph",
- "solutionLink": "#"
- },
- {
- "problemName": "1972. First and Last Call On the Same Day",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/first-and-last-call-on-the-same-day",
- "solutionLink": "#"
- },
- {
- "problemName": "1973. Count Nodes Equal to Sum of Descendants",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-nodes-equal-to-sum-of-descendants",
- "solutionLink": "#"
- },
- {
- "problemName": "1974. Minimum Time to Type Word Using Special Typewriter",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/minimum-time-to-type-word-using-special-typewriter",
- "solutionLink": "#"
- },
- {
- "problemName": "1975. Maximum Matrix Sum",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-matrix-sum",
- "solutionLink": "#"
- },
- {
- "problemName": "1976. Number of Ways to Arrive at Destination",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-ways-to-arrive-at-destination",
- "solutionLink": "#"
- },
- {
- "problemName": "1977. Number of Ways to Separate Numbers",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/number-of-ways-to-separate-numbers",
- "solutionLink": "#"
- },
- {
- "problemName": "1978. Employees Whose Manager Left the Company",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/employees-whose-manager-left-the-company",
- "solutionLink": "#"
- },
- {
- "problemName": "1979. Find Greatest Common Divisor of Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-greatest-common-divisor-of-array",
- "solutionLink": "#"
- },
- {
- "problemName": "1980. Find Unique Binary String",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-unique-binary-string",
- "solutionLink": "#"
- },
- {
- "problemName": "1981. Minimize the Difference Between Target and Chosen Elements",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimize-the-difference-between-target-and-chosen-elements",
- "solutionLink": "#"
- },
- {
- "problemName": "1982. Find Array Given Subset Sums",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/find-array-given-subset-sums",
- "solutionLink": "#"
- },
- {
- "problemName": "1983. Widest Pair of Indices With Equal Range Sum",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/widest-pair-of-indices-with-equal-range-sum",
- "solutionLink": "#"
- },
- {
- "problemName": "1984. Minimum Difference Between Highest and Lowest of K Scores",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/minimum-difference-between-highest-and-lowest-of-k-scores",
- "solutionLink": "#"
- },
- {
- "problemName": "1985. Find the Kth Largest Integer in the Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-the-kth-largest-integer-in-the-array",
- "solutionLink": "#"
- },
- {
- "problemName": "1986. Minimum Number of Work Sessions to Finish the Tasks",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-number-of-work-sessions-to-finish-the-tasks",
- "solutionLink": "#"
- },
- {
- "problemName": "1987. Number of Unique Good Subsequences",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/number-of-unique-good-subsequences",
- "solutionLink": "#"
- },
- {
- "problemName": "1988. Find Cutoff Score for Each School",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-cutoff-score-for-each-school",
- "solutionLink": "#"
- },
- {
- "problemName": "1989. Maximum Number of People That Can Be Caught in Tag",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-number-of-people-that-can-be-caught-in-tag",
- "solutionLink": "#"
- },
- {
- "problemName": "1990. Count the Number of Experiments",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-the-number-of-experiments",
- "solutionLink": "#"
- },
- {
- "problemName": "1991. Find the Middle Index in Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-the-middle-index-in-array",
- "solutionLink": "#"
- },
- {
- "problemName": "1992. Find All Groups of Farmland",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-all-groups-of-farmland",
- "solutionLink": "/dsa-solutions/lc-solutions/1900-1999/find-all-groups-of-farmland"
- },
- {
- "problemName": "1993. Operations on Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/operations-on-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "1994. The Number of Good Subsets",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/the-number-of-good-subsets",
- "solutionLink": "#"
- },
- {
- "problemName": "1995. Count Special Quadruplets",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/count-special-quadruplets",
- "solutionLink": "#"
- },
- {
- "problemName": "1996. The Number of Weak Characters in the Game",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/the-number-of-weak-characters-in-the-game",
- "solutionLink": "#"
- },
- {
- "problemName": "1997. First Day Where You Have Been in All the Rooms",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/first-day-where-you-have-been-in-all-the-rooms",
- "solutionLink": "#"
- },
- {
- "problemName": "1998. GCD Sort of an Array",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/gcd-sort-of-an-array",
- "solutionLink": "#"
- },
- {
- "problemName": "1999. Smallest Greater Multiple Made of Two Digits",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/smallest-greater-multiple-made-of-two-digits",
- "solutionLink": "#"
- }
-];
-
-
-
-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 LeetCode website. You can also click on the solution link to view the solution of the problem.
\ No newline at end of file
diff --git a/dsa-problems/leetcode-problems/2000-2099.md b/dsa-problems/leetcode-problems/2000-2099.md
deleted file mode 100644
index a0fe12a83..000000000
--- a/dsa-problems/leetcode-problems/2000-2099.md
+++ /dev/null
@@ -1,623 +0,0 @@
----
-id: 2000-2099
-title: LeetCode Problems 2000 - 2099
-sidebar_label: 2000 - 2099
-keywords:
- - LeetCode
- - LeetCode Problems
- - LeetCode Problems 2000 - 2099
- - DSA problems
----
-
-
-export const problems = [
- {
- "problemName": "2000. Reverse Prefix of Word",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/reverse-prefix-of-word",
- "solutionLink": "#"
- },
- {
- "problemName": "2001. Number of Pairs of Interchangeable Rectangles",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-pairs-of-interchangeable-rectangles",
- "solutionLink": "#"
- },
- {
- "problemName": "2002. Maximum Product of the Length of Two Palindromic Subsequences",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-product-of-the-length-of-two-palindromic-subsequences",
- "solutionLink": "/dsa-solutions/lc-solutions/2000-2099/maximum-product-of-the-length-of-two-palindromic-subsequences"
- },
- {
- "problemName": "2003. Smallest Missing Genetic Value in Each Subtree",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/smallest-missing-genetic-value-in-each-subtree",
- "solutionLink": "#"
- },
- {
- "problemName": "2004. The Number of Seniors and Juniors to Join the Company",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/the-number-of-seniors-and-juniors-to-join-the-company",
- "solutionLink": "#"
- },
- {
- "problemName": "2005. Subtree Removal Game with Fibonacci Tree",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/subtree-removal-game-with-fibonacci-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "2006. Count Number of Pairs With Absolute Difference K",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/count-number-of-pairs-with-absolute-difference-k",
- "solutionLink": "#"
- },
- {
- "problemName": "2007. Find Original Array From Doubled Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-original-array-from-doubled-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2008. Maximum Earnings From Taxi",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-earnings-from-taxi",
- "solutionLink": "#"
- },
- {
- "problemName": "2009. Minimum Number of Operations to Make Array Continuous",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-number-of-operations-to-make-array-continuous",
- "solutionLink": "#"
- },
- {
- "problemName": "2010. The Number of Seniors and Juniors to Join the Company II",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/the-number-of-seniors-and-juniors-to-join-the-company-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "2011. Final Value of Variable After Performing Operations",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/final-value-of-variable-after-performing-operations",
- "solutionLink": "#"
- },
- {
- "problemName": "2012. Sum of Beauty in the Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/sum-of-beauty-in-the-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2013. Detect Squares",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/detect-squares",
- "solutionLink": "#"
- },
- {
- "problemName": "2014. Longest Subsequence Repeated k Times",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/longest-subsequence-repeated-k-times",
- "solutionLink": "/dsa-solutions/lc-solutions/2000-2099/longest-subsequence-repeated-k-times"
- },
- {
- "problemName": "2015. Average Height of Buildings in Each Segment",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/average-height-of-buildings-in-each-segment",
- "solutionLink": "#"
- },
- {
- "problemName": "2016. Maximum Difference Between Increasing Elements",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/maximum-difference-between-increasing-elements",
- "solutionLink": "#"
- },
- {
- "problemName": "2017. Grid Game",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/grid-game",
- "solutionLink": "#"
- },
- {
- "problemName": "2018. Check if Word Can Be Placed In Crossword",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/check-if-word-can-be-placed-in-crossword",
- "solutionLink": "#"
- },
- {
- "problemName": "2019. The Score of Students Solving Math Expression",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/the-score-of-students-solving-math-expression",
- "solutionLink": "#"
- },
- {
- "problemName": "2020. Number of Accounts That Did Not Stream",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-accounts-that-did-not-stream",
- "solutionLink": "#"
- },
- {
- "problemName": "2021. Brightest Position on Street",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/brightest-position-on-street",
- "solutionLink": "#"
- },
- {
- "problemName": "2022. Convert 1D Array Into 2D Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/convert-1d-array-into-2d-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2023. Number of Pairs of Strings With Concatenation Equal to Target",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-pairs-of-strings-with-concatenation-equal-to-target",
- "solutionLink": "#"
- },
- {
- "problemName": "2024. Maximize the Confusion of an Exam",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximize-the-confusion-of-an-exam",
- "solutionLink": "#"
- },
- {
- "problemName": "2025. Maximum Number of Ways to Partition an Array",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-number-of-ways-to-partition-an-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2026. Low-Quality Problems",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/low-quality-problems",
- "solutionLink": "#"
- },
- {
- "problemName": "2027. Minimum Moves to Convert String",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/minimum-moves-to-convert-string",
- "solutionLink": "#"
- },
- {
- "problemName": "2028. Find Missing Observations",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-missing-observations",
- "solutionLink": "#"
- },
- {
- "problemName": "2029. Stone Game IX",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/stone-game-ix",
- "solutionLink": "#"
- },
- {
- "problemName": "2030. Smallest K-Length Subsequence With Occurrences of a Letter",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/smallest-k-length-subsequence-with-occurrences-of-a-letter",
- "solutionLink": "#"
- },
- {
- "problemName": "2031. Count Subarrays With More Ones Than Zeros",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-subarrays-with-more-ones-than-zeros",
- "solutionLink": "#"
- },
- {
- "problemName": "2032. Two Out of Three",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/two-out-of-three",
- "solutionLink": "#"
- },
- {
- "problemName": "2033. Minimum Operations to Make a Uni-Value Grid",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-operations-to-make-a-uni-value-grid",
- "solutionLink": "#"
- },
- {
- "problemName": "2034. Stock Price Fluctuation",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/stock-price-fluctuation",
- "solutionLink": "#"
- },
- {
- "problemName": "2035. Partition Array Into Two Arrays to Minimize Sum Difference",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/partition-array-into-two-arrays-to-minimize-sum-difference",
- "solutionLink": "#"
- },
- {
- "problemName": "2036. Maximum Alternating Subarray Sum",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-alternating-subarray-sum",
- "solutionLink": "#"
- },
- {
- "problemName": "2037. Minimum Number of Moves to Seat Everyone",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/minimum-number-of-moves-to-seat-everyone",
- "solutionLink": "#"
- },
- {
- "problemName": "2038. Remove Colored Pieces if Both Neighbors are the Same Color",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/remove-colored-pieces-if-both-neighbors-are-the-same-color",
- "solutionLink": "/dsa-solutions/lc-solutions/2000-2099/remove-colored-pieces-if-both-neighbors-are-the-same-color"
- },
- {
- "problemName": "2039. The Time When the Network Becomes Idle",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/the-time-when-the-network-becomes-idle",
- "solutionLink": "#"
- },
- {
- "problemName": "2040. Kth Smallest Product of Two Sorted Arrays",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/kth-smallest-product-of-two-sorted-arrays",
- "solutionLink": "#"
- },
- {
- "problemName": "2041. Accepted Candidates From the Interviews",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/accepted-candidates-from-the-interviews",
- "solutionLink": "#"
- },
- {
- "problemName": "2042. Check if Numbers Are Ascending in a Sentence",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/check-if-numbers-are-ascending-in-a-sentence",
- "solutionLink": "#"
- },
- {
- "problemName": "2043. Simple Bank System",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/simple-bank-system",
- "solutionLink": "#"
- },
- {
- "problemName": "2044. Count Number of Maximum Bitwise-OR Subsets",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-number-of-maximum-bitwise-or-subsets",
- "solutionLink": "#"
- },
- {
- "problemName": "2045. Second Minimum Time to Reach Destination",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/second-minimum-time-to-reach-destination",
- "solutionLink": "#"
- },
- {
- "problemName": "2046. Sort Linked List Already Sorted Using Absolute Values",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/sort-linked-list-already-sorted-using-absolute-values",
- "solutionLink": "#"
- },
- {
- "problemName": "2047. Number of Valid Words in a Sentence",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/number-of-valid-words-in-a-sentence",
- "solutionLink": "#"
- },
- {
- "problemName": "2048. Next Greater Numerically Balanced Number",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/next-greater-numerically-balanced-number",
- "solutionLink": "#"
- },
- {
- "problemName": "2049. Count Nodes With the Highest Score",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-nodes-with-the-highest-score",
- "solutionLink": "#"
- },
- {
- "problemName": "2050. Parallel Courses III",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/parallel-courses-iii",
- "solutionLink": "#"
- },
- {
- "problemName": "2051. The Category of Each Member in the Store",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/the-category-of-each-member-in-the-store",
- "solutionLink": "#"
- },
- {
- "problemName": "2052. Minimum Cost to Separate Sentence Into Rows",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-cost-to-separate-sentence-into-rows",
- "solutionLink": "#"
- },
- {
- "problemName": "2053. Kth Distinct String in an Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/kth-distinct-string-in-an-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2054. Two Best Non-Overlapping Events",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/two-best-non-overlapping-events",
- "solutionLink": "#"
- },
- {
- "problemName": "2055. Plates Between Candles",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/plates-between-candles",
- "solutionLink": "#"
- },
- {
- "problemName": "2056. Number of Valid Move Combinations On Chessboard",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/number-of-valid-move-combinations-on-chessboard",
- "solutionLink": "#"
- },
- {
- "problemName": "2057. Smallest Index With Equal Value",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/smallest-index-with-equal-value",
- "solutionLink": "#"
- },
- {
- "problemName": "2058. Find the Minimum and Maximum Number of Nodes Between Critical Points",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-the-minimum-and-maximum-number-of-nodes-between-critical-points",
- "solutionLink": "#"
- },
- {
- "problemName": "2059. Minimum Operations to Convert Number",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-operations-to-convert-number",
- "solutionLink": "#"
- },
- {
- "problemName": "2060. Check if an Original String Exists Given Two Encoded Strings",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/check-if-an-original-string-exists-given-two-encoded-strings",
- "solutionLink": "#"
- },
- {
- "problemName": "2061. Number of Spaces Cleaning Robot Cleaned",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-spaces-cleaning-robot-cleaned",
- "solutionLink": "#"
- },
- {
- "problemName": "2062. Count Vowel Substrings of a String",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/count-vowel-substrings-of-a-string",
- "solutionLink": "#"
- },
- {
- "problemName": "2063. Vowels of All Substrings",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/vowels-of-all-substrings",
- "solutionLink": "/dsa-solutions/lc-solutions/2000-2099/vowels-of-all-substrings"
- },
- {
- "problemName": "2064. Minimized Maximum of Products Distributed to Any Store",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimized-maximum-of-products-distributed-to-any-store",
- "solutionLink": "#"
- },
- {
- "problemName": "2065. Maximum Path Quality of a Graph",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-path-quality-of-a-graph",
- "solutionLink": "#"
- },
- {
- "problemName": "2066. Account Balance",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/account-balance",
- "solutionLink": "#"
- },
- {
- "problemName": "2067. Number of Equal Count Substrings",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-equal-count-substrings",
- "solutionLink": "#"
- },
- {
- "problemName": "2068. Check Whether Two Strings are Almost Equivalent",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/check-whether-two-strings-are-almost-equivalent",
- "solutionLink": "#"
- },
- {
- "problemName": "2069. Walking Robot Simulation II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/walking-robot-simulation-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "2070. Most Beautiful Item for Each Query",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/most-beautiful-item-for-each-query",
- "solutionLink": "#"
- },
- {
- "problemName": "2071. Maximum Number of Tasks You Can Assign",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-number-of-tasks-you-can-assign",
- "solutionLink": "#"
- },
- {
- "problemName": "2072. The Winner University",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/the-winner-university",
- "solutionLink": "#"
- },
- {
- "problemName": "2073. Time Needed to Buy Tickets",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/time-needed-to-buy-tickets",
- "solutionLink": "#"
- },
- {
- "problemName": "2074. Reverse Nodes in Even Length Groups",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/reverse-nodes-in-even-length-groups",
- "solutionLink": "#"
- },
- {
- "problemName": "2075. Decode the Slanted Ciphertext",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/decode-the-slanted-ciphertext",
- "solutionLink": "#"
- },
- {
- "problemName": "2076. Process Restricted Friend Requests",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/process-restricted-friend-requests",
- "solutionLink": "#"
- },
- {
- "problemName": "2077. Paths in Maze That Lead to Same Room",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/paths-in-maze-that-lead-to-same-room",
- "solutionLink": "#"
- },
- {
- "problemName": "2078. Two Furthest Houses With Different Colors",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/two-furthest-houses-with-different-colors",
- "solutionLink": "#"
- },
- {
- "problemName": "2079. Watering Plants",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/watering-plants",
- "solutionLink": "#"
- },
- {
- "problemName": "2080. Range Frequency Queries",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/range-frequency-queries",
- "solutionLink": "#"
- },
- {
- "problemName": "2081. Sum of k-Mirror Numbers",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/sum-of-k-mirror-numbers",
- "solutionLink": "#"
- },
- {
- "problemName": "2082. The Number of Rich Customers",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/the-number-of-rich-customers",
- "solutionLink": "#"
- },
- {
- "problemName": "2083. Substrings That Begin and End With the Same Letter",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/substrings-that-begin-and-end-with-the-same-letter",
- "solutionLink": "#"
- },
- {
- "problemName": "2084. Drop Type 1 Orders for Customers With Type 0 Orders",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/drop-type-1-orders-for-customers-with-type-0-orders",
- "solutionLink": "#"
- },
- {
- "problemName": "2085. Count Common Words With One Occurrence",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/count-common-words-with-one-occurrence",
- "solutionLink": "#"
- },
- {
- "problemName": "2086. Minimum Number of Food Buckets to Feed the Hamsters",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-number-of-food-buckets-to-feed-the-hamsters",
- "solutionLink": "#"
- },
- {
- "problemName": "2087. Minimum Cost Homecoming of a Robot in a Grid",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-cost-homecoming-of-a-robot-in-a-grid",
- "solutionLink": "#"
- },
- {
- "problemName": "2088. Count Fertile Pyramids in a Land",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-fertile-pyramids-in-a-land",
- "solutionLink": "#"
- },
- {
- "problemName": "2089. Find Target Indices After Sorting Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-target-indices-after-sorting-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2090. K Radius Subarray Averages",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/k-radius-subarray-averages",
- "solutionLink": "#"
- },
- {
- "problemName": "2091. Removing Minimum and Maximum From Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/removing-minimum-and-maximum-from-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2092. Find All People With Secret",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/find-all-people-with-secret",
- "solutionLink": "#"
- },
- {
- "problemName": "2093. Minimum Cost to Reach City With Discounts",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-cost-to-reach-city-with-discounts",
- "solutionLink": "#"
- },
- {
- "problemName": "2094. Finding 3-Digit Even Numbers",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/finding-3-digit-even-numbers",
- "solutionLink": "#"
- },
- {
- "problemName": "2095. Delete the Middle Node of a Linked List",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/delete-the-middle-node-of-a-linked-list",
- "solutionLink": "#"
- },
- {
- "problemName": "2096. Step-By-Step Directions From a Binary Tree Node to Another",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/step-by-step-directions-from-a-binary-tree-node-to-another",
- "solutionLink": "/dsa-solutions/lc-solutions/2000-2099/step-by-step-directions-from-a-binary-tree-node-to-another"
- },
- {
- "problemName": "2097. Valid Arrangement of Pairs",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/valid-arrangement-of-pairs",
- "solutionLink": "#"
- },
- {
- "problemName": "2098. Subsequence of Size K With the Largest Even Sum",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/subsequence-of-size-k-with-the-largest-even-sum",
- "solutionLink": "#"
- },
- {
- "problemName": "2099. Find Subsequence of Length K With the Largest Sum",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-subsequence-of-length-k-with-the-largest-sum",
- "solutionLink": "#"
- }
-];
-
-
-
-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 LeetCode website. You can also click on the solution link to view the solution of the problem.
\ No newline at end of file
diff --git a/dsa-problems/leetcode-problems/2100-2199.md b/dsa-problems/leetcode-problems/2100-2199.md
deleted file mode 100644
index 046bff794..000000000
--- a/dsa-problems/leetcode-problems/2100-2199.md
+++ /dev/null
@@ -1,623 +0,0 @@
----
-id: 2100-2199
-title: LeetCode Problems 2100 - 2199
-sidebar_label: 2100 - 2199
-keywords:
- - LeetCode
- - LeetCode Problems
- - LeetCode Problems 2100 - 2199
- - DSA problems
----
-
-export const problems = [
- {
- "problemName": "2100. Find Good Days to Rob the Bank",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-good-days-to-rob-the-bank",
- "solutionLink": "#"
- },
- {
- "problemName": "2101. Detonate the Maximum Bombs",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/detonate-the-maximum-bombs",
- "solutionLink": "#"
- },
- {
- "problemName": "2102. Sequentially Ordinal Rank Tracker",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/sequentially-ordinal-rank-tracker",
- "solutionLink": "#"
- },
- {
- "problemName": "2103. Rings and Rods",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/rings-and-rods",
- "solutionLink": "#"
- },
- {
- "problemName": "2104. Sum of Subarray Ranges",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/sum-of-subarray-ranges",
- "solutionLink": "#"
- },
- {
- "problemName": "2105. Watering Plants II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/watering-plants-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "2106. Maximum Fruits Harvested After at Most K Steps",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-fruits-harvested-after-at-most-k-steps",
- "solutionLink": "#"
- },
- {
- "problemName": "2107. Number of Unique Flavors After Sharing K Candies",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-unique-flavors-after-sharing-k-candies",
- "solutionLink": "#"
- },
- {
- "problemName": "2108. Find First Palindromic String in the Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-first-palindromic-string-in-the-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2109. Adding Spaces to a String",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/adding-spaces-to-a-string",
- "solutionLink": "#"
- },
- {
- "problemName": "2110. Number of Smooth Descent Periods of a Stock",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-smooth-descent-periods-of-a-stock",
- "solutionLink": "#"
- },
- {
- "problemName": "2111. Minimum Operations to Make the Array K-Increasing",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-operations-to-make-the-array-k-increasing",
- "solutionLink": "#"
- },
- {
- "problemName": "2112. The Airport With the Most Traffic",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/the-airport-with-the-most-traffic",
- "solutionLink": "#"
- },
- {
- "problemName": "2113. Elements in Array After Removing and Replacing Elements",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/elements-in-array-after-removing-and-replacing-elements",
- "solutionLink": "#"
- },
- {
- "problemName": "2114. Maximum Number of Words Found in Sentences",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/maximum-number-of-words-found-in-sentences",
- "solutionLink": "#"
- },
- {
- "problemName": "2115. Find All Possible Recipes from Given Supplies",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-all-possible-recipes-from-given-supplies",
- "solutionLink": "#"
- },
- {
- "problemName": "2116. Check if a Parentheses String Can Be Valid",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/check-if-a-parentheses-string-can-be-valid",
- "solutionLink": "#"
- },
- {
- "problemName": "2117. Abbreviating the Product of a Range",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/abbreviating-the-product-of-a-range",
- "solutionLink": "#"
- },
- {
- "problemName": "2118. Build the Equation",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/build-the-equation",
- "solutionLink": "#"
- },
- {
- "problemName": "2119. A Number After a Double Reversal",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/a-number-after-a-double-reversal",
- "solutionLink": "#"
- },
- {
- "problemName": "2120. Execution of All Suffix Instructions Staying in a Grid",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/execution-of-all-suffix-instructions-staying-in-a-grid",
- "solutionLink": "#"
- },
- {
- "problemName": "2121. Intervals Between Identical Elements",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/intervals-between-identical-elements",
- "solutionLink": "#"
- },
- {
- "problemName": "2122. Recover the Original Array",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/recover-the-original-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2123. Minimum Operations to Remove Adjacent Ones in Matrix",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-operations-to-remove-adjacent-ones-in-matrix",
- "solutionLink": "#"
- },
- {
- "problemName": "2124. Check if All A's Appears Before All B's",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/check-if-all-as-appears-before-all-bs",
- "solutionLink": "#"
- },
- {
- "problemName": "2125. Number of Laser Beams in a Bank",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-laser-beams-in-a-bank",
- "solutionLink": "#"
- },
- {
- "problemName": "2126. Destroying Asteroids",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/destroying-asteroids",
- "solutionLink": "#"
- },
- {
- "problemName": "2127. Maximum Employees to Be Invited to a Meeting",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-employees-to-be-invited-to-a-meeting",
- "solutionLink": "#"
- },
- {
- "problemName": "2128. Remove All Ones With Row and Column Flips",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/remove-all-ones-with-row-and-column-flips",
- "solutionLink": "#"
- },
- {
- "problemName": "2129. Capitalize the Title",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/capitalize-the-title",
- "solutionLink": "#"
- },
- {
- "problemName": "2130. Maximum Twin Sum of a Linked List",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-twin-sum-of-a-linked-list",
- "solutionLink": "#"
- },
- {
- "problemName": "2131. Longest Palindrome by Concatenating Two Letter Words",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/longest-palindrome-by-concatenating-two-letter-words",
- "solutionLink": "#"
- },
- {
- "problemName": "2132. Stamping the Grid",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/stamping-the-grid",
- "solutionLink": "#"
- },
- {
- "problemName": "2133. Check if Every Row and Column Contains All Numbers",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/check-if-every-row-and-column-contains-all-numbers",
- "solutionLink": "#"
- },
- {
- "problemName": "2134. Minimum Swaps to Group All 1's Together II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-swaps-to-group-all-1s-together-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "2135. Count Words Obtained After Adding a Letter",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-words-obtained-after-adding-a-letter",
- "solutionLink": "#"
- },
- {
- "problemName": "2136. Earliest Possible Day of Full Bloom",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/earliest-possible-day-of-full-bloom",
- "solutionLink": "#"
- },
- {
- "problemName": "2137. Pour Water Between Buckets to Make Water Levels Equal",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/pour-water-between-buckets-to-make-water-levels-equal",
- "solutionLink": "#"
- },
- {
- "problemName": "2138. Divide a String Into Groups of Size k",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/divide-a-string-into-groups-of-size-k",
- "solutionLink": "#"
- },
- {
- "problemName": "2139. Minimum Moves to Reach Target Score",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-moves-to-reach-target-score",
- "solutionLink": "#"
- },
- {
- "problemName": "2140. Solving Questions With Brainpower",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/solving-questions-with-brainpower",
- "solutionLink": "#"
- },
- {
- "problemName": "2141. Maximum Running Time of N Computers",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-running-time-of-n-computers",
- "solutionLink": "#"
- },
- {
- "problemName": "2142. The Number of Passengers in Each Bus I",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/the-number-of-passengers-in-each-bus-i",
- "solutionLink": "#"
- },
- {
- "problemName": "2143. Choose Numbers From Two Arrays in Range",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/choose-numbers-from-two-arrays-in-range",
- "solutionLink": "#"
- },
- {
- "problemName": "2144. Minimum Cost of Buying Candies With Discount",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/minimum-cost-of-buying-candies-with-discount",
- "solutionLink": "#"
- },
- {
- "problemName": "2145. Count the Hidden Sequences",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-the-hidden-sequences",
- "solutionLink": "#"
- },
- {
- "problemName": "2146. K Highest Ranked Items Within a Price Range",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/k-highest-ranked-items-within-a-price-range",
- "solutionLink": "#"
- },
- {
- "problemName": "2147. Number of Ways to Divide a Long Corridor",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/number-of-ways-to-divide-a-long-corridor",
- "solutionLink": "#"
- },
- {
- "problemName": "2148. Count Elements With Strictly Smaller and Greater Elements",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/count-elements-with-strictly-smaller-and-greater-elements",
- "solutionLink": "#"
- },
- {
- "problemName": "2149. Rearrange Array Elements by Sign",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/rearrange-array-elements-by-sign",
- "solutionLink": "#"
- },
- {
- "problemName": "2150. Find All Lonely Numbers in the Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-all-lonely-numbers-in-the-array",
- "solutionLink": "/dsa-solutions/lc-solutions/2100-2199/find-all-lonely-numbers-in-the-array"
- },
- {
- "problemName": "2151. Maximum Good People Based on Statements",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-good-people-based-on-statements",
- "solutionLink": "#"
- },
- {
- "problemName": "2152. Minimum Number of Lines to Cover Points",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-number-of-lines-to-cover-points",
- "solutionLink": "#"
- },
- {
- "problemName": "2153. The Number of Passengers in Each Bus II",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/the-number-of-passengers-in-each-bus-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "2154. Keep Multiplying Found Values by Two",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/keep-multiplying-found-values-by-two",
- "solutionLink": "#"
- },
- {
- "problemName": "2155. All Divisions With the Highest Score of a Binary Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/all-divisions-with-the-highest-score-of-a-binary-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2156. Find Substring With Given Hash Value",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/find-substring-with-given-hash-value",
- "solutionLink": "#"
- },
- {
- "problemName": "2157. Groups of Strings",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/groups-of-strings",
- "solutionLink": "#"
- },
- {
- "problemName": "2158. Amount of New Area Painted Each Day",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/amount-of-new-area-painted-each-day",
- "solutionLink": "#"
- },
- {
- "problemName": "2159. Order Two Columns Independently",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/order-two-columns-independently",
- "solutionLink": "#"
- },
- {
- "problemName": "2160. Minimum Sum of Four Digit Number After Splitting Digits",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/minimum-sum-of-four-digit-number-after-splitting-digits",
- "solutionLink": "#"
- },
- {
- "problemName": "2161. Partition Array According to Given Pivot",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/partition-array-according-to-given-pivot",
- "solutionLink": "#"
- },
- {
- "problemName": "2162. Minimum Cost to Set Cooking Time",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-cost-to-set-cooking-time",
- "solutionLink": "#"
- },
- {
- "problemName": "2163. Minimum Difference in Sums After Removal of Elements",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-difference-in-sums-after-removal-of-elements",
- "solutionLink": "#"
- },
- {
- "problemName": "2164. Sort Even and Odd Indices Independently",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/sort-even-and-odd-indices-independently",
- "solutionLink": "#"
- },
- {
- "problemName": "2165. Smallest Value of the Rearranged Number",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/smallest-value-of-the-rearranged-number",
- "solutionLink": "#"
- },
- {
- "problemName": "2166. Design Bitset",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/design-bitset",
- "solutionLink": "#"
- },
- {
- "problemName": "2167. Minimum Time to Remove All Cars Containing Illegal Goods",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-time-to-remove-all-cars-containing-illegal-goods",
- "solutionLink": "#"
- },
- {
- "problemName": "2168. Unique Substrings With Equal Digit Frequency",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/unique-substrings-with-equal-digit-frequency",
- "solutionLink": "#"
- },
- {
- "problemName": "2169. Count Operations to Obtain Zero",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/count-operations-to-obtain-zero",
- "solutionLink": "#"
- },
- {
- "problemName": "2170. Minimum Operations to Make the Array Alternating",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-operations-to-make-the-array-alternating",
- "solutionLink": "#"
- },
- {
- "problemName": "2171. Removing Minimum Number of Magic Beans",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/removing-minimum-number-of-magic-beans",
- "solutionLink": "#"
- },
- {
- "problemName": "2172. Maximum AND Sum of Array",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-and-sum-of-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2173. Longest Winning Streak",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/longest-winning-streak",
- "solutionLink": "#"
- },
- {
- "problemName": "2174. Remove All Ones With Row and Column Flips II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/remove-all-ones-with-row-and-column-flips-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "2175. The Change in Global Rankings",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/the-change-in-global-rankings",
- "solutionLink": "#"
- },
- {
- "problemName": "2176. Count Equal and Divisible Pairs in an Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/count-equal-and-divisible-pairs-in-an-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2177. Find Three Consecutive Integers That Sum to a Given Number",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-three-consecutive-integers-that-sum-to-a-given-number",
- "solutionLink": "/dsa-solutions/lc-solutions/2100-2199/find-three-consecutive-integers-that-sum-to-a-given-number"
- },
- {
- "problemName": "2178. Maximum Split of Positive Even Integers",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-split-of-positive-even-integers",
- "solutionLink": "#"
- },
- {
- "problemName": "2179. Count Good Triplets in an Array",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-good-triplets-in-an-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2180. Count Integers With Even Digit Sum",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/count-integers-with-even-digit-sum",
- "solutionLink": "#"
- },
- {
- "problemName": "2181. Merge Nodes in Between Zeros",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/merge-nodes-in-between-zeros",
- "solutionLink": "#"
- },
- {
- "problemName": "2182. Construct String With Repeat Limit",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/construct-string-with-repeat-limit",
- "solutionLink": "#"
- },
- {
- "problemName": "2183. Count Array Pairs Divisible by K",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-array-pairs-divisible-by-k",
- "solutionLink": "#"
- },
- {
- "problemName": "2184. Number of Ways to Build Sturdy Brick Wall",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-ways-to-build-sturdy-brick-wall",
- "solutionLink": "#"
- },
- {
- "problemName": "2185. Counting Words With a Given Prefix",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/counting-words-with-a-given-prefix",
- "solutionLink": "#"
- },
- {
- "problemName": "2186. Minimum Number of Steps to Make Two Strings Anagram II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-number-of-steps-to-make-two-strings-anagram-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "2187. Minimum Time to Complete Trips",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-time-to-complete-trips",
- "solutionLink": "#"
- },
- {
- "problemName": "2188. Minimum Time to Finish the Race",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-time-to-finish-the-race",
- "solutionLink": "#"
- },
- {
- "problemName": "2189. Number of Ways to Build House of Cards",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-ways-to-build-house-of-cards",
- "solutionLink": "#"
- },
- {
- "problemName": "2190. Most Frequent Number Following Key In an Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/most-frequent-number-following-key-in-an-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2191. Sort the Jumbled Numbers",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/sort-the-jumbled-numbers",
- "solutionLink": "#"
- },
- {
- "problemName": "2192. All Ancestors of a Node in a Directed Acyclic Graph",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/all-ancestors-of-a-node-in-a-directed-acyclic-graph",
- "solutionLink": "/dsa-solutions/lc-solutions/2100-2199/all-ancestors-of-a-node-in-a-directed-acyclic-graph"
- },
- {
- "problemName": "2193. Minimum Number of Moves to Make Palindrome",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-number-of-moves-to-make-palindrome",
- "solutionLink": "#"
- },
- {
- "problemName": "2194. Cells in a Range on an Excel Sheet",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/cells-in-a-range-on-an-excel-sheet",
- "solutionLink": "#"
- },
- {
- "problemName": "2195. Append K Integers With Minimal Sum",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/append-k-integers-with-minimal-sum",
- "solutionLink": "#"
- },
- {
- "problemName": "2196. Create Binary Tree From Descriptions",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/create-binary-tree-from-descriptions",
- "solutionLink": "#"
- },
- {
- "problemName": "2197. Replace Non-Coprime Numbers in Array",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/replace-non-coprime-numbers-in-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2198. Number of Single Divisor Triplets",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-single-divisor-triplets",
- "solutionLink": "#"
- },
- {
- "problemName": "2199. Finding the Topic of Each Post",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/finding-the-topic-of-each-post",
- "solutionLink": "#"
- }
-];
-
-
-
-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 LeetCode website. You can also click on the solution link to view the solution of the problem.
-
diff --git a/dsa-problems/leetcode-problems/2200-2299.md b/dsa-problems/leetcode-problems/2200-2299.md
deleted file mode 100644
index bb8121dd7..000000000
--- a/dsa-problems/leetcode-problems/2200-2299.md
+++ /dev/null
@@ -1,623 +0,0 @@
----
-id: 2200-2299
-title: LeetCode Problems 2200 - 2299
-sidebar_label: 2200 - 2299
-keywords:
- - LeetCode
- - LeetCode Problems
- - LeetCode Problems 2200 - 2299
- - DSA problems
----
-
-
-export const problems = [
- {
- "problemName": "2200. Find All K-Distant Indices in an Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-all-k-distant-indices-in-an-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2201. Count Artifacts That Can Be Extracted",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-artifacts-that-can-be-extracted",
- "solutionLink": "#"
- },
- {
- "problemName": "2202. Maximize the Topmost Element After K Moves",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximize-the-topmost-element-after-k-moves",
- "solutionLink": "#"
- },
- {
- "problemName": "2203. Minimum Weighted Subgraph With the Required Paths",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-weighted-subgraph-with-the-required-paths",
- "solutionLink": "#"
- },
- {
- "problemName": "2204. Distance to a Cycle in Undirected Graph",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/distance-to-a-cycle-in-undirected-graph",
- "solutionLink": "#"
- },
- {
- "problemName": "2205. The Number of Users That Are Eligible for Discount",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/the-number-of-users-that-are-eligible-for-discount",
- "solutionLink": "#"
- },
- {
- "problemName": "2206. Divide Array Into Equal Pairs",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/divide-array-into-equal-pairs",
- "solutionLink": "#"
- },
- {
- "problemName": "2207. Maximize Number of Subsequences in a String",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximize-number-of-subsequences-in-a-string",
- "solutionLink": "#"
- },
- {
- "problemName": "2208. Minimum Operations to Halve Array Sum",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-operations-to-halve-array-sum",
- "solutionLink": "#"
- },
- {
- "problemName": "2209. Minimum White Tiles After Covering With Carpets",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-white-tiles-after-covering-with-carpets",
- "solutionLink": "#"
- },
- {
- "problemName": "2210. Count Hills and Valleys in an Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/count-hills-and-valleys-in-an-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2211. Count Collisions on a Road",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-collisions-on-a-road",
- "solutionLink": "#"
- },
- {
- "problemName": "2212. Maximum Points in an Archery Competition",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-points-in-an-archery-competition",
- "solutionLink": "#"
- },
- {
- "problemName": "2213. Longest Substring of One Repeating Character",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/longest-substring-of-one-repeating-character",
- "solutionLink": "#"
- },
- {
- "problemName": "2214. Minimum Health to Beat Game",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-health-to-beat-game",
- "solutionLink": "#"
- },
- {
- "problemName": "2215. Find the Difference of Two Arrays",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-the-difference-of-two-arrays",
- "solutionLink": "#"
- },
- {
- "problemName": "2216. Minimum Deletions to Make Array Beautiful",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-deletions-to-make-array-beautiful",
- "solutionLink": "#"
- },
- {
- "problemName": "2217. Find Palindrome With Fixed Length",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-palindrome-with-fixed-length",
- "solutionLink": "#"
- },
- {
- "problemName": "2218. Maximum Value of K Coins From Piles",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-value-of-k-coins-from-piles",
- "solutionLink": "#"
- },
- {
- "problemName": "2219. Maximum Sum Score of Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-sum-score-of-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2220. Minimum Bit Flips to Convert Number",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/minimum-bit-flips-to-convert-number",
- "solutionLink": "#"
- },
- {
- "problemName": "2221. Find Triangular Sum of an Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-triangular-sum-of-an-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2222. Number of Ways to Select Buildings",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-ways-to-select-buildings",
- "solutionLink": "#"
- },
- {
- "problemName": "2223. Sum of Scores of Built Strings",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/sum-of-scores-of-built-strings",
- "solutionLink": "#"
- },
- {
- "problemName": "2224. Minimum Number of Operations to Convert Time",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/minimum-number-of-operations-to-convert-time",
- "solutionLink": "#"
- },
- {
- "problemName": "2225. Find Players With Zero or One Losses",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-players-with-zero-or-one-losses",
- "solutionLink": "#"
- },
- {
- "problemName": "2226. Maximum Candies Allocated to K Children",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-candies-allocated-to-k-children",
- "solutionLink": "#"
- },
- {
- "problemName": "2227. Encrypt and Decrypt Strings",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/encrypt-and-decrypt-strings",
- "solutionLink": "#"
- },
- {
- "problemName": "2228. Users With Two Purchases Within Seven Days",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/users-with-two-purchases-within-seven-days",
- "solutionLink": "#"
- },
- {
- "problemName": "2229. Check if an Array Is Consecutive",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/check-if-an-array-is-consecutive",
- "solutionLink": "#"
- },
- {
- "problemName": "2230. The Users That Are Eligible for Discount",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/the-users-that-are-eligible-for-discount",
- "solutionLink": "#"
- },
- {
- "problemName": "2231. Largest Number After Digit Swaps by Parity",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/largest-number-after-digit-swaps-by-parity",
- "solutionLink": "#"
- },
- {
- "problemName": "2232. Minimize Result by Adding Parentheses to Expression",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimize-result-by-adding-parentheses-to-expression",
- "solutionLink": "#"
- },
- {
- "problemName": "2233. Maximum Product After K Increments",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-product-after-k-increments",
- "solutionLink": "#"
- },
- {
- "problemName": "2234. Maximum Total Beauty of the Gardens",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-total-beauty-of-the-gardens",
- "solutionLink": "#"
- },
- {
- "problemName": "2235. Add Two Integers",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/add-two-integers",
- "solutionLink": "/dsa-solutions/lc-solutions/2200-2299/add-two-integers"
- },
- {
- "problemName": "2236. Root Equals Sum of Children",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/root-equals-sum-of-children",
- "solutionLink": "#"
- },
- {
- "problemName": "2237. Count Positions on Street With Required Brightness",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-positions-on-street-with-required-brightness",
- "solutionLink": "#"
- },
- {
- "problemName": "2238. Number of Times a Driver Was a Passenger",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-times-a-driver-was-a-passenger",
- "solutionLink": "#"
- },
- {
- "problemName": "2239. Find Closest Number to Zero",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-closest-number-to-zero",
- "solutionLink": "#"
- },
- {
- "problemName": "2240. Number of Ways to Buy Pens and Pencils",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-ways-to-buy-pens-and-pencils",
- "solutionLink": "#"
- },
- {
- "problemName": "2241. Design an ATM Machine",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/design-an-atm-machine",
- "solutionLink": "#"
- },
- {
- "problemName": "2242. Maximum Score of a Node Sequence",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-score-of-a-node-sequence",
- "solutionLink": "#"
- },
- {
- "problemName": "2243. Calculate Digit Sum of a String",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/calculate-digit-sum-of-a-string",
- "solutionLink": "#"
- },
- {
- "problemName": "2244. Minimum Rounds to Complete All Tasks",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-rounds-to-complete-all-tasks",
- "solutionLink": "#"
- },
- {
- "problemName": "2245. Maximum Trailing Zeros in a Cornered Path",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-trailing-zeros-in-a-cornered-path",
- "solutionLink": "#"
- },
- {
- "problemName": "2246. Longest Path With Different Adjacent Characters",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/longest-path-with-different-adjacent-characters",
- "solutionLink": "#"
- },
- {
- "problemName": "2247. Maximum Cost of Trip With K Highways",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-cost-of-trip-with-k-highways",
- "solutionLink": "#"
- },
- {
- "problemName": "2248. Intersection of Multiple Arrays",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/intersection-of-multiple-arrays",
- "solutionLink": "#"
- },
- {
- "problemName": "2249. Count Lattice Points Inside a Circle",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-lattice-points-inside-a-circle",
- "solutionLink": "#"
- },
- {
- "problemName": "2250. Count Number of Rectangles Containing Each Point",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-number-of-rectangles-containing-each-point",
- "solutionLink": "#"
- },
- {
- "problemName": "2251. Number of Flowers in Full Bloom",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/number-of-flowers-in-full-bloom",
- "solutionLink": "#"
- },
- {
- "problemName": "2252. Dynamic Pivoting of a Table",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/dynamic-pivoting-of-a-table",
- "solutionLink": "#"
- },
- {
- "problemName": "2253. Dynamic Unpivoting of a Table",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/dynamic-unpivoting-of-a-table",
- "solutionLink": "#"
- },
- {
- "problemName": "2254. Design Video Sharing Platform",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/design-video-sharing-platform",
- "solutionLink": "#"
- },
- {
- "problemName": "2255. Count Prefixes of a Given String",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/count-prefixes-of-a-given-string",
- "solutionLink": "#"
- },
- {
- "problemName": "2256. Minimum Average Difference",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-average-difference",
- "solutionLink": "#"
- },
- {
- "problemName": "2257. Count Unguarded Cells in the Grid",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-unguarded-cells-in-the-grid",
- "solutionLink": "#"
- },
- {
- "problemName": "2258. Escape the Spreading Fire",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/escape-the-spreading-fire",
- "solutionLink": "#"
- },
- {
- "problemName": "2259. Remove Digit From Number to Maximize Result",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/remove-digit-from-number-to-maximize-result",
- "solutionLink": "#"
- },
- {
- "problemName": "2260. Minimum Consecutive Cards to Pick Up",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-consecutive-cards-to-pick-up",
- "solutionLink": "/dsa-solutions/lc-solutions/2200-2299/minimum-consecutive-cards-to-pick-up"
- },
- {
- "problemName": "2261. K Divisible Elements Subarrays",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/k-divisible-elements-subarrays",
- "solutionLink": "#"
- },
- {
- "problemName": "2262. Total Appeal of A String",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/total-appeal-of-a-string",
- "solutionLink": "/dsa-solutions/lc-solutions/2200-2300/total-appeal-of-a-string"
- },
- {
- "problemName": "2263. Make Array Non-decreasing or Non-increasing",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/make-array-non-decreasing-or-non-increasing",
- "solutionLink": "#"
- },
- {
- "problemName": "2264. Largest 3-Same-Digit Number in String",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/largest-3-same-digit-number-in-string",
- "solutionLink": "#"
- },
- {
- "problemName": "2265. Count Nodes Equal to Average of Subtree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-nodes-equal-to-average-of-subtree",
- "solutionLink": "#"
- },
- {
- "problemName": "2266. Count Number of Texts",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-number-of-texts",
- "solutionLink": "#"
- },
- {
- "problemName": "2267. Check if There Is a Valid Parentheses String Path",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/check-if-there-is-a-valid-parentheses-string-path",
- "solutionLink": "#"
- },
- {
- "problemName": "2268. Minimum Number of Keypresses",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-number-of-keypresses",
- "solutionLink": "#"
- },
- {
- "problemName": "2269. Find the K-Beauty of a Number",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-the-k-beauty-of-a-number",
- "solutionLink": "#"
- },
- {
- "problemName": "2270. Number of Ways to Split Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-ways-to-split-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2271. Maximum White Tiles Covered by a Carpet",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-white-tiles-covered-by-a-carpet",
- "solutionLink": "#"
- },
- {
- "problemName": "2272. Substring With Largest Variance",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/substring-with-largest-variance",
- "solutionLink": "#"
- },
- {
- "problemName": "2273. Find Resultant Array After Removing Anagrams",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-resultant-array-after-removing-anagrams",
- "solutionLink": "#"
- },
- {
- "problemName": "2274. Maximum Consecutive Floors Without Special Floors",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-consecutive-floors-without-special-floors",
- "solutionLink": "#"
- },
- {
- "problemName": "2275. Largest Combination With Bitwise AND Greater Than Zero",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/largest-combination-with-bitwise-and-greater-than-zero",
- "solutionLink": "#"
- },
- {
- "problemName": "2276. Count Integers in Intervals",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-integers-in-intervals",
- "solutionLink": "#"
- },
- {
- "problemName": "2277. Closest Node to Path in Tree",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/closest-node-to-path-in-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "2278. Percentage of Letter in String",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/percentage-of-letter-in-string",
- "solutionLink": "#"
- },
- {
- "problemName": "2279. Maximum Bags With Full Capacity of Rocks",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-bags-with-full-capacity-of-rocks",
- "solutionLink": "#"
- },
- {
- "problemName": "2280. Minimum Lines to Represent a Line Chart",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-lines-to-represent-a-line-chart",
- "solutionLink": "#"
- },
- {
- "problemName": "2281. Sum of Total Strength of Wizards",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/sum-of-total-strength-of-wizards",
- "solutionLink": "#"
- },
- {
- "problemName": "2282. Number of People That Can Be Seen in a Grid",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-people-that-can-be-seen-in-a-grid",
- "solutionLink": "#"
- },
- {
- "problemName": "2283. Check if Number Has Equal Digit Count and Digit Value",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/check-if-number-has-equal-digit-count-and-digit-value",
- "solutionLink": "#"
- },
- {
- "problemName": "2284. Sender With Largest Word Count",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/sender-with-largest-word-count",
- "solutionLink": "#"
- },
- {
- "problemName": "2285. Maximum Total Importance of Roads",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-total-importance-of-roads",
- "solutionLink": "#"
- },
- {
- "problemName": "2286. Booking Concert Tickets in Groups",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/booking-concert-tickets-in-groups",
- "solutionLink": "/dsa-solutions/lc-solutions/2200-2300/Booking-concert-tickets-in-groups"
- },
- {
- "problemName": "2287. Rearrange Characters to Make Target String",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/rearrange-characters-to-make-target-string",
- "solutionLink": "#"
- },
- {
- "problemName": "2288. Apply Discount to Prices",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/apply-discount-to-prices",
- "solutionLink": "#"
- },
- {
- "problemName": "2289. Steps to Make Array Non-decreasing",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/steps-to-make-array-non-decreasing",
- "solutionLink": "#"
- },
- {
- "problemName": "2290. Minimum Obstacle Removal to Reach Corner",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-obstacle-removal-to-reach-corner",
- "solutionLink": "#"
- },
- {
- "problemName": "2291. Maximum Profit From Trading Stocks",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-profit-from-trading-stocks",
- "solutionLink": "#"
- },
- {
- "problemName": "2292. Products With Three or More Orders in Two Consecutive Years",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/products-with-three-or-more-orders-in-two-consecutive-years",
- "solutionLink": "#"
- },
- {
- "problemName": "2293. Min Max Game",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/min-max-game",
- "solutionLink": "#"
- },
- {
- "problemName": "2294. Partition Array Such That Maximum Difference Is K",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/partition-array-such-that-maximum-difference-is-k",
- "solutionLink": "#"
- },
- {
- "problemName": "2295. Replace Elements in an Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/replace-elements-in-an-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2296. Design a Text Editor",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/design-a-text-editor",
- "solutionLink": "#"
- },
- {
- "problemName": "2297. Jump Game VIII",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/jump-game-viii",
- "solutionLink": "#"
- },
- {
- "problemName": "2298. Tasks Count in the Weekend",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/tasks-count-in-the-weekend",
- "solutionLink": "#"
- },
- {
- "problemName": "2299. Strong Password Checker II",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/strong-password-checker-ii",
- "solutionLink": "#"
- }
-];
-
-
-
-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 LeetCode website. You can also click on the solution link to view the solution of the problem.
\ No newline at end of file
diff --git a/dsa-problems/leetcode-problems/2300-2399.md b/dsa-problems/leetcode-problems/2300-2399.md
deleted file mode 100644
index cc9325d6f..000000000
--- a/dsa-problems/leetcode-problems/2300-2399.md
+++ /dev/null
@@ -1,622 +0,0 @@
----
-id: 2300-2399
-title: LeetCode Problems 2300 - 2399
-sidebar_label: 2300 - 2399
-keywords:
- - LeetCode
- - LeetCode Problems
- - LeetCode Problems 2300 - 2399
- - DSA problems
----
-
-export const problems = [
- {
- "problemName": "2300. Successful Pairs of Spells and Potions",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/successful-pairs-of-spells-and-potions",
- "solutionLink": "#"
- },
- {
- "problemName": "2301. Match Substring After Replacement",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/match-substring-after-replacement",
- "solutionLink": "#"
- },
- {
- "problemName": "2302. Count Subarrays With Score Less Than K",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-subarrays-with-score-less-than-k",
- "solutionLink": "#"
- },
- {
- "problemName": "2303. Calculate Amount Paid in Taxes",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/calculate-amount-paid-in-taxes",
- "solutionLink": "#"
- },
- {
- "problemName": "2304. Minimum Path Cost in a Grid",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-path-cost-in-a-grid",
- "solutionLink": "#"
- },
- {
- "problemName": "2305. Fair Distribution of Cookies",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/fair-distribution-of-cookies",
- "solutionLink": "#"
- },
- {
- "problemName": "2306. Naming a Company",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/naming-a-company",
- "solutionLink": "#"
- },
- {
- "problemName": "2307. Check for Contradictions in Equations",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/check-for-contradictions-in-equations",
- "solutionLink": "#"
- },
- {
- "problemName": "2308. Arrange Table by Gender",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/arrange-table-by-gender",
- "solutionLink": "#"
- },
- {
- "problemName": "2309. Greatest English Letter in Upper and Lower Case",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/greatest-english-letter-in-upper-and-lower-case",
- "solutionLink": "#"
- },
- {
- "problemName": "2310. Sum of Numbers With Units Digit K",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/sum-of-numbers-with-units-digit-k",
- "solutionLink": "#"
- },
- {
- "problemName": "2311. Longest Binary Subsequence Less Than or Equal to K",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/longest-binary-subsequence-less-than-or-equal-to-k",
- "solutionLink": "#"
- },
- {
- "problemName": "2312. Selling Pieces of Wood",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/selling-pieces-of-wood",
- "solutionLink": "#"
- },
- {
- "problemName": "2313. Minimum Flips in Binary Tree to Get Result",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-flips-in-binary-tree-to-get-result",
- "solutionLink": "#"
- },
- {
- "problemName": "2314. The First Day of the Maximum Recorded Degree in Each City",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/the-first-day-of-the-maximum-recorded-degree-in-each-city",
- "solutionLink": "#"
- },
- {
- "problemName": "2315. Count Asterisks",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/count-asterisks",
- "solutionLink": "#"
- },
- {
- "problemName": "2316. Count Unreachable Pairs of Nodes in an Undirected Graph",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-unreachable-pairs-of-nodes-in-an-undirected-graph",
- "solutionLink": "#"
- },
- {
- "problemName": "2317. Maximum XOR After Operations",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-xor-after-operations",
- "solutionLink": "#"
- },
- {
- "problemName": "2318. Number of Distinct Roll Sequences",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/number-of-distinct-roll-sequences",
- "solutionLink": "#"
- },
- {
- "problemName": "2319. Check if Matrix Is X-Matrix",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/check-if-matrix-is-x-matrix",
- "solutionLink": "#"
- },
- {
- "problemName": "2320. Count Number of Ways to Place Houses",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-number-of-ways-to-place-houses",
- "solutionLink": "#"
- },
- {
- "problemName": "2321. Maximum Score Of Spliced Array",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-score-of-spliced-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2322. Minimum Score After Removals on a Tree",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-score-after-removals-on-a-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "2323. Find Minimum Time to Finish All Jobs II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-minimum-time-to-finish-all-jobs-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "2324. Product Sales Analysis IV",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/product-sales-analysis-iv",
- "solutionLink": "#"
- },
- {
- "problemName": "2325. Decode the Message",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/decode-the-message",
- "solutionLink": "#"
- },
- {
- "problemName": "2326. Spiral Matrix IV",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/spiral-matrix-iv",
- "solutionLink": "#"
- },
- {
- "problemName": "2327. Number of People Aware of a Secret",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-people-aware-of-a-secret",
- "solutionLink": "#"
- },
- {
- "problemName": "2328. Number of Increasing Paths in a Grid",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/number-of-increasing-paths-in-a-grid",
- "solutionLink": "#"
- },
- {
- "problemName": "2329. Product Sales Analysis V",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/product-sales-analysis-v",
- "solutionLink": "#"
- },
- {
- "problemName": "2330. Valid Palindrome IV",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/valid-palindrome-iv",
- "solutionLink": "#"
- },
- {
- "problemName": "2331. Evaluate Boolean Binary Tree",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/evaluate-boolean-binary-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "2332. The Latest Time to Catch a Bus",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/the-latest-time-to-catch-a-bus",
- "solutionLink": "#"
- },
- {
- "problemName": "2333. Minimum Sum of Squared Difference",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-sum-of-squared-difference",
- "solutionLink": "#"
- },
- {
- "problemName": "2334. Subarray With Elements Greater Than Varying Threshold",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/subarray-with-elements-greater-than-varying-threshold",
- "solutionLink": "#"
- },
- {
- "problemName": "2335. Minimum Amount of Time to Fill Cups",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/minimum-amount-of-time-to-fill-cups",
- "solutionLink": "#"
- },
- {
- "problemName": "2336. Smallest Number in Infinite Set",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/smallest-number-in-infinite-set",
- "solutionLink": "#"
- },
- {
- "problemName": "2337. Move Pieces to Obtain a String",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/move-pieces-to-obtain-a-string",
- "solutionLink": "#"
- },
- {
- "problemName": "2338. Count the Number of Ideal Arrays",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-the-number-of-ideal-arrays",
- "solutionLink": "#"
- },
- {
- "problemName": "2339. All the Matches of the League",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/all-the-matches-of-the-league",
- "solutionLink": "#"
- },
- {
- "problemName": "2340. Minimum Adjacent Swaps to Make a Valid Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-adjacent-swaps-to-make-a-valid-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2341. Maximum Number of Pairs in Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/maximum-number-of-pairs-in-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2342. Max Sum of a Pair With Equal Sum of Digits",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/max-sum-of-a-pair-with-equal-sum-of-digits",
- "solutionLink": "#"
- },
- {
- "problemName": "2343. Query Kth Smallest Trimmed Number",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/query-kth-smallest-trimmed-number",
- "solutionLink": "#"
- },
- {
- "problemName": "2344. Minimum Deletions to Make Array Divisible",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-deletions-to-make-array-divisible",
- "solutionLink": "#"
- },
- {
- "problemName": "2345. Finding the Number of Visible Mountains",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/finding-the-number-of-visible-mountains",
- "solutionLink": "#"
- },
- {
- "problemName": "2346. Compute the Rank as a Percentage",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/compute-the-rank-as-a-percentage",
- "solutionLink": "#"
- },
- {
- "problemName": "2347. Best Poker Hand",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/best-poker-hand",
- "solutionLink": "#"
- },
- {
- "problemName": "2348. Number of Zero-Filled Subarrays",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-zero-filled-subarrays",
- "solutionLink": "/dsa-solutions/lc-solutions/2300-2399/number-of-zero-filled-subarrays"
- },
- {
- "problemName": "2349. Design a Number Container System",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/design-a-number-container-system",
- "solutionLink": "#"
- },
- {
- "problemName": "2350. Shortest Impossible Sequence of Rolls",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/shortest-impossible-sequence-of-rolls",
- "solutionLink": "#"
- },
- {
- "problemName": "2351. First Letter to Appear Twice",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/first-letter-to-appear-twice",
- "solutionLink": "#"
- },
- {
- "problemName": "2352. Equal Row and Column Pairs",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/equal-row-and-column-pairs",
- "solutionLink": "#"
- },
- {
- "problemName": "2353. Design a Food Rating System",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/design-a-food-rating-system",
- "solutionLink": "/dsa-solutions/lc-solutions/2300-2399/design-a-food-rating-system"
- },
- {
- "problemName": "2354. Number of Excellent Pairs",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/number-of-excellent-pairs",
- "solutionLink": "#"
- },
- {
- "problemName": "2355. Maximum Number of Books You Can Take",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-number-of-books-you-can-take",
- "solutionLink": "#"
- },
- {
- "problemName": "2356. Number of Unique Subjects Taught by Each Teacher",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/number-of-unique-subjects-taught-by-each-teacher",
- "solutionLink": "#"
- },
- {
- "problemName": "2357. Make Array Zero by Subtracting Equal Amounts",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/make-array-zero-by-subtracting-equal-amounts",
- "solutionLink": "#"
- },
- {
- "problemName": "2358. Maximum Number of Groups Entering a Competition",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-number-of-groups-entering-a-competition",
- "solutionLink": "#"
- },
- {
- "problemName": "2359. Find Closest Node to Given Two Nodes",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-closest-node-to-given-two-nodes",
- "solutionLink": "#"
- },
- {
- "problemName": "2360. Longest Cycle in a Graph",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/longest-cycle-in-a-graph",
- "solutionLink": "#"
- },
- {
- "problemName": "2361. Minimum Costs Using the Train Line",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-costs-using-the-train-line",
- "solutionLink": "#"
- },
- {
- "problemName": "2362. Generate the Invoice",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/generate-the-invoice",
- "solutionLink": "#"
- },
- {
- "problemName": "2363. Merge Similar Items",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/merge-similar-items",
- "solutionLink": "#"
- },
- {
- "problemName": "2364. Count Number of Bad Pairs",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-number-of-bad-pairs",
- "solutionLink": "#"
- },
- {
- "problemName": "2365. Task Scheduler II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/task-scheduler-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "2366. Minimum Replacements to Sort the Array",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-replacements-to-sort-the-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2367. Number of Arithmetic Triplets",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/number-of-arithmetic-triplets",
- "solutionLink": "/dsa-solutions/lc-solutions/2300-2399/number-of-arithmetic-triples"
- },
- {
- "problemName": "2368. Reachable Nodes With Restrictions",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/reachable-nodes-with-restrictions",
- "solutionLink": "#"
- },
- {
- "problemName": "2369. Check if There is a Valid Partition For The Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/check-if-there-is-a-valid-partition-for-the-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2370. Longest Ideal Subsequence",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/longest-ideal-subsequence",
- "solutionLink": "#"
- },
- {
- "problemName": "2371. Minimize Maximum Value in a Grid",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimize-maximum-value-in-a-grid",
- "solutionLink": "#"
- },
- {
- "problemName": "2372. Calculate the Influence of Each Salesperson",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/calculate-the-influence-of-each-salesperson",
- "solutionLink": "#"
- },
- {
- "problemName": "2373. Largest Local Values in a Matrix",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/largest-local-values-in-a-matrix",
- "solutionLink": "#"
- },
- {
- "problemName": "2374. Node With Highest Edge Score",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/node-with-highest-edge-score",
- "solutionLink": "#"
- },
- {
- "problemName": "2375. Construct Smallest Number From DI String",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/construct-smallest-number-from-di-string",
- "solutionLink": "#"
- },
- {
- "problemName": "2376. Count Special Integers",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-special-integers",
- "solutionLink": "#"
- },
- {
- "problemName": "2377. Sort the Olympic Table",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/sort-the-olympic-table",
- "solutionLink": "#"
- },
- {
- "problemName": "2378. Choose Edges to Maximize Score in a Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/choose-edges-to-maximize-score-in-a-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "2379. Minimum Recolors to Get K Consecutive Black Blocks",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/minimum-recolors-to-get-k-consecutive-black-blocks",
- "solutionLink": "#"
- },
- {
- "problemName": "2380. Time Needed to Rearrange a Binary String",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/time-needed-to-rearrange-a-binary-string",
- "solutionLink": "#"
- },
- {
- "problemName": "2381. Shifting Letters II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/shifting-letters-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "2382. Maximum Segment Sum After Removals",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-segment-sum-after-removals",
- "solutionLink": "#"
- },
- {
- "problemName": "2383. Minimum Hours of Training to Win a Competition",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/minimum-hours-of-training-to-win-a-competition",
- "solutionLink": "#"
- },
- {
- "problemName": "2384. Largest Palindromic Number",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/largest-palindromic-number",
- "solutionLink": "#"
- },
- {
- "problemName": "2385. Amount of Time for Binary Tree to Be Infected",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/amount-of-time-for-binary-tree-to-be-infected",
- "solutionLink": "#"
- },
- {
- "problemName": "2386. Find the K-Sum of an Array",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/find-the-k-sum-of-an-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2387. Median of a Row Wise Sorted Matrix",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/median-of-a-row-wise-sorted-matrix",
- "solutionLink": "#"
- },
- {
- "problemName": "2388. Change Null Values in a Table to the Previous Value",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/change-null-values-in-a-table-to-the-previous-value",
- "solutionLink": "#"
- },
- {
- "problemName": "2389. Longest Subsequence With Limited Sum",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/longest-subsequence-with-limited-sum",
- "solutionLink": "#"
- },
- {
- "problemName": "2390. Removing Stars From a String",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/removing-stars-from-a-string",
- "solutionLink": "#"
- },
- {
- "problemName": "2391. Minimum Amount of Time to Collect Garbage",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-amount-of-time-to-collect-garbage",
- "solutionLink": "#"
- },
- {
- "problemName": "2392. Build a Matrix With Conditions",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/build-a-matrix-with-conditions",
- "solutionLink": "#"
- },
- {
- "problemName": "2393. Count Strictly Increasing Subarrays",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-strictly-increasing-subarrays",
- "solutionLink": "#"
- },
- {
- "problemName": "2394. Employees With Deductions",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/employees-with-deductions",
- "solutionLink": "#"
- },
- {
- "problemName": "2395. Find Subarrays With Equal Sum",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-subarrays-with-equal-sum",
- "solutionLink": "#"
- },
- {
- "problemName": "2396. Strictly Palindromic Number",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/strictly-palindromic-number",
- "solutionLink": "#"
- },
- {
- "problemName": "2397. Maximum Rows Covered by Columns",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-rows-covered-by-columns",
- "solutionLink": "#"
- },
- {
- "problemName": "2398. Maximum Number of Robots Within Budget",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-number-of-robots-within-budget",
- "solutionLink": "#"
- },
- {
- "problemName": "2399. Check Distances Between Same Letters",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/check-distances-between-same-letters",
- "solutionLink": "#"
- }
-];
-
-
-
-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 LeetCode website. You can also click on the solution link to view the solution of the problem.
\ No newline at end of file
diff --git a/dsa-problems/leetcode-problems/2400-2499.md b/dsa-problems/leetcode-problems/2400-2499.md
deleted file mode 100644
index f7376a162..000000000
--- a/dsa-problems/leetcode-problems/2400-2499.md
+++ /dev/null
@@ -1,622 +0,0 @@
----
-id: 2400-2499
-title: LeetCode Problems 2400 - 2499
-sidebar_label: 2400 - 2499
-keywords:
- - LeetCode
- - LeetCode Problems
- - LeetCode Problems 2400 - 2499
- - DSA problems
----
-
-export const problems = [
- {
- "problemName": "2400. Number of Ways to Reach a Position After Exactly k Steps",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-ways-to-reach-a-position-after-exactly-k-steps",
- "solutionLink": "#"
- },
- {
- "problemName": "2401. Longest Nice Subarray",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/longest-nice-subarray",
- "solutionLink": "#"
- },
- {
- "problemName": "2402. Meeting Rooms III",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/meeting-rooms-iii",
- "solutionLink": "#"
- },
- {
- "problemName": "2403. Minimum Time to Kill All Monsters",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-time-to-kill-all-monsters",
- "solutionLink": "#"
- },
- {
- "problemName": "2404. Most Frequent Even Element",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/most-frequent-even-element",
- "solutionLink": "#"
- },
- {
- "problemName": "2405. Optimal Partition of String",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/optimal-partition-of-string",
- "solutionLink": "#"
- },
- {
- "problemName": "2406. Divide Intervals Into Minimum Number of Groups",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/divide-intervals-into-minimum-number-of-groups",
- "solutionLink": "#"
- },
- {
- "problemName": "2407. Longest Increasing Subsequence II",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/longest-increasing-subsequence-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "2408. Design SQL",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/design-sql",
- "solutionLink": "#"
- },
- {
- "problemName": "2409. Count Days Spent Together",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/count-days-spent-together",
- "solutionLink": "#"
- },
- {
- "problemName": "2410. Maximum Matching of Players With Trainers",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-matching-of-players-with-trainers",
- "solutionLink": "#"
- },
- {
- "problemName": "2411. Smallest Subarrays With Maximum Bitwise OR",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/smallest-subarrays-with-maximum-bitwise-or",
- "solutionLink": "#"
- },
- {
- "problemName": "2412. Minimum Money Required Before Transactions",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-money-required-before-transactions",
- "solutionLink": "#"
- },
- {
- "problemName": "2413. Smallest Even Multiple",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/smallest-even-multiple",
- "solutionLink": "#"
- },
- {
- "problemName": "2414. Length of the Longest Alphabetical Continuous Substring",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/length-of-the-longest-alphabetical-continuous-substring",
- "solutionLink": "/dsa-solutions/lc-solutions/2400-2499/length-of-the-longest-alphabetical-continuous-substring"
- },
- {
- "problemName": "2415. Reverse Odd Levels of Binary Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/reverse-odd-levels-of-binary-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "2416. Sum of Prefix Scores of Strings",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/sum-of-prefix-scores-of-strings",
- "solutionLink": "#"
- },
- {
- "problemName": "2417. Closest Fair Integer",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/closest-fair-integer",
- "solutionLink": "#"
- },
- {
- "problemName": "2418. Sort the People",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/sort-the-people",
- "solutionLink": "#"
- },
- {
- "problemName": "2419. Longest Subarray With Maximum Bitwise AND",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/longest-subarray-with-maximum-bitwise-and",
- "solutionLink": "#"
- },
- {
- "problemName": "2420. Find All Good Indices",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-all-good-indices",
- "solutionLink": "#"
- },
- {
- "problemName": "2421. Number of Good Paths",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/number-of-good-paths",
- "solutionLink": "#"
- },
- {
- "problemName": "2422. Merge Operations to Turn Array Into a Palindrome",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/merge-operations-to-turn-array-into-a-palindrome",
- "solutionLink": "#"
- },
- {
- "problemName": "2423. Remove Letter To Equalize Frequency",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/remove-letter-to-equalize-frequency",
- "solutionLink": "#"
- },
- {
- "problemName": "2424. Longest Uploaded Prefix",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/longest-uploaded-prefix",
- "solutionLink": "#"
- },
- {
- "problemName": "2425. Bitwise XOR of All Pairings",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/bitwise-xor-of-all-pairings",
- "solutionLink": "#"
- },
- {
- "problemName": "2426. Number of Pairs Satisfying Inequality",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/number-of-pairs-satisfying-inequality",
- "solutionLink": "#"
- },
- {
- "problemName": "2427. Number of Common Factors",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/number-of-common-factors",
- "solutionLink": "#"
- },
- {
- "problemName": "2428. Maximum Sum of an Hourglass",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-sum-of-an-hourglass",
- "solutionLink": "#"
- },
- {
- "problemName": "2429. Minimize XOR",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimize-xor",
- "solutionLink": "#"
- },
- {
- "problemName": "2430. Maximum Deletions on a String",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-deletions-on-a-string",
- "solutionLink": "#"
- },
- {
- "problemName": "2431. Maximize Total Tastiness of Purchased Fruits",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximize-total-tastiness-of-purchased-fruits",
- "solutionLink": "#"
- },
- {
- "problemName": "2432. The Employee That Worked on the Longest Task",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/the-employee-that-worked-on-the-longest-task",
- "solutionLink": "#"
- },
- {
- "problemName": "2433. Find The Original Array of Prefix Xor",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-the-original-array-of-prefix-xor",
- "solutionLink": "#"
- },
- {
- "problemName": "2434. Using a Robot to Print the Lexicographically Smallest String",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/using-a-robot-to-print-the-lexicographically-smallest-string",
- "solutionLink": "#"
- },
- {
- "problemName": "2435. Paths in Matrix Whose Sum Is Divisible by K",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/paths-in-matrix-whose-sum-is-divisible-by-k",
- "solutionLink": "#"
- },
- {
- "problemName": "2436. Minimum Split Into Subarrays With GCD Greater Than One",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-split-into-subarrays-with-gcd-greater-than-one",
- "solutionLink": "#"
- },
- {
- "problemName": "2437. Number of Valid Clock Times",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/number-of-valid-clock-times",
- "solutionLink": "#"
- },
- {
- "problemName": "2438. Range Product Queries of Powers",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/range-product-queries-of-powers",
- "solutionLink": "#"
- },
- {
- "problemName": "2439. Minimize Maximum of Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimize-maximum-of-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2440. Create Components With Same Value",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/create-components-with-same-value",
- "solutionLink": "#"
- },
- {
- "problemName": "2441. Largest Positive Integer That Exists With Its Negative",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/largest-positive-integer-that-exists-with-its-negative",
- "solutionLink": "#"
- },
- {
- "problemName": "2442. Count Number of Distinct Integers After Reverse Operations",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-number-of-distinct-integers-after-reverse-operations",
- "solutionLink": "#"
- },
- {
- "problemName": "2443. Sum of Number and Its Reverse",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/sum-of-number-and-its-reverse",
- "solutionLink": "#"
- },
- {
- "problemName": "2444. Count Subarrays With Fixed Bounds",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-subarrays-with-fixed-bounds",
- "solutionLink": "#"
- },
- {
- "problemName": "2445. Number of Nodes With Value One",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-nodes-with-value-one",
- "solutionLink": "#"
- },
- {
- "problemName": "2446. Determine if Two Events Have Conflict",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/determine-if-two-events-have-conflict",
- "solutionLink": "#"
- },
- {
- "problemName": "2447. Number of Subarrays With GCD Equal to K",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-subarrays-with-gcd-equal-to-k",
- "solutionLink": "#"
- },
- {
- "problemName": "2448. Minimum Cost to Make Array Equal",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-cost-to-make-array-equal",
- "solutionLink": "#"
- },
- {
- "problemName": "2449. Minimum Number of Operations to Make Arrays Similar",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-number-of-operations-to-make-arrays-similar",
- "solutionLink": "#"
- },
- {
- "problemName": "2450. Number of Distinct Binary Strings After Applying Operations",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-distinct-binary-strings-after-applying-operations",
- "solutionLink": "#"
- },
- {
- "problemName": "2451. Odd String Difference",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/odd-string-difference",
- "solutionLink": "#"
- },
- {
- "problemName": "2452. Words Within Two Edits of Dictionary",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/words-within-two-edits-of-dictionary",
- "solutionLink": "#"
- },
- {
- "problemName": "2453. Destroy Sequential Targets",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/destroy-sequential-targets",
- "solutionLink": "#"
- },
- {
- "problemName": "2454. Next Greater Element IV",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/next-greater-element-iv",
- "solutionLink": "#"
- },
- {
- "problemName": "2455. Average Value of Even Numbers That Are Divisible by Three",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/average-value-of-even-numbers-that-are-divisible-by-three",
- "solutionLink": "#"
- },
- {
- "problemName": "2456. Most Popular Video Creator",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/most-popular-video-creator",
- "solutionLink": "#"
- },
- {
- "problemName": "2457. Minimum Addition to Make Integer Beautiful",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-addition-to-make-integer-beautiful",
- "solutionLink": "#"
- },
- {
- "problemName": "2458. Height of Binary Tree After Subtree Removal Queries",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/height-of-binary-tree-after-subtree-removal-queries",
- "solutionLink": "#"
- },
- {
- "problemName": "2459. Sort Array by Moving Items to Empty Space",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/sort-array-by-moving-items-to-empty-space",
- "solutionLink": "#"
- },
- {
- "problemName": "2460. Apply Operations to an Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/apply-operations-to-an-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2461. Maximum Sum of Distinct Subarrays With Length K",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-sum-of-distinct-subarrays-with-length-k",
- "solutionLink": "#"
- },
- {
- "problemName": "2462. Total Cost to Hire K Workers",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/total-cost-to-hire-k-workers",
- "solutionLink": "#"
- },
- {
- "problemName": "2463. Minimum Total Distance Traveled",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-total-distance-traveled",
- "solutionLink": "#"
- },
- {
- "problemName": "2464. Minimum Subarrays in a Valid Split",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-subarrays-in-a-valid-split",
- "solutionLink": "#"
- },
- {
- "problemName": "2465. Number of Distinct Averages",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/number-of-distinct-averages",
- "solutionLink": "#"
- },
- {
- "problemName": "2466. Count Ways To Build Good Strings",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-ways-to-build-good-strings",
- "solutionLink": "#"
- },
- {
- "problemName": "2467. Most Profitable Path in a Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/most-profitable-path-in-a-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "2468. Split Message Based on Limit",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/split-message-based-on-limit",
- "solutionLink": "#"
- },
- {
- "problemName": "2469. Convert the Temperature",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/convert-the-temperature",
- "solutionLink": "#"
- },
- {
- "problemName": "2470. Number of Subarrays With LCM Equal to K",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-subarrays-with-lcm-equal-to-k",
- "solutionLink": "#"
- },
- {
- "problemName": "2471. Minimum Number of Operations to Sort a Binary Tree by Level",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-number-of-operations-to-sort-a-binary-tree-by-level",
- "solutionLink": "#"
- },
- {
- "problemName": "2472. Maximum Number of Non-overlapping Palindrome Substrings",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-number-of-non-overlapping-palindrome-substrings",
- "solutionLink": "#"
- },
- {
- "problemName": "2473. Minimum Cost to Buy Apples",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-cost-to-buy-apples",
- "solutionLink": "#"
- },
- {
- "problemName": "2474. Customers With Strictly Increasing Purchases",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/customers-with-strictly-increasing-purchases",
- "solutionLink": "#"
- },
- {
- "problemName": "2475. Number of Unequal Triplets in Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/number-of-unequal-triplets-in-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2476. Closest Nodes Queries in a Binary Search Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/closest-nodes-queries-in-a-binary-search-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "2477. Minimum Fuel Cost to Report to the Capital",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-fuel-cost-to-report-to-the-capital",
- "solutionLink": "#"
- },
- {
- "problemName": "2478. Number of Beautiful Partitions",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/number-of-beautiful-partitions",
- "solutionLink": "#"
- },
- {
- "problemName": "2479. Maximum XOR of Two Non-Overlapping Subtrees",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-xor-of-two-non-overlapping-subtrees",
- "solutionLink": "#"
- },
- {
- "problemName": "2480. Form a Chemical Bond",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/form-a-chemical-bond",
- "solutionLink": "#"
- },
- {
- "problemName": "2481. Minimum Cuts to Divide a Circle",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/minimum-cuts-to-divide-a-circle",
- "solutionLink": "#"
- },
- {
- "problemName": "2482. Difference Between Ones and Zeros in Row and Column",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/difference-between-ones-and-zeros-in-row-and-column",
- "solutionLink": "#"
- },
- {
- "problemName": "2483. Minimum Penalty for a Shop",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-penalty-for-a-shop",
- "solutionLink": "#"
- },
- {
- "problemName": "2484. Count Palindromic Subsequences",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-palindromic-subsequences",
- "solutionLink": "#"
- },
- {
- "problemName": "2485. Find the Pivot Integer",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-the-pivot-integer",
- "solutionLink": "#"
- },
- {
- "problemName": "2486. Append Characters to String to Make Subsequence",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/append-characters-to-string-to-make-subsequence",
- "solutionLink": "#"
- },
- {
- "problemName": "2487. Remove Nodes From Linked List",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/remove-nodes-from-linked-list",
- "solutionLink": "#"
- },
- {
- "problemName": "2488. Count Subarrays With Median K",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-subarrays-with-median-k",
- "solutionLink": "#"
- },
- {
- "problemName": "2489. Number of Substrings With Fixed Ratio",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-substrings-with-fixed-ratio",
- "solutionLink": "#"
- },
- {
- "problemName": "2490. Circular Sentence",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/circular-sentence",
- "solutionLink": "#"
- },
- {
- "problemName": "2491. Divide Players Into Teams of Equal Skill",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/divide-players-into-teams-of-equal-skill",
- "solutionLink": "#"
- },
- {
- "problemName": "2492. Minimum Score of a Path Between Two Cities",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-score-of-a-path-between-two-cities",
- "solutionLink": "#"
- },
- {
- "problemName": "2493. Divide Nodes Into the Maximum Number of Groups",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/divide-nodes-into-the-maximum-number-of-groups",
- "solutionLink": "#"
- },
- {
- "problemName": "2494. Merge Overlapping Events in the Same Hall",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/merge-overlapping-events-in-the-same-hall",
- "solutionLink": "#"
- },
- {
- "problemName": "2495. Number of Subarrays Having Even Product",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-subarrays-having-even-product",
- "solutionLink": "#"
- },
- {
- "problemName": "2496. Maximum Value of a String in an Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/maximum-value-of-a-string-in-an-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2497. Maximum Star Sum of a Graph",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-star-sum-of-a-graph",
- "solutionLink": "#"
- },
- {
- "problemName": "2498. Frog Jump II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/frog-jump-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "2499. Minimum Total Cost to Make Arrays Unequal",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-total-cost-to-make-arrays-unequal",
- "solutionLink": "#"
- }
-];
-
-
-
-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 LeetCode website. You can also click on the solution link to view the solution of the problem.
\ No newline at end of file
diff --git a/dsa-problems/leetcode-problems/2500-2599.md b/dsa-problems/leetcode-problems/2500-2599.md
deleted file mode 100644
index 373438d9b..000000000
--- a/dsa-problems/leetcode-problems/2500-2599.md
+++ /dev/null
@@ -1,622 +0,0 @@
----
-id: 2500-2599
-title: LeetCode Problems 2500 - 2599
-sidebar_label: 2500 - 2599
-keywords:
- - LeetCode
- - LeetCode Problems
- - LeetCode Problems 2500 - 2599
- - DSA problems
----
-
-export const problems = [
- {
- "problemName": "2500. Delete Greatest Value in Each Row",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/delete-greatest-value-in-each-row",
- "solutionLink": "#"
- },
- {
- "problemName": "2501. Longest Square Streak in an Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/longest-square-streak-in-an-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2502. Design Memory Allocator",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/design-memory-allocator",
- "solutionLink": "#"
- },
- {
- "problemName": "2503. Maximum Number of Points From Grid Queries",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-number-of-points-from-grid-queries",
- "solutionLink": "#"
- },
- {
- "problemName": "2504. Concatenate the Name and the Profession",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/concatenate-the-name-and-the-profession",
- "solutionLink": "#"
- },
- {
- "problemName": "2505. Bitwise OR of All Subsequence Sums",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/bitwise-or-of-all-subsequence-sums",
- "solutionLink": "#"
- },
- {
- "problemName": "2506. Count Pairs Of Similar Strings",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/count-pairs-of-similar-strings",
- "solutionLink": "#"
- },
- {
- "problemName": "2507. Smallest Value After Replacing With Sum of Prime Factors",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/smallest-value-after-replacing-with-sum-of-prime-factors",
- "solutionLink": "#"
- },
- {
- "problemName": "2508. Add Edges to Make Degrees of All Nodes Even",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/add-edges-to-make-degrees-of-all-nodes-even",
- "solutionLink": "#"
- },
- {
- "problemName": "2509. Cycle Length Queries in a Tree",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/cycle-length-queries-in-a-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "2510. Check if There is a Path With Equal Number of 0's And 1's",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/check-if-there-is-a-path-with-equal-number-of-0s-and-1s",
- "solutionLink": "#"
- },
- {
- "problemName": "2511. Maximum Enemy Forts That Can Be Captured",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/maximum-enemy-forts-that-can-be-captured",
- "solutionLink": "#"
- },
- {
- "problemName": "2512. Reward Top K Students",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/reward-top-k-students",
- "solutionLink": "#"
- },
- {
- "problemName": "2513. Minimize the Maximum of Two Arrays",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimize-the-maximum-of-two-arrays",
- "solutionLink": "#"
- },
- {
- "problemName": "2514. Count Anagrams",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-anagrams",
- "solutionLink": "#"
- },
- {
- "problemName": "2515. Shortest Distance to Target String in a Circular Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/shortest-distance-to-target-string-in-a-circular-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2516. Take K of Each Character From Left and Right",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/take-k-of-each-character-from-left-and-right",
- "solutionLink": "#"
- },
- {
- "problemName": "2517. Maximum Tastiness of Candy Basket",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-tastiness-of-candy-basket",
- "solutionLink": "#"
- },
- {
- "problemName": "2518. Number of Great Partitions",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/number-of-great-partitions",
- "solutionLink": "#"
- },
- {
- "problemName": "2519. Count the Number of K-Big Indices",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-the-number-of-k-big-indices",
- "solutionLink": "#"
- },
- {
- "problemName": "2520. Count the Digits That Divide a Number",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/count-the-digits-that-divide-a-number",
- "solutionLink": "#"
- },
- {
- "problemName": "2521. Distinct Prime Factors of Product of Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/distinct-prime-factors-of-product-of-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2522. Partition String Into Substrings With Values at Most K",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/partition-string-into-substrings-with-values-at-most-k",
- "solutionLink": "#"
- },
- {
- "problemName": "2523. Closest Prime Numbers in Range",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/closest-prime-numbers-in-range",
- "solutionLink": "#"
- },
- {
- "problemName": "2524. Maximum Frequency Score of a Subarray",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-frequency-score-of-a-subarray",
- "solutionLink": "#"
- },
- {
- "problemName": "2525. Categorize Box According to Criteria",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/categorize-box-according-to-criteria",
- "solutionLink": "#"
- },
- {
- "problemName": "2526. Find Consecutive Integers from a Data Stream",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-consecutive-integers-from-a-data-stream",
- "solutionLink": "#"
- },
- {
- "problemName": "2527. Find Xor-Beauty of Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-xor-beauty-of-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2528. Maximize the Minimum Powered City",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximize-the-minimum-powered-city",
- "solutionLink": "#"
- },
- {
- "problemName": "2529. Maximum Count of Positive Integer and Negative Integer",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/maximum-count-of-positive-integer-and-negative-integer",
- "solutionLink": "#"
- },
- {
- "problemName": "2530. Maximal Score After Applying K Operations",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximal-score-after-applying-k-operations",
- "solutionLink": "#"
- },
- {
- "problemName": "2531. Make Number of Distinct Characters Equal",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/make-number-of-distinct-characters-equal",
- "solutionLink": "#"
- },
- {
- "problemName": "2532. Time to Cross a Bridge",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/time-to-cross-a-bridge",
- "solutionLink": "#"
- },
- {
- "problemName": "2533. Number of Good Binary Strings",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-good-binary-strings",
- "solutionLink": "#"
- },
- {
- "problemName": "2534. Time Taken to Cross the Door",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/time-taken-to-cross-the-door",
- "solutionLink": "#"
- },
- {
- "problemName": "2535. Difference Between Element Sum and Digit Sum of an Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/difference-between-element-sum-and-digit-sum-of-an-array",
- "solutionLink": "/dsa-solutions/lc-solutions/2500-2599/difference-between-element-sum-and-digit-sum-of-an-array"
- },
- {
- "problemName": "2536. Increment Submatrices by One",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/increment-submatrices-by-one",
- "solutionLink": "#"
- },
- {
- "problemName": "2537. Count the Number of Good Subarrays",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-the-number-of-good-subarrays",
- "solutionLink": "#"
- },
- {
- "problemName": "2538. Difference Between Maximum and Minimum Price Sum",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/difference-between-maximum-and-minimum-price-sum",
- "solutionLink": "#"
- },
- {
- "problemName": "2539. Count the Number of Good Subsequences",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-the-number-of-good-subsequences",
- "solutionLink": "#"
- },
- {
- "problemName": "2540. Minimum Common Value",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/minimum-common-value",
- "solutionLink": "#"
- },
- {
- "problemName": "2541. Minimum Operations to Make Array Equal II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-operations-to-make-array-equal-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "2542. Maximum Subsequence Score",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-subsequence-score",
- "solutionLink": "#"
- },
- {
- "problemName": "2543. Check if Point Is Reachable",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/check-if-point-is-reachable",
- "solutionLink": "/dsa-solutions/lc-solutions/2500-3000/check-if-point-is-reachable"
- },
- {
- "problemName": "2544. Alternating Digit Sum",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/alternating-digit-sum",
- "solutionLink": "#"
- },
- {
- "problemName": "2545. Sort the Students by Their Kth Score",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/sort-the-students-by-their-kth-score",
- "solutionLink": "#"
- },
- {
- "problemName": "2546. Apply Bitwise Operations to Make Strings Equal",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/apply-bitwise-operations-to-make-strings-equal",
- "solutionLink": "#"
- },
- {
- "problemName": "2547. Minimum Cost to Split an Array",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-cost-to-split-an-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2548. Maximum Price to Fill a Bag",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-price-to-fill-a-bag",
- "solutionLink": "#"
- },
- {
- "problemName": "2549. Count Distinct Numbers on Board",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/count-distinct-numbers-on-board",
- "solutionLink": "#"
- },
- {
- "problemName": "2550. Count Collisions of Monkeys on a Polygon",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-collisions-of-monkeys-on-a-polygon",
- "solutionLink": "#"
- },
- {
- "problemName": "2551. Put Marbles in Bags",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/put-marbles-in-bags",
- "solutionLink": "#"
- },
- {
- "problemName": "2552. Count Increasing Quadruplets",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-increasing-quadruplets",
- "solutionLink": "#"
- },
- {
- "problemName": "2553. Separate the Digits in an Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/separate-the-digits-in-an-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2554. Maximum Number of Integers to Choose From a Range I",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-number-of-integers-to-choose-from-a-range-i",
- "solutionLink": "#"
- },
- {
- "problemName": "2555. Maximize Win From Two Segments",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximize-win-from-two-segments",
- "solutionLink": "#"
- },
- {
- "problemName": "2556. Disconnect Path in a Binary Matrix by at Most One Flip",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/disconnect-path-in-a-binary-matrix-by-at-most-one-flip",
- "solutionLink": "#"
- },
- {
- "problemName": "2557. Maximum Number of Integers to Choose From a Range II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-number-of-integers-to-choose-from-a-range-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "2558. Take Gifts From the Richest Pile",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/take-gifts-from-the-richest-pile",
- "solutionLink": "#"
- },
- {
- "problemName": "2559. Count Vowel Strings in Ranges",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-vowel-strings-in-ranges",
- "solutionLink": "#"
- },
- {
- "problemName": "2560. House Robber IV",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/house-robber-iv",
- "solutionLink": "#"
- },
- {
- "problemName": "2561. Rearranging Fruits",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/rearranging-fruits",
- "solutionLink": "#"
- },
- {
- "problemName": "2562. Find the Array Concatenation Value",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-the-array-concatenation-value",
- "solutionLink": "#"
- },
- {
- "problemName": "2563. Count the Number of Fair Pairs",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-the-number-of-fair-pairs",
- "solutionLink": "#"
- },
- {
- "problemName": "2564. Substring XOR Queries",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/substring-xor-queries",
- "solutionLink": "#"
- },
- {
- "problemName": "2565. Subsequence With the Minimum Score",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/subsequence-with-the-minimum-score",
- "solutionLink": "#"
- },
- {
- "problemName": "2566. Maximum Difference by Remapping a Digit",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/maximum-difference-by-remapping-a-digit",
- "solutionLink": "#"
- },
- {
- "problemName": "2567. Minimum Score by Changing Two Elements",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-score-by-changing-two-elements",
- "solutionLink": "#"
- },
- {
- "problemName": "2568. Minimum Impossible OR",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-impossible-or",
- "solutionLink": "#"
- },
- {
- "problemName": "2569. Handling Sum Queries After Update",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/handling-sum-queries-after-update",
- "solutionLink": "#"
- },
- {
- "problemName": "2570. Merge Two 2D Arrays by Summing Values",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/merge-two-2d-arrays-by-summing-values",
- "solutionLink": "#"
- },
- {
- "problemName": "2571. Minimum Operations to Reduce an Integer to 0",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-operations-to-reduce-an-integer-to-0",
- "solutionLink": "#"
- },
- {
- "problemName": "2572. Count the Number of Square-Free Subsets",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-the-number-of-square-free-subsets",
- "solutionLink": "#"
- },
- {
- "problemName": "2573. Find the String with LCP",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/find-the-string-with-lcp",
- "solutionLink": "#"
- },
- {
- "problemName": "2574. Left and Right Sum Differences",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/left-and-right-sum-differences",
- "solutionLink": "#"
- },
- {
- "problemName": "2575. Find the Divisibility Array of a String",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-the-divisibility-array-of-a-string",
- "solutionLink": "#"
- },
- {
- "problemName": "2576. Find the Maximum Number of Marked Indices",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-the-maximum-number-of-marked-indices",
- "solutionLink": "#"
- },
- {
- "problemName": "2577. Minimum Time to Visit a Cell In a Grid",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-time-to-visit-a-cell-in-a-grid",
- "solutionLink": "#"
- },
- {
- "problemName": "2578. Split With Minimum Sum",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/split-with-minimum-sum",
- "solutionLink": "#"
- },
- {
- "problemName": "2579. Count Total Number of Colored Cells",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-total-number-of-colored-cells",
- "solutionLink": "#"
- },
- {
- "problemName": "2580. Count Ways to Group Overlapping Ranges",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-ways-to-group-overlapping-ranges",
- "solutionLink": "#"
- },
- {
- "problemName": "2581. Count Number of Possible Root Nodes",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-number-of-possible-root-nodes",
- "solutionLink": "#"
- },
- {
- "problemName": "2582. Pass the Pillow",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/pass-the-pillow",
- "solutionLink": "#"
- },
- {
- "problemName": "2583. Kth Largest Sum in a Binary Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/kth-largest-sum-in-a-binary-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "2584. Split the Array to Make Coprime Products",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/split-the-array-to-make-coprime-products",
- "solutionLink": "#"
- },
- {
- "problemName": "2585. Number of Ways to Earn Points",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/number-of-ways-to-earn-points",
- "solutionLink": "#"
- },
- {
- "problemName": "2586. Count the Number of Vowel Strings in Range",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/count-the-number-of-vowel-strings-in-range",
- "solutionLink": "#"
- },
- {
- "problemName": "2587. Rearrange Array to Maximize Prefix Score",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/rearrange-array-to-maximize-prefix-score",
- "solutionLink": "#"
- },
- {
- "problemName": "2588. Count the Number of Beautiful Subarrays",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-the-number-of-beautiful-subarrays",
- "solutionLink": "#"
- },
- {
- "problemName": "2589. Minimum Time to Complete All Tasks",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-time-to-complete-all-tasks",
- "solutionLink": "#"
- },
- {
- "problemName": "2590. Design a Todo List",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/design-a-todo-list",
- "solutionLink": "#"
- },
- {
- "problemName": "2591. Distribute Money to Maximum Children",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/distribute-money-to-maximum-children",
- "solutionLink": "#"
- },
- {
- "problemName": "2592. Maximize Greatness of an Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximize-greatness-of-an-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2593. Find Score of an Array After Marking All Elements",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-score-of-an-array-after-marking-all-elements",
- "solutionLink": "#"
- },
- {
- "problemName": "2594. Minimum Time to Repair Cars",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-time-to-repair-cars",
- "solutionLink": "#"
- },
- {
- "problemName": "2595. Number of Even and Odd Bits",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/number-of-even-and-odd-bits",
- "solutionLink": "#"
- },
- {
- "problemName": "2596. Check Knight Tour Configuration",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/check-knight-tour-configuration",
- "solutionLink": "#"
- },
- {
- "problemName": "2597. The Number of Beautiful Subsets",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/the-number-of-beautiful-subsets",
- "solutionLink": "#"
- },
- {
- "problemName": "2598. Smallest Missing Non-negative Integer After Operations",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/smallest-missing-non-negative-integer-after-operations",
- "solutionLink": "#"
- },
- {
- "problemName": "2599. Make the Prefix Sum Non-negative",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/make-the-prefix-sum-non-negative",
- "solutionLink": "#"
- }
-];
-
-
-
-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 LeetCode website. You can also click on the solution link to view the solution of the problem.
\ No newline at end of file
diff --git a/dsa-problems/leetcode-problems/2600-2699.md b/dsa-problems/leetcode-problems/2600-2699.md
deleted file mode 100644
index 3fb9d5b00..000000000
--- a/dsa-problems/leetcode-problems/2600-2699.md
+++ /dev/null
@@ -1,622 +0,0 @@
----
-id: 2600-2699
-title: LeetCode Problems 2600 - 2699
-sidebar_label: 2600 - 2699
-keywords:
- - LeetCode
- - LeetCode Problems
- - LeetCode Problems 2600 - 2699
- - DSA problems
----
-
-export const problems = [
- {
- "problemName": "2600. K Items With the Maximum Sum",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/k-items-with-the-maximum-sum",
- "solutionLink": "#"
- },
- {
- "problemName": "2601. Prime Subtraction Operation",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/prime-subtraction-operation",
- "solutionLink": "#"
- },
- {
- "problemName": "2602. Minimum Operations to Make All Array Elements Equal",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-operations-to-make-all-array-elements-equal",
- "solutionLink": "#"
- },
- {
- "problemName": "2603. Collect Coins in a Tree",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/collect-coins-in-a-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "2604. Minimum Time to Eat All Grains",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-time-to-eat-all-grains",
- "solutionLink": "#"
- },
- {
- "problemName": "2605. Form Smallest Number From Two Digit Arrays",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/form-smallest-number-from-two-digit-arrays",
- "solutionLink": "#"
- },
- {
- "problemName": "2606. Find the Substring With Maximum Cost",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-the-substring-with-maximum-cost",
- "solutionLink": "#"
- },
- {
- "problemName": "2607. Make K-Subarray Sums Equal",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/make-k-subarray-sums-equal",
- "solutionLink": "#"
- },
- {
- "problemName": "2608. Shortest Cycle in a Graph",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/shortest-cycle-in-a-graph",
- "solutionLink": "#"
- },
- {
- "problemName": "2609. Find the Longest Balanced Substring of a Binary String",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-the-longest-balanced-substring-of-a-binary-string",
- "solutionLink": "#"
- },
- {
- "problemName": "2610. Convert an Array Into a 2D Array With Conditions",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/convert-an-array-into-a-2d-array-with-conditions",
- "solutionLink": "/dsa-solutions/lc-solutions/2500-3000/convert-an-array-into-a-2d-array-with-conditions"
- },
- {
- "problemName": "2611. Mice and Cheese",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/mice-and-cheese",
- "solutionLink": "#"
- },
- {
- "problemName": "2612. Minimum Reverse Operations",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-reverse-operations",
- "solutionLink": "#"
- },
- {
- "problemName": "2613. Beautiful Pairs",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/beautiful-pairs",
- "solutionLink": "#"
- },
- {
- "problemName": "2614. Prime In Diagonal",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/prime-in-diagonal",
- "solutionLink": "#"
- },
- {
- "problemName": "2615. Sum of Distances",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/sum-of-distances",
- "solutionLink": "#"
- },
- {
- "problemName": "2616. Minimize the Maximum Difference of Pairs",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimize-the-maximum-difference-of-pairs",
- "solutionLink": "#"
- },
- {
- "problemName": "2617. Minimum Number of Visited Cells in a Grid",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-number-of-visited-cells-in-a-grid",
- "solutionLink": "#"
- },
- {
- "problemName": "2618. Check if Object Instance of Class",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/check-if-object-instance-of-class",
- "solutionLink": "#"
- },
- {
- "problemName": "2619. Array Prototype Last",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/array-prototype-last",
- "solutionLink": "#"
- },
- {
- "problemName": "2620. Counter",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/counter",
- "solutionLink": "#"
- },
- {
- "problemName": "2621. Sleep",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/sleep",
- "solutionLink": "#"
- },
- {
- "problemName": "2622. Cache With Time Limit",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/cache-with-time-limit",
- "solutionLink": "#"
- },
- {
- "problemName": "2623. Memoize",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/memoize",
- "solutionLink": "#"
- },
- {
- "problemName": "2624. Snail Traversal",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/snail-traversal",
- "solutionLink": "#"
- },
- {
- "problemName": "2625. Flatten Deeply Nested Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/flatten-deeply-nested-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2626. Array Reduce Transformation",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/array-reduce-transformation",
- "solutionLink": "#"
- },
- {
- "problemName": "2627. Debounce",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/debounce",
- "solutionLink": "#"
- },
- {
- "problemName": "2628. JSON Deep Equal",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/json-deep-equal",
- "solutionLink": "#"
- },
- {
- "problemName": "2629. Function Composition",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/function-composition",
- "solutionLink": "#"
- },
- {
- "problemName": "2630. Memoize II",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/memoize-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "2631. Group By",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/group-by",
- "solutionLink": "#"
- },
- {
- "problemName": "2632. Curry",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/curry",
- "solutionLink": "#"
- },
- {
- "problemName": "2633. Convert Object to JSON String",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/convert-object-to-json-string",
- "solutionLink": "#"
- },
- {
- "problemName": "2634. Filter Elements from Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/filter-elements-from-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2635. Apply Transform Over Each Element in Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/apply-transform-over-each-element-in-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2636. Promise Pool",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/promise-pool",
- "solutionLink": "#"
- },
- {
- "problemName": "2637. Promise Time Limit",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/promise-time-limit",
- "solutionLink": "#"
- },
- {
- "problemName": "2638. Count the Number of K-Free Subsets",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-the-number-of-k-free-subsets",
- "solutionLink": "#"
- },
- {
- "problemName": "2639. Find the Width of Columns of a Grid",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-the-width-of-columns-of-a-grid",
- "solutionLink": "#"
- },
- {
- "problemName": "2640. Find the Score of All Prefixes of an Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-the-score-of-all-prefixes-of-an-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2641. Cousins in Binary Tree II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/cousins-in-binary-tree-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "2642. Design Graph With Shortest Path Calculator",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/design-graph-with-shortest-path-calculator",
- "solutionLink": "#"
- },
- {
- "problemName": "2643. Row With Maximum Ones",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/row-with-maximum-ones",
- "solutionLink": "#"
- },
- {
- "problemName": "2644. Find the Maximum Divisibility Score",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-the-maximum-divisibility-score",
- "solutionLink": "#"
- },
- {
- "problemName": "2645. Minimum Additions to Make Valid String",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-additions-to-make-valid-string",
- "solutionLink": "#"
- },
- {
- "problemName": "2646. Minimize the Total Price of the Trips",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimize-the-total-price-of-the-trips",
- "solutionLink": "#"
- },
- {
- "problemName": "2647. Color the Triangle Red",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/color-the-triangle-red",
- "solutionLink": "#"
- },
- {
- "problemName": "2648. Generate Fibonacci Sequence",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/generate-fibonacci-sequence",
- "solutionLink": "#"
- },
- {
- "problemName": "2649. Nested Array Generator",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/nested-array-generator",
- "solutionLink": "#"
- },
- {
- "problemName": "2650. Design Cancellable Function",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/design-cancellable-function",
- "solutionLink": "#"
- },
- {
- "problemName": "2651. Calculate Delayed Arrival Time",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/calculate-delayed-arrival-time",
- "solutionLink": "#"
- },
- {
- "problemName": "2652. Sum Multiples",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/sum-multiples",
- "solutionLink": "#"
- },
- {
- "problemName": "2653. Sliding Subarray Beauty",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/sliding-subarray-beauty",
- "solutionLink": "/dsa-solutions/lc-solutions/2600-2699/sliding-subarray-beauty"
- },
- {
- "problemName": "2654. Minimum Number of Operations to Make All Array Elements Equal to 1",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-number-of-operations-to-make-all-array-elements-equal-to-1",
- "solutionLink": "#"
- },
- {
- "problemName": "2655. Find Maximal Uncovered Ranges",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-maximal-uncovered-ranges",
- "solutionLink": "#"
- },
- {
- "problemName": "2656. Maximum Sum With Exactly K Elements",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/maximum-sum-with-exactly-k-elements",
- "solutionLink": "#"
- },
- {
- "problemName": "2657. Find the Prefix Common Array of Two Arrays",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-the-prefix-common-array-of-two-arrays",
- "solutionLink": "#"
- },
- {
- "problemName": "2658. Maximum Number of Fish in a Grid",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-number-of-fish-in-a-grid",
- "solutionLink": "#"
- },
- {
- "problemName": "2659. Make Array Empty",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/make-array-empty",
- "solutionLink": "#"
- },
- {
- "problemName": "2660. Determine the Winner of a Bowling Game",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/determine-the-winner-of-a-bowling-game",
- "solutionLink": "#"
- },
- {
- "problemName": "2661. First Completely Painted Row or Column",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/first-completely-painted-row-or-column",
- "solutionLink": "#"
- },
- {
- "problemName": "2662. Minimum Cost of a Path With Special Roads",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-cost-of-a-path-with-special-roads",
- "solutionLink": "#"
- },
- {
- "problemName": "2663. Lexicographically Smallest Beautiful String",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/lexicographically-smallest-beautiful-string",
- "solutionLink": "#"
- },
- {
- "problemName": "2664. The Knight�s Tour",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/the-knights-tour",
- "solutionLink": "#"
- },
- {
- "problemName": "2665. Counter II",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/counter-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "2666. Allow One Function Call",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/allow-one-function-call",
- "solutionLink": "#"
- },
- {
- "problemName": "2667. Create Hello World Function",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/create-hello-world-function",
- "solutionLink": "#"
- },
- {
- "problemName": "2668. Find Latest Salaries",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-latest-salaries",
- "solutionLink": "#"
- },
- {
- "problemName": "2669. Count Artist Occurrences On Spotify Ranking List",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/count-artist-occurrences-on-spotify-ranking-list",
- "solutionLink": "#"
- },
- {
- "problemName": "2670. Find the Distinct Difference Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-the-distinct-difference-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2671. Frequency Tracker",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/frequency-tracker",
- "solutionLink": "#"
- },
- {
- "problemName": "2672. Number of Adjacent Elements With the Same Color",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-adjacent-elements-with-the-same-color",
- "solutionLink": "#"
- },
- {
- "problemName": "2673. Make Costs of Paths Equal in a Binary Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/make-costs-of-paths-equal-in-a-binary-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "2674. Split a Circular Linked List",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/split-a-circular-linked-list",
- "solutionLink": "#"
- },
- {
- "problemName": "2675. Array of Objects to Matrix",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/array-of-objects-to-matrix",
- "solutionLink": "#"
- },
- {
- "problemName": "2676. Throttle",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/throttle",
- "solutionLink": "#"
- },
- {
- "problemName": "2677. Chunk Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/chunk-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2678. Number of Senior Citizens",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/number-of-senior-citizens",
- "solutionLink": "#"
- },
- {
- "problemName": "2679. Sum in a Matrix",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/sum-in-a-matrix",
- "solutionLink": "#"
- },
- {
- "problemName": "2680. Maximum OR",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-or",
- "solutionLink": "#"
- },
- {
- "problemName": "2681. Power of Heroes",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/power-of-heroes",
- "solutionLink": "#"
- },
- {
- "problemName": "2682. Find the Losers of the Circular Game",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-the-losers-of-the-circular-game",
- "solutionLink": "#"
- },
- {
- "problemName": "2683. Neighboring Bitwise XOR",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/neighboring-bitwise-xor",
- "solutionLink": "#"
- },
- {
- "problemName": "2684. Maximum Number of Moves in a Grid",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-number-of-moves-in-a-grid",
- "solutionLink": "#"
- },
- {
- "problemName": "2685. Count the Number of Complete Components",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-the-number-of-complete-components",
- "solutionLink": "#"
- },
- {
- "problemName": "2686. Immediate Food Delivery III",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/immediate-food-delivery-iii",
- "solutionLink": "#"
- },
- {
- "problemName": "2687. Bikes Last Time Used",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/bikes-last-time-used",
- "solutionLink": "#"
- },
- {
- "problemName": "2688. Find Active Users",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-active-users",
- "solutionLink": "#"
- },
- {
- "problemName": "2689. Extract Kth Character From The Rope Tree",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/extract-kth-character-from-the-rope-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "2690. Infinite Method Object",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/infinite-method-object",
- "solutionLink": "#"
- },
- {
- "problemName": "2691. Immutability Helper",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/immutability-helper",
- "solutionLink": "#"
- },
- {
- "problemName": "2692. Make Object Immutable",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/make-object-immutable",
- "solutionLink": "#"
- },
- {
- "problemName": "2693. Call Function with Custom Context",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/call-function-with-custom-context",
- "solutionLink": "#"
- },
- {
- "problemName": "2694. Event Emitter",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/event-emitter",
- "solutionLink": "#"
- },
- {
- "problemName": "2695. Array Wrapper",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/array-wrapper",
- "solutionLink": "#"
- },
- {
- "problemName": "2696. Minimum String Length After Removing Substrings",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/minimum-string-length-after-removing-substrings",
- "solutionLink": "#"
- },
- {
- "problemName": "2697. Lexicographically Smallest Palindrome",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/lexicographically-smallest-palindrome",
- "solutionLink": "#"
- },
- {
- "problemName": "2698. Find the Punishment Number of an Integer",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-the-punishment-number-of-an-integer",
- "solutionLink": "#"
- },
- {
- "problemName": "2699. Modify Graph Edge Weights",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/modify-graph-edge-weights",
- "solutionLink": "#"
- }
-];
-
-
-
-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 LeetCode website. You can also click on the solution link to view the solution of the problem.
\ No newline at end of file
diff --git a/dsa-problems/leetcode-problems/2700-2799.md b/dsa-problems/leetcode-problems/2700-2799.md
deleted file mode 100644
index 7e4a45ca2..000000000
--- a/dsa-problems/leetcode-problems/2700-2799.md
+++ /dev/null
@@ -1,622 +0,0 @@
----
-id: 2700-2799
-title: LeetCode Problems 2700 - 2799
-sidebar_label: 2700 - 2799
-keywords:
- - LeetCode
- - LeetCode Problems
- - LeetCode Problems 2700 - 2799
- - DSA problems
----
-
-export const problems = [
- {
- "problemName": "2700. Differences Between Two Objects",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/differences-between-two-objects",
- "solutionLink": "#"
- },
- {
- "problemName": "2701. Consecutive Transactions with Increasing Amounts",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/consecutive-transactions-with-increasing-amounts",
- "solutionLink": "#"
- },
- {
- "problemName": "2702. Minimum Operations to Make Numbers Non-positive",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-operations-to-make-numbers-non-positive",
- "solutionLink": "#"
- },
- {
- "problemName": "2703. Return Length of Arguments Passed",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/return-length-of-arguments-passed",
- "solutionLink": "/dsa-solutions/lc-solutions/2700-2799/return-length-of-arguments-passed"
- },
- {
- "problemName": "2704. To Be Or Not To Be",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/to-be-or-not-to-be",
- "solutionLink": "#"
- },
- {
- "problemName": "2705. Compact Object",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/compact-object",
- "solutionLink": "#"
- },
- {
- "problemName": "2706. Buy Two Chocolates",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/buy-two-chocolates",
- "solutionLink": "#"
- },
- {
- "problemName": "2707. Extra Characters in a String",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/extra-characters-in-a-string",
- "solutionLink": "#"
- },
- {
- "problemName": "2708. Maximum Strength of a Group",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-strength-of-a-group",
- "solutionLink": "#"
- },
- {
- "problemName": "2709. Greatest Common Divisor Traversal",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/greatest-common-divisor-traversal",
- "solutionLink": "#"
- },
- {
- "problemName": "2710. Remove Trailing Zeros From a String",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/remove-trailing-zeros-from-a-string",
- "solutionLink": "#"
- },
- {
- "problemName": "2711. Difference of Number of Distinct Values on Diagonals",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/difference-of-number-of-distinct-values-on-diagonals",
- "solutionLink": "#"
- },
- {
- "problemName": "2712. Minimum Cost to Make All Characters Equal",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-cost-to-make-all-characters-equal",
- "solutionLink": "#"
- },
- {
- "problemName": "2713. Maximum Strictly Increasing Cells in a Matrix",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-strictly-increasing-cells-in-a-matrix",
- "solutionLink": "#"
- },
- {
- "problemName": "2714. Find Shortest Path with K Hops",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/find-shortest-path-with-k-hops",
- "solutionLink": "#"
- },
- {
- "problemName": "2715. Timeout Cancellation",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/timeout-cancellation",
- "solutionLink": "#"
- },
- {
- "problemName": "2716. Minimize String Length",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/minimize-string-length",
- "solutionLink": "#"
- },
- {
- "problemName": "2717. Semi-Ordered Permutation",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/semi-ordered-permutation",
- "solutionLink": "#"
- },
- {
- "problemName": "2718. Sum of Matrix After Queries",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/sum-of-matrix-after-queries",
- "solutionLink": "#"
- },
- {
- "problemName": "2719. Count of Integers",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-of-integers",
- "solutionLink": "#"
- },
- {
- "problemName": "2720. Popularity Percentage",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/popularity-percentage",
- "solutionLink": "#"
- },
- {
- "problemName": "2721. Execute Asynchronous Functions in Parallel",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/execute-asynchronous-functions-in-parallel",
- "solutionLink": "#"
- },
- {
- "problemName": "2722. Join Two Arrays by ID",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/join-two-arrays-by-id",
- "solutionLink": "#"
- },
- {
- "problemName": "2723. Add Two Promises",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/add-two-promises",
- "solutionLink": "#"
- },
- {
- "problemName": "2724. Sort By",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/sort-by",
- "solutionLink": "#"
- },
- {
- "problemName": "2725. Interval Cancellation",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/interval-cancellation",
- "solutionLink": "#"
- },
- {
- "problemName": "2726. Calculator with Method Chaining",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/calculator-with-method-chaining",
- "solutionLink": "#"
- },
- {
- "problemName": "2727. Is Object Empty",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/is-object-empty",
- "solutionLink": "#"
- },
- {
- "problemName": "2728. Count Houses in a Circular Street",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/count-houses-in-a-circular-street",
- "solutionLink": "#"
- },
- {
- "problemName": "2729. Check if The Number is Fascinating",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/check-if-the-number-is-fascinating",
- "solutionLink": "#"
- },
- {
- "problemName": "2730. Find the Longest Semi-Repetitive Substring",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-the-longest-semi-repetitive-substring",
- "solutionLink": "#"
- },
- {
- "problemName": "2731. Movement of Robots",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/movement-of-robots",
- "solutionLink": "#"
- },
- {
- "problemName": "2732. Find a Good Subset of the Matrix",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/find-a-good-subset-of-the-matrix",
- "solutionLink": "#"
- },
- {
- "problemName": "2733. Neither Minimum nor Maximum",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/neither-minimum-nor-maximum",
- "solutionLink": "#"
- },
- {
- "problemName": "2734. Lexicographically Smallest String After Substring Operation",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/lexicographically-smallest-string-after-substring-operation",
- "solutionLink": "#"
- },
- {
- "problemName": "2735. Collecting Chocolates",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/collecting-chocolates",
- "solutionLink": "#"
- },
- {
- "problemName": "2736. Maximum Sum Queries",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-sum-queries",
- "solutionLink": "#"
- },
- {
- "problemName": "2737. Find the Closest Marked Node",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-the-closest-marked-node",
- "solutionLink": "#"
- },
- {
- "problemName": "2738. Count Occurrences in Text",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-occurrences-in-text",
- "solutionLink": "#"
- },
- {
- "problemName": "2739. Total Distance Traveled",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/total-distance-traveled",
- "solutionLink": "#"
- },
- {
- "problemName": "2740. Find the Value of the Partition",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-the-value-of-the-partition",
- "solutionLink": "#"
- },
- {
- "problemName": "2741. Special Permutations",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/special-permutations",
- "solutionLink": "#"
- },
- {
- "problemName": "2742. Painting the Walls",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/painting-the-walls",
- "solutionLink": "#"
- },
- {
- "problemName": "2743. Count Substrings Without Repeating Character",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-substrings-without-repeating-character",
- "solutionLink": "#"
- },
- {
- "problemName": "2744. Find Maximum Number of String Pairs",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-maximum-number-of-string-pairs",
- "solutionLink": "#"
- },
- {
- "problemName": "2745. Construct the Longest New String",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/construct-the-longest-new-string",
- "solutionLink": "#"
- },
- {
- "problemName": "2746. Decremental String Concatenation",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/decremental-string-concatenation",
- "solutionLink": "#"
- },
- {
- "problemName": "2747. Count Zero Request Servers",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-zero-request-servers",
- "solutionLink": "#"
- },
- {
- "problemName": "2748. Number of Beautiful Pairs",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/number-of-beautiful-pairs",
- "solutionLink": "#"
- },
- {
- "problemName": "2749. Minimum Operations to Make the Integer Zero",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-operations-to-make-the-integer-zero",
- "solutionLink": "#"
- },
- {
- "problemName": "2750. Ways to Split Array Into Good Subarrays",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/ways-to-split-array-into-good-subarrays",
- "solutionLink": "#"
- },
- {
- "problemName": "2751. Robot Collisions",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/robot-collisions",
- "solutionLink": "#"
- },
- {
- "problemName": "2752. Customers with Maximum Number of Transactions on Consecutive Days",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/customers-with-maximum-number-of-transactions-on-consecutive-days",
- "solutionLink": "#"
- },
- {
- "problemName": "2753. Count Houses in a Circular Street II",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-houses-in-a-circular-street-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "2754. Bind Function to Context",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/bind-function-to-context",
- "solutionLink": "#"
- },
- {
- "problemName": "2755. Deep Merge of Two Objects",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/deep-merge-of-two-objects",
- "solutionLink": "#"
- },
- {
- "problemName": "2756. Query Batching",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/query-batching",
- "solutionLink": "#"
- },
- {
- "problemName": "2757. Generate Circular Array Values",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/generate-circular-array-values",
- "solutionLink": "#"
- },
- {
- "problemName": "2758. Next Day",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/next-day",
- "solutionLink": "#"
- },
- {
- "problemName": "2759. Convert JSON String to Object",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/convert-json-string-to-object",
- "solutionLink": "#"
- },
- {
- "problemName": "2760. Longest Even Odd Subarray With Threshold",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/longest-even-odd-subarray-with-threshold",
- "solutionLink": "#"
- },
- {
- "problemName": "2761. Prime Pairs With Target Sum",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/prime-pairs-with-target-sum",
- "solutionLink": "#"
- },
- {
- "problemName": "2762. Continuous Subarrays",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/continuous-subarrays",
- "solutionLink": "#"
- },
- {
- "problemName": "2763. Sum of Imbalance Numbers of All Subarrays",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/sum-of-imbalance-numbers-of-all-subarrays",
- "solutionLink": "#"
- },
- {
- "problemName": "2764. Is Array a Preorder of Some Binary Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/is-array-a-preorder-of-some-binary-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "2765. Longest Alternating Subarray",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/longest-alternating-subarray/",
- "solutionLink": "#"
- },
- {
- "problemName": "2766. Relocate Marbles",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/relocate-marbles/",
- "solutionLink": "#"
- },
- {
- "problemName": "2767. Partition String Into Minimum Beautiful Substrings",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/partition-string-into-minimum-beautiful-substrings/",
- "solutionLink": "#"
- },
- {
- "problemName": "2768. Number of Black Blocks",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-black-blocks/",
- "solutionLink": "#"
- },
- {
- "problemName": "2769. Find the Maximum Achievable Number",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-the-maximum-achievable-number/",
- "solutionLink": "#"
- },
- {
- "problemName": "2770. Maximum Number of Jumps to Reach the Last Index",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-number-of-jumps-to-reach-the-last-index",
- "solutionLink": "#"
- },
- {
- "problemName": "2771. Longest Non-decreasing Subarray From Two Arrays",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/longest-non-decreasing-subarray-from-two-arrays/",
- "solutionLink": "#"
- },
- {
- "problemName": "2772. Apply Operations to Make All Array Elements Equal to Zero",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/apply-operations-to-make-all-array-elements-equal-to-zero/",
- "solutionLink": "#"
- },
- {
- "problemName": "2773. Height of Special Binary Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/height-of-special-binary-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "2774. Array Upper Bound",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/array-upper-bound",
- "solutionLink": "#"
- },
- {
- "problemName": "2775. Undefined to Null",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/undefined-to-null",
- "solutionLink": "#"
- },
- {
- "problemName": "2776. Convert Callback Based Function to Promise Based Function",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/convert-callback-based-function-to-promise-based-function",
- "solutionLink": "#"
- },
- {
- "problemName": "2777. Date Range Generator",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/date-range-generator",
- "solutionLink": "#"
- },
- {
- "problemName": "2778. Sum of Squares of Special Elements",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/sum-of-squares-of-special-elements",
- "solutionLink": "#"
- },
- {
- "problemName": "2779. Maximum Beauty of an Array After Applying Operation",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-beauty-of-an-array-after-applying-operation",
- "solutionLink": "#"
- },
- {
- "problemName": "2780. Minimum Index of a Valid Split",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-index-of-a-valid-split",
- "solutionLink": "#"
- },
- {
- "problemName": "2781. Length of the Longest Valid Substring",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/length-of-the-longest-valid-substring/",
- "solutionLink": "#"
- },
- {
- "problemName": "2782. Number of Unique Categories",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-unique-categories/",
- "solutionLink": "#"
- },
- {
- "problemName": "2783. Flight Occupancy and Waitlist Analysis",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/flight-occupancy-and-waitlist-analysis",
- "solutionLink": "#"
- },
- {
- "problemName": "2784. Check if Array is Good",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/check-if-array-is-good/",
- "solutionLink": "#"
- },
- {
- "problemName": "2785. Sort Vowels in a String",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/sort-vowels-in-a-string/",
- "solutionLink": "#"
- },
- {
- "problemName": "2786. Visit Array Positions to Maximize Score",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/visit-array-positions-to-maximize-score/",
- "solutionLink": "#"
- },
- {
- "problemName": "2787. Ways to Express an Integer as Sum of Powers",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/ways-to-express-an-integer-as-sum-of-powers/",
- "solutionLink": "#"
- },
- {
- "problemName": "2788. Split Strings by Separator",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/split-strings-by-separator/",
- "solutionLink": "#"
- },
- {
- "problemName": "2789. Largest Element in an Array after Merge Operations",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/largest-element-in-an-array-after-merge-operations/",
- "solutionLink": "#"
- },
- {
- "problemName": "2790. Maximum Number of Groups With Increasing Length",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-number-of-groups-with-increasing-length/",
- "solutionLink": "#"
- },
- {
- "problemName": "2791. Count Paths That Can Form a Palindrome in a Tree",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-paths-that-can-form-a-palindrome-in-a-tree/",
- "solutionLink": "#"
- },
- {
- "problemName": "2792. Count Nodes That Are Great Enough",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-nodes-that-are-great-enough",
- "solutionLink": "#"
- },
- {
- "problemName": "2793. Status of Flight Tickets",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/status-of-flight-tickets",
- "solutionLink": "#"
- },
- {
- "problemName": "2794. Create Object from Two Arrays",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/create-object-from-two-arrays",
- "solutionLink": "#"
- },
- {
- "problemName": "2795. Parallel Execution of Promises for Individual Results Retrieval",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/parallel-execution-of-promises-for-individual-results-retrieval",
- "solutionLink": "#"
- },
- {
- "problemName": "2796. Repeat String",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/repeat-string",
- "solutionLink": "#"
- },
- {
- "problemName": "2797. Partial Function with Placeholders",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/partial-function-with-placeholders",
- "solutionLink": "#"
- },
- {
- "problemName": "2798. Number of Employees Who Met the Target",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/number-of-employees-who-met-the-target/",
- "solutionLink": "#"
- },
- {
- "problemName": "2799. Count Complete Subarrays in an Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-complete-subarrays-in-an-array/",
- "solutionLink": "#"
- }
-];
-
-
-
-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 LeetCode website. You can also click on the solution link to view the solution of the problem.
\ No newline at end of file
diff --git a/dsa-problems/leetcode-problems/2800-2899.md b/dsa-problems/leetcode-problems/2800-2899.md
deleted file mode 100644
index d5cc65e3a..000000000
--- a/dsa-problems/leetcode-problems/2800-2899.md
+++ /dev/null
@@ -1,622 +0,0 @@
----
-id: 2800-2899
-title: LeetCode Problems 2800 - 2899
-sidebar_label: 2800 - 2899
-keywords:
- - LeetCode
- - LeetCode Problems
- - LeetCode Problems 2800 - 2899
- - DSA problems
----
-
-export const problems = [
- {
- "problemName": "2800. Shortest String That Contains Three Strings",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/shortest-string-that-contains-three-strings/",
- "solutionLink": "#"
- },
- {
- "problemName": "2801. Count Stepping Numbers in Range",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-stepping-numbers-in-range",
- "solutionLink": "#"
- },
- {
- "problemName": "2802. Find The K-th Lucky Number",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-the-k-th-lucky-number",
- "solutionLink": "#"
- },
- {
- "problemName": "2803. Factorial Generator",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/factorial-generator",
- "solutionLink": "#"
- },
- {
- "problemName": "2804. Array Prototype ForEach",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/array-prototype-foreach",
- "solutionLink": "#"
- },
- {
- "problemName": "2805. Custom Interval",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/custom-interval",
- "solutionLink": "#"
- },
- {
- "problemName": "2806. Account Balance After Rounded Purchase",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/account-balance-after-rounded-purchase",
- "solutionLink": "#"
- },
- {
- "problemName": "2807. Insert Greatest Common Divisors in Linked List",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/insert-greatest-common-divisors-in-linked-list",
- "solutionLink": "/dsa-solutions/lc-solutions/2500-3000/insert-greatest-common-divisors-in-linked-list"
- },
- {
- "problemName": "2808. Minimum Seconds to Equalize a Circular Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-seconds-to-equalize-a-circular-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2809. Minimum Time to Make Array Sum At Most x",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-time-to-make-array-sum-at-most-x",
- "solutionLink": "#"
- },
- {
- "problemName": "2810. Faulty Keyboard",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/faulty-keyboard",
- "solutionLink": "#"
- },
- {
- "problemName": "2811. Check if it is Possible to Split Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/check-if-it-is-possible-to-split-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2812. Find the Safest Path in a Grid",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-the-safest-path-in-a-grid",
- "solutionLink": "#"
- },
- {
- "problemName": "2813. Maximum Elegance of a K-Length Subsequence",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-elegance-of-a-k-length-subsequence",
- "solutionLink": "#"
- },
- {
- "problemName": "2814. Minimum Time Takes to Reach Destination Without Drowning",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-time-takes-to-reach-destination-without-drowning",
- "solutionLink": "#"
- },
- {
- "problemName": "2815. Max Pair Sum in an Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/max-pair-sum-in-an-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2816. Double a Number Represented as a Linked List",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/double-a-number-represented-as-a-linked-list",
- "solutionLink": "#"
- },
- {
- "problemName": "2817. Minimum Absolute Difference Between Elements With Constraint",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-absolute-difference-between-elements-with-constraint",
- "solutionLink": "#"
- },
- {
- "problemName": "2818. Apply Operations to Maximize Score",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/apply-operations-to-maximize-score",
- "solutionLink": "#"
- },
- {
- "problemName": "2819. Minimum Relative Loss After Buying Chocolates",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-relative-loss-after-buying-chocolates",
- "solutionLink": "#"
- },
- {
- "problemName": "2820. Election Results",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/election-results",
- "solutionLink": "#"
- },
- {
- "problemName": "2821. Delay the Resolution of Each Promise",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/delay-the-resolution-of-each-promise",
- "solutionLink": "#"
- },
- {
- "problemName": "2822. Inversion of Object",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/inversion-of-object",
- "solutionLink": "#"
- },
- {
- "problemName": "2823. Deep Object Filter",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/deep-object-filter",
- "solutionLink": "#"
- },
- {
- "problemName": "2824. Count Pairs Whose Sum is Less than Target",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/count-pairs-whose-sum-is-less-than-target",
- "solutionLink": "#"
- },
- {
- "problemName": "2825. Make String a Subsequence Using Cyclic Increments",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/make-string-a-subsequence-using-cyclic-increments",
- "solutionLink": "#"
- },
- {
- "problemName": "2826. Sorting Three Groups",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/sorting-three-groups",
- "solutionLink": "#"
- },
- {
- "problemName": "2827. Number of Beautiful Integers in the Range",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/number-of-beautiful-integers-in-the-range",
- "solutionLink": "#"
- },
- {
- "problemName": "2828. Check if a String Is an Acronym of Words",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/check-if-a-string-is-an-acronym-of-words",
- "solutionLink": "#"
- },
- {
- "problemName": "2829. Determine the Minimum Sum of a k-avoiding Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/determine-the-minimum-sum-of-a-k-avoiding-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2830. Maximize the Profit as the Salesman",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximize-the-profit-as-the-salesman",
- "solutionLink": "#"
- },
- {
- "problemName": "2831. Find the Longest Equal Subarray",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-the-longest-equal-subarray",
- "solutionLink": "#"
- },
- {
- "problemName": "2832. Maximal Range That Each Element Is Maximum in It",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximal-range-that-each-element-is-maximum-in-it",
- "solutionLink": "#"
- },
- {
- "problemName": "2833. Furthest Point From Origin",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/furthest-point-from-origin",
- "solutionLink": "#"
- },
- {
- "problemName": "2834. Find the Minimum Possible Sum of a Beautiful Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-the-minimum-possible-sum-of-a-beautiful-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2835. Minimum Operations to Form Subsequence With Target Sum",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-operations-to-form-subsequence-with-target-sum",
- "solutionLink": "#"
- },
- {
- "problemName": "2836. Maximize Value of Function in a Ball Passing Game",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximize-value-of-function-in-a-ball-passing-game",
- "solutionLink": "#"
- },
- {
- "problemName": "2837. Total Traveled Distance",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/total-traveled-distance",
- "solutionLink": "#"
- },
- {
- "problemName": "2838. Maximum Coins Heroes Can Collect",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-coins-heroes-can-collect",
- "solutionLink": "#"
- },
- {
- "problemName": "2839. Check if Strings Can be Made Equal With Operations I",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/check-if-strings-can-be-made-equal-with-operations-i",
- "solutionLink": "#"
- },
- {
- "problemName": "2840. Check if Strings Can be Made Equal With Operations II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/check-if-strings-can-be-made-equal-with-operations-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "2841. Maximum Sum of Almost Unique Subarray",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-sum-of-almost-unique-subarray",
- "solutionLink": "#"
- },
- {
- "problemName": "2842. Count K-Subsequences of a String With Maximum Beauty",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-k-subsequences-of-a-string-with-maximum-beauty",
- "solutionLink": "#"
- },
- {
- "problemName": "2843. Count Symmetric Integers",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/count-symmetric-integers",
- "solutionLink": "#"
- },
- {
- "problemName": "2844. Minimum Operations to Make a Special Number",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-operations-to-make-a-special-number",
- "solutionLink": "#"
- },
- {
- "problemName": "2845. Count of Interesting Subarrays",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-of-interesting-subarrays",
- "solutionLink": "#"
- },
- {
- "problemName": "2846. Minimum Edge Weight Equilibrium Queries in a Tree",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-edge-weight-equilibrium-queries-in-a-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "2847. Smallest Number With Given Digit Product",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/smallest-number-with-given-digit-product",
- "solutionLink": "#"
- },
- {
- "problemName": "2848. Points That Intersect With Cars",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/points-that-intersect-with-cars",
- "solutionLink": "#"
- },
- {
- "problemName": "2849. Determine if a Cell Is Reachable at a Given Time",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/determine-if-a-cell-is-reachable-at-a-given-time",
- "solutionLink": "#"
- },
- {
- "problemName": "2850. Minimum Moves to Spread Stones Over Grid",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-moves-to-spread-stones-over-grid",
- "solutionLink": "#"
- },
- {
- "problemName": "2851. String Transformation",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/string-transformation",
- "solutionLink": "#"
- },
- {
- "problemName": "2852. Sum of Remoteness of All Cells",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/sum-of-remoteness-of-all-cells",
- "solutionLink": "#"
- },
- {
- "problemName": "2853. Highest Salaries Difference",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/highest-salaries-difference",
- "solutionLink": "#"
- },
- {
- "problemName": "2854. Rolling Average Steps",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/rolling-average-steps",
- "solutionLink": "#"
- },
- {
- "problemName": "2855. Minimum Right Shifts to Sort the Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/minimum-right-shifts-to-sort-the-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2856. Minimum Array Length After Pair Removals",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-array-length-after-pair-removals",
- "solutionLink": "#"
- },
- {
- "problemName": "2857. Count Pairs of Points With Distance k",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-pairs-of-points-with-distance-k",
- "solutionLink": "#"
- },
- {
- "problemName": "2858. Minimum Edge Reversals So Every Node Is Reachable",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-edge-reversals-so-every-node-is-reachable",
- "solutionLink": "#"
- },
- {
- "problemName": "2859. Sum of Values at Indices With K Set Bits",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/sum-of-values-at-indices-with-k-set-bits",
- "solutionLink": "#"
- },
- {
- "problemName": "2860. Happy Students",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/happy-students",
- "solutionLink": "#"
- },
- {
- "problemName": "2861. Maximum Number of Alloys",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-number-of-alloys",
- "solutionLink": "#"
- },
- {
- "problemName": "2862. Maximum Element-Sum of a Complete Subset of Indices",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-element-sum-of-a-complete-subset-of-indices",
- "solutionLink": "#"
- },
- {
- "problemName": "2863. Maximum Length of Semi-Decreasing Subarrays",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-length-of-semi-decreasing-subarrays",
- "solutionLink": "#"
- },
- {
- "problemName": "2864. Maximum Odd Binary Number",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/maximum-odd-binary-number",
- "solutionLink": "#"
- },
- {
- "problemName": "2865. Beautiful Towers I",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/beautiful-towers-i",
- "solutionLink": "#"
- },
- {
- "problemName": "2866. Beautiful Towers II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/beautiful-towers-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "2867. Count Valid Paths in a Tree",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-valid-paths-in-a-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "2868. The Wording Game",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/the-wording-game",
- "solutionLink": "#"
- },
- {
- "problemName": "2869. Minimum Operations to Collect Elements",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/minimum-operations-to-collect-elements",
- "solutionLink": "#"
- },
- {
- "problemName": "2870. Minimum Number of Operations to Make Array Empty",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-number-of-operations-to-make-array-empty",
- "solutionLink": "#"
- },
- {
- "problemName": "2871. Split Array Into Maximum Number of Subarrays",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/split-array-into-maximum-number-of-subarrays",
- "solutionLink": "#"
- },
- {
- "problemName": "2872. Maximum Number of K-Divisible Components",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-number-of-k-divisible-components",
- "solutionLink": "#"
- },
- {
- "problemName": "2873. Maximum Value of an Ordered Triplet I",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/maximum-value-of-an-ordered-triplet-i",
- "solutionLink": "#"
- },
- {
- "problemName": "2874. Maximum Value of an Ordered Triplet II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-value-of-an-ordered-triplet-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "2875. Minimum Size Subarray in Infinite Array",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-size-subarray-in-infinite-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2876. Count Visited Nodes in a Directed Graph",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-visited-nodes-in-a-directed-graph",
- "solutionLink": "#"
- },
- {
- "problemName": "2877. Create a DataFrame from List",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/create-a-dataframe-from-list",
- "solutionLink": "#"
- },
- {
- "problemName": "2878. Get the Size of a DataFrame",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/get-the-size-of-a-dataframe",
- "solutionLink": "#"
- },
- {
- "problemName": "2879. Display the First Three Rows",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/display-the-first-three-rows",
- "solutionLink": "#"
- },
- {
- "problemName": "2880. Select Data",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/select-data",
- "solutionLink": "/dsa-solutions/lc-solutions/2500-3000/2880-select-data"
- },
- {
- "problemName": "2881. Create a New Column",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/create-a-new-column",
- "solutionLink": "/dsa-solutions/lc-solutions/2500-3000/Create-a-New-Column"
- },
- {
- "problemName": "2882. Drop Duplicate Rows",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/drop-duplicate-rows",
- "solutionLink": "/dsa-solutions/lc-solutions/2500-3000/Drop-Duplicate-Rows"
- },
- {
- "problemName": "2883. Drop Missing Data",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/drop-missing-data",
- "solutionLink": "#"
- },
- {
- "problemName": "2884. Modify Columns",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/modify-columns",
- "solutionLink": "#"
- },
- {
- "problemName": "2885. Rename Columns",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/rename-columns",
- "solutionLink": "#"
- },
- {
- "problemName": "2886. Change Data Type",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/change-data-type",
- "solutionLink": "#"
- },
- {
- "problemName": "2887. Fill Missing Data",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/fill-missing-data",
- "solutionLink": "#"
- },
- {
- "problemName": "2888. Reshape Data: Concatenate",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/reshape-data-concatenate",
- "solutionLink": "#"
- },
- {
- "problemName": "2889. Reshape Data: Pivot",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/reshape-data-pivot",
- "solutionLink": "#"
- },
- {
- "problemName": "2890. Reshape Data: Melt",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/reshape-data-melt",
- "solutionLink": "#"
- },
- {
- "problemName": "2891. Method Chaining",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/method-chaining",
- "solutionLink": "#"
- },
- {
- "problemName": "2892. Minimizing Array After Replacing Pairs With Their Product",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimizing-array-after-replacing-pairs-with-their-product",
- "solutionLink": "#"
- },
- {
- "problemName": "2893. Calculate Orders Within Each Interval",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/calculate-orders-within-each-interval",
- "solutionLink": "#"
- },
- {
- "problemName": "2894. Divisible and Non-divisible Sums Difference",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/divisible-and-non-divisible-sums-difference",
- "solutionLink": "#"
- },
- {
- "problemName": "2895. Minimum Processing Time",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-processing-time",
- "solutionLink": "#"
- },
- {
- "problemName": "2896. Apply Operations to Make Two Strings Equal",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/apply-operations-to-make-two-strings-equal",
- "solutionLink": "#"
- },
- {
- "problemName": "2897. Apply Operations on Array to Maximize Sum of Squares",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/apply-operations-on-array-to-maximize-sum-of-squares",
- "solutionLink": "#"
- },
- {
- "problemName": "2898. Maximum Linear Stock Score",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-linear-stock-score",
- "solutionLink": "#"
- },
- {
- "problemName": "2899. Last Visited Integers",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/last-visited-integers",
- "solutionLink": "#"
- }
-];
-
-
-
-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 LeetCode website. You can also click on the solution link to view the solution of the problem.
\ No newline at end of file
diff --git a/dsa-problems/leetcode-problems/2900-2999.md b/dsa-problems/leetcode-problems/2900-2999.md
deleted file mode 100644
index e3d825797..000000000
--- a/dsa-problems/leetcode-problems/2900-2999.md
+++ /dev/null
@@ -1,622 +0,0 @@
----
-id: 2900-2999
-title: LeetCode Problems 2900 - 2999
-sidebar_label: 2900 - 2999
-keywords:
- - LeetCode
- - LeetCode Problems
- - LeetCode Problems 2900 - 2999
- - DSA problems
----
-
-export const problems = [
- {
- "problemName": "2900. Longest Unequal Adjacent Groups Subsequence I",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/longest-unequal-adjacent-groups-subsequence-i",
- "solutionLink": "/dsa-solutions/lc-solutions/2900-2999/longest-unequal-adjacent-groups-subsequence-i"
- },
- {
- "problemName": "2901. Longest Unequal Adjacent Groups Subsequence II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/longest-unequal-adjacent-groups-subsequence-ii",
- "solutionLink": "/dsa-solutions/lc-solutions/2900-2999/2901-longest-unequal-adjacent-groups-subsequence-ii.md"
- },
- {
- "problemName": "2902. Count of Sub-Multisets With Bounded Sum",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-of-sub-multisets-with-bounded-sum",
- "solutionLink": "/dsa-solutions/lc-solutions/2900-2999/2902-count-of-sub-multisets-with-bounded-sum.md"
- },
- {
- "problemName": "2903. Find Indices With Index and Value Difference I",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-indices-with-index-and-value-difference-i",
- "solutionLink": "#"
- },
- {
- "problemName": "2904. Shortest and Lexicographically Smallest Beautiful String",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/shortest-and-lexicographically-smallest-beautiful-string",
- "solutionLink": "#"
- },
- {
- "problemName": "2905. Find Indices With Index and Value Difference II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-indices-with-index-and-value-difference-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "2906. Construct Product Matrix",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/construct-product-matrix",
- "solutionLink": "#"
- },
- {
- "problemName": "2907. Maximum Profitable Triplets With Increasing Prices I",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-profitable-triplets-with-increasing-prices-i",
- "solutionLink": "#"
- },
- {
- "problemName": "2908. Minimum Sum of Mountain Triplets I",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/minimum-sum-of-mountain-triplets-i",
- "solutionLink": "#"
- },
- {
- "problemName": "2909. Minimum Sum of Mountain Triplets II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-sum-of-mountain-triplets-ii",
- "solutionLink": "/dsa-solutions/lc-solutions/2900-2999/2909-minimum-sum-of-mountain-triplets-ii.md"
- },
- {
- "problemName": "2910. Minimum Number of Groups to Create a Valid Assignment",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-number-of-groups-to-create-a-valid-assignment",
- "solutionLink": "#"
- },
- {
- "problemName": "2911. Minimum Changes to Make K Semi-palindromes",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-changes-to-make-k-semi-palindromes",
- "solutionLink": "#"
- },
- {
- "problemName": "2912. Number of Ways to Reach Destination in the Grid",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/number-of-ways-to-reach-destination-in-the-grid",
- "solutionLink": "#"
- },
- {
- "problemName": "2913. Subarrays Distinct Element Sum of Squares I",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/subarrays-distinct-element-sum-of-squares-i",
- "solutionLink": "#"
- },
- {
- "problemName": "2914. Minimum Number of Changes to Make Binary String Beautiful",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-number-of-changes-to-make-binary-string-beautiful",
- "solutionLink": "#"
- },
- {
- "problemName": "2915. Length of the Longest Subsequence That Sums to Target",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/length-of-the-longest-subsequence-that-sums-to-target",
- "solutionLink": "#"
- },
- {
- "problemName": "2916. Subarrays Distinct Element Sum of Squares II",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/subarrays-distinct-element-sum-of-squares-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "2917. Find the K-or of an Array",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-the-k-or-of-an-array",
- "solutionLink": "#"
- },
- {
- "problemName": "2918. Minimum Equal Sum of Two Arrays After Replacing Zeros",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-equal-sum-of-two-arrays-after-replacing-zeros",
- "solutionLink": "#"
- },
- {
- "problemName": "2919. Minimum Increment Operations to Make Array Beautiful",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-increment-operations-to-make-array-beautiful",
- "solutionLink": "#"
- },
- {
- "problemName": "2920. Maximum Points After Collecting Coins From All Nodes",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-points-after-collecting-coins-from-all-nodes",
- "solutionLink": "#"
- },
- {
- "problemName": "2921. Maximum Profitable Triplets With Increasing Prices II",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-profitable-triplets-with-increasing-prices-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "2922. Market Analysis III",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/market-analysis-iii",
- "solutionLink": "#"
- },
- {
- "problemName": "2923. Find Champion I",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-champion-i",
- "solutionLink": "#"
- },
- {
- "problemName": "2924. Find Champion II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-champion-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "2925. Maximum Score After Applying Operations on a Tree",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-score-after-applying-operations-on-a-tree",
- "solutionLink": "#"
- },
- {
- "problemName": "2926. Maximum Balanced Subsequence Sum",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-balanced-subsequence-sum",
- "solutionLink": "#"
- },
- {
- "problemName": "2927. Distribute Candies Among Children III",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/distribute-candies-among-children-iii",
- "solutionLink": "#"
- },
- {
- "problemName": "2928. Distribute Candies Among Children I",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/distribute-candies-among-children-i",
- "solutionLink": "#"
- },
- {
- "problemName": "2929. Distribute Candies Among Children II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/distribute-candies-among-children-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "2930. Number of Strings Which Can Be Rearranged to Contain Substring",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-strings-which-can-be-rearranged-to-contain-substring",
- "solutionLink": "#"
- },
- {
- "problemName": "2931. Maximum Spending After Buying Items",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-spending-after-buying-items",
- "solutionLink": "#"
- },
- {
- "problemName": "2932. Maximum Strong Pair XOR I",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/maximum-strong-pair-xor-i",
- "solutionLink": "#"
- },
- {
- "problemName": "2933. High-Access Employees",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/high-access-employees",
- "solutionLink": "#"
- },
- {
- "problemName": "2934. Minimum Operations to Maximize Last Elements in Arrays",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-operations-to-maximize-last-elements-in-arrays",
- "solutionLink": "#"
- },
- {
- "problemName": "2935. Maximum Strong Pair XOR II",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-strong-pair-xor-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "2936. Number of Equal Numbers Blocks",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-equal-numbers-blocks",
- "solutionLink": "#"
- },
- {
- "problemName": "2937. Make Three Strings Equal",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/make-three-strings-equal",
- "solutionLink": "#"
- },
- {
- "problemName": "2938. Separate Black and White Balls",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/separate-black-and-white-balls",
- "solutionLink": "#"
- },
- {
- "problemName": "2939. Maximum Xor Product",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-xor-product",
- "solutionLink": "#"
- },
- {
- "problemName": "2940. Find Building Where Alice and Bob Can Meet",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/find-building-where-alice-and-bob-can-meet",
- "solutionLink": "#"
- },
- {
- "problemName": "2941. Maximum GCD-Sum of a Subarray",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/maximum-gcd-sum-of-a-subarray",
- "solutionLink": "#"
- },
- {
- "problemName": "2942. Find Words Containing Character",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-words-containing-character",
- "solutionLink": "#"
- },
- {
- "problemName": "2943. Maximize Area of Square Hole in Grid",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximize-area-of-square-hole-in-grid",
- "solutionLink": "#"
- },
- {
- "problemName": "2944. Minimum Number of Coins for Fruits",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-number-of-coins-for-fruits",
- "solutionLink": "#"
- },
- {
- "problemName": "2945. Find Maximum Non-decreasing Array Length",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/find-maximum-non-decreasing-array-length",
- "solutionLink": "#"
- },
- {
- "problemName": "2946. Matrix Similarity After Cyclic Shifts",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/matrix-similarity-after-cyclic-shifts",
- "solutionLink": "#"
- },
- {
- "problemName": "2947. Count Beautiful Substrings I",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-beautiful-substrings-i",
- "solutionLink": "#"
- },
- {
- "problemName": "2948. Make Lexicographically Smallest Array by Swapping Elements",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/make-lexicographically-smallest-array-by-swapping-elements",
- "solutionLink": "#"
- },
- {
- "problemName": "2949. Count Beautiful Substrings II",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-beautiful-substrings-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "2950. Number of Divisible Substrings",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-divisible-substrings",
- "solutionLink": "#"
- },
- {
- "problemName": "2951. Find the Peaks",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-the-peaks",
- "solutionLink": "#"
- },
- {
- "problemName": "2952. Minimum Number of Coins to be Added",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-number-of-coins-to-be-added",
- "solutionLink": "#"
- },
- {
- "problemName": "2953. Count Complete Substrings",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-complete-substrings",
- "solutionLink": "#"
- },
- {
- "problemName": "2954. Count the Number of Infection Sequences",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-the-number-of-infection-sequences",
- "solutionLink": "#"
- },
- {
- "problemName": "2955. Number of Same-End Substrings",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-same-end-substrings",
- "solutionLink": "#"
- },
- {
- "problemName": "2956. Find Common Elements Between Two Arrays",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-common-elements-between-two-arrays",
- "solutionLink": "#"
- },
- {
- "problemName": "2957. Remove Adjacent Almost-Equal Characters",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/remove-adjacent-almost-equal-characters",
- "solutionLink": "#"
- },
- {
- "problemName": "2958. Length of Longest Subarray With at Most K Frequency",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/length-of-longest-subarray-with-at-most-k-frequency",
- "solutionLink": "#"
- },
- {
- "problemName": "2959. Number of Possible Sets of Closing Branches",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/number-of-possible-sets-of-closing-branches",
- "solutionLink": "#"
- },
- {
- "problemName": "2960. Count Tested Devices After Test Operations",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/count-tested-devices-after-test-operations",
- "solutionLink": "#"
- },
- {
- "problemName": "2961. Double Modular Exponentiation",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/double-modular-exponentiation",
- "solutionLink": "#"
- },
- {
- "problemName": "2962. Count Subarrays Where Max Element Appears at Least K Times",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/count-subarrays-where-max-element-appears-at-least-k-times",
- "solutionLink": "#"
- },
- {
- "problemName": "2963. Count the Number of Good Partitions",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-the-number-of-good-partitions",
- "solutionLink": "#"
- },
- {
- "problemName": "2964. Number of Divisible Triplet Sums",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-divisible-triplet-sums",
- "solutionLink": "#"
- },
- {
- "problemName": "2965. Find Missing and Repeated Values",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-missing-and-repeated-values",
- "solutionLink": "#"
- },
- {
- "problemName": "2966. Divide Array Into Arrays With Max Difference",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/divide-array-into-arrays-with-max-difference",
- "solutionLink": "#"
- },
- {
- "problemName": "2967. Minimum Cost to Make Array Equalindromic",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-cost-to-make-array-equalindromic",
- "solutionLink": "#"
- },
- {
- "problemName": "2968. Apply Operations to Maximize Frequency Score",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/apply-operations-to-maximize-frequency-score",
- "solutionLink": "#"
- },
- {
- "problemName": "2969. Minimum Number of Coins for Fruits II",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-number-of-coins-for-fruits-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "2970. Count the Number of Incremovable Subarrays I",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/count-the-number-of-incremovable-subarrays-i",
- "solutionLink": "#"
- },
- {
- "problemName": "2971. Find Polygon With the Largest Perimeter",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-polygon-with-the-largest-perimeter",
- "solutionLink": "#"
- },
- {
- "problemName": "2972. Count the Number of Incremovable Subarrays II",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-the-number-of-incremovable-subarrays-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "2973. Find Number of Coins to Place in Tree Nodes",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/find-number-of-coins-to-place-in-tree-nodes",
- "solutionLink": "#"
- },
- {
- "problemName": "2974. Minimum Number Game",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/minimum-number-game",
- "solutionLink": "#"
- },
- {
- "problemName": "2975. Maximum Square Area by Removing Fences From a Field",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/maximum-square-area-by-removing-fences-from-a-field",
- "solutionLink": "#"
- },
- {
- "problemName": "2976. Minimum Cost to Convert String I",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-cost-to-convert-string-i",
- "solutionLink": "#"
- },
- {
- "problemName": "2977. Minimum Cost to Convert String II",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/minimum-cost-to-convert-string-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "2978. Symmetric Coordinates",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/symmetric-coordinates",
- "solutionLink": "#"
- },
- {
- "problemName": "2979. Most Expensive Item That Can Not Be Bought",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/most-expensive-item-that-can-not-be-bought",
- "solutionLink": "#"
- },
- {
- "problemName": "2980. Check if Bitwise OR Has Trailing Zeros",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/check-if-bitwise-or-has-trailing-zeros",
- "solutionLink": "#"
- },
- {
- "problemName": "2981. Find Longest Special Substring That Occurs Thrice I",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-longest-special-substring-that-occurs-thrice-i",
- "solutionLink": "#"
- },
- {
- "problemName": "2982. Find Longest Special Substring That Occurs Thrice II",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-longest-special-substring-that-occurs-thrice-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "2983. Palindrome Rearrangement Queries",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/palindrome-rearrangement-queries",
- "solutionLink": "#"
- },
- {
- "problemName": "2984. Find Peak Calling Hours for Each City",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-peak-calling-hours-for-each-city",
- "solutionLink": "#"
- },
- {
- "problemName": "2985. Calculate Compressed Mean",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/calculate-compressed-mean",
- "solutionLink": "#"
- },
- {
- "problemName": "2986. Find Third Transaction",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/find-third-transaction",
- "solutionLink": "#"
- },
- {
- "problemName": "2987. Find Expensive Cities",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/find-expensive-cities",
- "solutionLink": "#"
- },
- {
- "problemName": "2988. Manager of the Largest Department",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/manager-of-the-largest-department",
- "solutionLink": "#"
- },
- {
- "problemName": "2989. Class Performance",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/class-performance",
- "solutionLink": "#"
- },
- {
- "problemName": "2990. Loan Types",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/loan-types",
- "solutionLink": "#"
- },
- {
- "problemName": "2991. Top Three Wineries",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/top-three-wineries",
- "solutionLink": "#"
- },
- {
- "problemName": "2992. Number of Self-Divisible Permutations",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/number-of-self-divisible-permutations",
- "solutionLink": "#"
- },
- {
- "problemName": "2993. Friday Purchases I",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/friday-purchases-i",
- "solutionLink": "#"
- },
- {
- "problemName": "2994. Friday Purchases II",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/friday-purchases-ii",
- "solutionLink": "#"
- },
- {
- "problemName": "2995. Viewers Turned Streamers",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/viewers-turned-streamers",
- "solutionLink": "#"
- },
- {
- "problemName": "2996. Smallest Missing Integer Greater Than Sequential Prefix Sum",
- "difficulty": "Easy",
- "leetCodeLink": "https://leetcode.com/problems/smallest-missing-integer-greater-than-sequential-prefix-sum",
- "solutionLink": "#"
- },
- {
- "problemName": "2997. Minimum Number of Operations to Make Array XOR Equal to K",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-number-of-operations-to-make-array-xor-equal-to-k",
- "solutionLink": "#"
- },
- {
- "problemName": "2998. Minimum Number of Operations to Make X and Y Equal",
- "difficulty": "Medium",
- "leetCodeLink": "https://leetcode.com/problems/minimum-number-of-operations-to-make-x-and-y-equal",
- "solutionLink": "#"
- },
- {
- "problemName": "2999. Count the Number of Powerful Integers",
- "difficulty": "Hard",
- "leetCodeLink": "https://leetcode.com/problems/count-the-number-of-powerful-integers",
- "solutionLink": "/dsa-solutions/lc-solutions/2900-2999/2999-count-the-number-of-powerful-integers.md"
- }
-];
-
-
-
-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 LeetCode website. You can also click on the solution link to view the solution of the problem.
diff --git a/dsa-problems/leetcode-problems/3000-3099.md b/dsa-problems/leetcode-problems/3000-3099.md
deleted file mode 100644
index 21416c8aa..000000000
--- a/dsa-problems/leetcode-problems/3000-3099.md
+++ /dev/null
@@ -1,628 +0,0 @@
----
-id: 3000-3099
-title: LeetCode Problems 3000 - 3099
-sidebar_label: 3000 - 3099
-keywords:
- - LeetCode
- - LeetCode Problems
- - LeetCode Problems 3000 - 3099
- - DSA problems
----
-
-export const problems = [
-{
-"problemName": "3000. Maximum Area of Longest Diagonal Rectangle",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/maximum-area-of-longest-diagonal-rectangle",
-"solutionLink": "/dsa-solutions/lc-solutions/3000-3099/3000-maximum-area-of-diagonal-rectangle"
-},
-{
-"problemName": "3001. Minimum Moves to Capture The Queen",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/minimum-moves-to-capture-the-queen",
-"solutionLink": "#"
-},
-{
-"problemName": "3002. Maximum Size of a Set After Removals",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/maximum-size-of-a-set-after-removals",
-"solutionLink": "/dsa-solutions/lc-solutions/3000-3099/maximum-size-of-a-set-after-removals"
-},
-{
-"problemName": "3003. Maximize the Number of Partitions After Operations",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/maximize-the-number-of-partitions-after-operations",
-"solutionLink": "#"
-},
-{
-"problemName": "3004. Maximum Subtree of the Same Color",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/maximum-subtree-of-the-same-color",
-"solutionLink": "#"
-},
-{
-"problemName": "3005. Count Elements With Maximum Frequency",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/count-elements-with-maximum-frequency",
-"solutionLink": "/dsa-solutions/lc-solutions/3000-3099/count-elements-with-maximum-frequency"
-},
-{
-"problemName": "3006. Find Beautiful Indices in the Given Array I",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/find-beautiful-indices-in-the-given-array-i",
-"solutionLink": "/dsa-solutions/lc-solutions/3000-3099/"
-},
-{
-"problemName": "3007. Maximum Number That Sum of the Prices Is Less Than or Equal to K",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/maximum-number-that-sum-of-the-prices-is-less-than-or-equal-to-k",
-"solutionLink": "#"
-},
-{
-"problemName": "3008. Find Beautiful Indices in the Given Array II",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/find-beautiful-indices-in-the-given-array-ii",
-"solutionLink": "#"
-},
-{
-"problemName": "3009. Maximum Number of Intersections on the Chart",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/maximum-number-of-intersections-on-the-chart",
-"solutionLink": "#"
-},
-{
-"problemName": "3010. Divide an Array Into Subarrays With Minimum Cost I",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/divide-an-array-into-subarrays-with-minimum-cost-i",
-"solutionLink": "/dsa-solutions/lc-solutions/3000-3099/divide-an-array-into-subarrays-with-minimum-cost-i"
-},
-{
-"problemName": "3011. Find if Array Can Be Sorted",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/find-if-array-can-be-sorted",
-"solutionLink": "#"
-},
-{
-"problemName": "3012. Minimize Length of Array Using Operations",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/minimize-length-of-array-using-operations",
-"solutionLink": "#"
-},
-{
-"problemName": "3013. Divide an Array Into Subarrays With Minimum Cost II",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/divide-an-array-into-subarrays-with-minimum-cost-ii",
-"solutionLink": "#"
-},
-{
-"problemName": "3014. Minimum Number of Pushes to Type Word I",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/minimum-number-of-pushes-to-type-word-i",
-"solutionLink": "#"
-},
-{
-"problemName": "3015. Count the Number of Houses at a Certain Distance I",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/count-the-number-of-houses-at-a-certain-distance-i",
-"solutionLink": "#"
-},
-{
-"problemName": "3016. Minimum Number of Pushes to Type Word II",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/minimum-number-of-pushes-to-type-word-ii",
-"solutionLink": "#"
-},
-{
-"problemName": "3017. Count the Number of Houses at a Certain Distance II",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/count-the-number-of-houses-at-a-certain-distance-ii",
-"solutionLink": "#"
-},
-{
-"problemName": "3018. Maximum Number of Removal Queries That Can Be Processed I",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/maximum-number-of-removal-queries-that-can-be-processed-i",
-"solutionLink": "#"
-},
-{
-"problemName": "3019. Number of Changing Keys",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/number-of-changing-keys",
-"solutionLink": "/dsa-solutions/lc-solutions/3000-3099/number-of-changing-keys"
-},
-{
-"problemName": "3020. Find the Maximum Number of Elements in Subset",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/find-the-maximum-number-of-elements-in-subset",
-"solutionLink": "#"
-},
-{
-"problemName": "3021. Alice and Bob Playing Flower Game",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/alice-and-bob-playing-flower-game",
-"solutionLink": "/dsa-solutions/lc-solutions/3000-3099/alice-and-bob-playing-flower-game"
-},
-{
-"problemName": "3022. Minimize OR of Remaining Elements Using Operations",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/minimize-or-of-remaining-elements-using-operations",
-"solutionLink": "#"
-},
-{
-"problemName": "3023. Find Pattern in Infinite Stream I",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/find-pattern-in-infinite-stream-i",
-"solutionLink": "#"
-},
-{
-"problemName": "3024. Type of Triangle",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/type-of-triangle",
-"solutionLink": "/dsa-solutions/lc-solutions/3000-3099/type-of-triangle"
-},
-{
-"problemName": "3025. Find the Number of Ways to Place People I",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/find-the-number-of-ways-to-place-people-i",
-"solutionLink": "#"
-},
-{
-"problemName": "3026. Maximum Good Subarray Sum",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/maximum-good-subarray-sum",
-"solutionLink": "#"
-},
-{
-"problemName": "3027. Find the Number of Ways to Place People II",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/find-the-number-of-ways-to-place-people-ii",
-"solutionLink": "#"
-},
-{
-"problemName": "3028. Ant on the Boundary",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/ant-on-the-boundary",
-"solutionLink": "/dsa-solutions/lc-solutions/3000-3099/ant-on-the-boundary"
-},
-{
-"problemName": "3029. Minimum Time to Revert Word to Initial State I",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/minimum-time-to-revert-word-to-initial-state-i",
-"solutionLink": "#"
-},
-{
-"problemName": "3030. Find the Grid of Region Average",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/find-the-grid-of-region-average",
-"solutionLink": "#"
-},
-{
-"problemName": "3031. Minimum Time to Revert Word to Initial State II",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/minimum-time-to-revert-word-to-initial-state-ii",
-"solutionLink": "#"
-},
-{
-"problemName": "3032. Count Numbers With Unique Digits II",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/count-numbers-with-unique-digits-ii",
-"solutionLink": "#"
-},
-{
-"problemName": "3033. Modify the Matrix",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/modify-the-matrix",
-"solutionLink": "/dsa-solutions/lc-solutions/3000-3099/modify-the-matrix"
-},
-{
-"problemName": "3034. Number of Subarrays That Match a Pattern I",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/number-of-subarrays-that-match-a-pattern-i",
-"solutionLink": "/dsa-solutions/lc-solutions/3000-3099/number-of-subarrays-that-match-a-pattern-i"
-},
-{
-"problemName": "3035. Maximum Palindromes After Operations",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/maximum-palindromes-after-operations",
-"solutionLink": "/dsa-solutions/lc-solutions/3000-3099/maximum-palindromes-after-operations"
-},
-{
-"problemName": "3036. Number of Subarrays That Match a Pattern II",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/number-of-subarrays-that-match-a-pattern-ii",
-"solutionLink": "#"
-},
-{
-"problemName": "3037. Find Pattern in Infinite Stream II",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/find-pattern-in-infinite-stream-ii",
-"solutionLink": "#"
-},
-{
-"problemName": "3038. Maximum Number of Operations With the Same Score I",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/maximum-number-of-operations-with-the-same-score-i",
-"solutionLink": "/dsa-solutions/lc-solutions/3000-3099/maximum-number-of-operations-with-the-same-score-i"
-},
-{
-"problemName": "3039. Apply Operations to Make String Empty",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/apply-operations-to-make-string-empty",
-"solutionLink": "#"
-},
-{
-"problemName": "3040. Maximum Number of Operations With the Same Score II",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/maximum-number-of-operations-with-the-same-score-ii",
-"solutionLink": "#"
-},
-{
-"problemName": "3041. Maximize Consecutive Elements in an Array After Modification",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/maximize-consecutive-elements-in-an-array-after-modification",
-"solutionLink": "#"
-},
-{
-"problemName": "3042. Count Prefix and Suffix Pairs I",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/count-prefix-and-suffix-pairs-i",
-"solutionLink": "#"
-},
-{
-"problemName": "3043. Find the Length of the Longest Common Prefix",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/find-the-length-of-the-longest-common-prefix",
-"solutionLink": "#"
-},
-{
-"problemName": "3044. Most Frequent Prime",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/most-frequent-prime",
-"solutionLink": "#"
-},
-{
-"problemName": "3045. Count Prefix and Suffix Pairs II",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/count-prefix-and-suffix-pairs-ii",
-"solutionLink": "#"
-},
-{
-"problemName": "3046. Split the Array",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/split-the-array",
-"solutionLink": "#"
-},
-{
-"problemName": "3047. Find the Largest Area of Square Inside Two Rectangles",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/find-the-largest-area-of-square-inside-two-rectangles",
-"solutionLink": "#"
-},
-{
-"problemName": "3048. Earliest Second to Mark Indices I",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/earliest-second-to-mark-indices-i",
-"solutionLink": "#"
-},
-{
-"problemName": "3049. Earliest Second to Mark Indices II",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/earliest-second-to-mark-indices-ii",
-"solutionLink": "#"
-},
-{
-"problemName": "3050. Pizza Toppings Cost Analysis",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/pizza-toppings-cost-analysis",
-"solutionLink": "#"
-},
-{
-"problemName": "3051. Find Candidates for Data Scientist Position",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/find-candidates-for-data-scientist-position",
-"solutionLink": "#"
-},
-{
-"problemName": "3052. Maximize Items",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/maximize-items",
-"solutionLink": "#"
-},
-{
-"problemName": "3053. Classifying Triangles by Lengths",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/classifying-triangles-by-lengths",
-"solutionLink": "#"
-},
-{
-"problemName": "3054. Binary Tree Nodes",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/binary-tree-nodes",
-"solutionLink": "#"
-},
-{
-"problemName": "3055. Top Percentile Fraud",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/top-percentile-fraud",
-"solutionLink": "#"
-},
-{
-"problemName": "3056. Snaps Analysis",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/snaps-analysis",
-"solutionLink": "#"
-},
-{
-"problemName": "3057. Employees Project Allocation",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/employees-project-allocation",
-"solutionLink": "#"
-},
-{
-"problemName": "3058. Friends With No Mutual Friends",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/friends-with-no-mutual-friends",
-"solutionLink": "#"
-},
-{
-"problemName": "3059. Find All Unique Email Domains",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/find-all-unique-email-domains",
-"solutionLink": "#"
-},
-{
-"problemName": "3060. User Activities within Time Bounds",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/user-activities-within-time-bounds",
-"solutionLink": "#"
-},
-{
-"problemName": "3061. Calculate Trapping Rain Water",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/calculate-trapping-rain-water",
-"solutionLink": "#"
-},
-{
-"problemName": "3062. Winner of the Linked List Game",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/winner-of-the-linked-list-game",
-"solutionLink": "#"
-},
-{
-"problemName": "3063. Linked List Frequency",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/linked-list-frequency",
-"solutionLink": "#"
-},
-{
-"problemName": "3064. Guess the Number Using Bitwise Questions I",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/guess-the-number-using-bitwise-questions-i",
-"solutionLink": "#"
-},
-{
-"problemName": "3065. Minimum Operations to Exceed Threshold Value I",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/minimum-operations-to-exceed-threshold-value-i",
-"solutionLink": "#"
-},
-{
-"problemName": "3066. Minimum Operations to Exceed Threshold Value II",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/minimum-operations-to-exceed-threshold-value-ii",
-"solutionLink": "#"
-},
-{
-"problemName": "3067. Count Pairs of Connectable Servers in a Weighted Tree Network",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/count-pairs-of-connectable-servers-in-a-weighted-tree-network",
-"solutionLink": "#"
-},
-{
-"problemName": "3068. Find the Maximum Sum of Node Values",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/find-the-maximum-sum-of-node-values",
-"solutionLink": "#"
-},
-{
-"problemName": "3069. Distribute Elements Into Two Arrays I",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/distribute-elements-into-two-arrays-i",
-"solutionLink": "#"
-},
-{
-"problemName": "3070. Count Submatrices with Top-Left Element and Sum Less Than k",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/count-submatrices-with-top-left-element-and-sum-less-than-k",
-"solutionLink": "#"
-},
-{
-"problemName": "3071. Minimum Operations to Write the Letter Y on a Grid",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/minimum-operations-to-write-the-letter-y-on-a-grid",
-"solutionLink": "#"
-},
-{
-"problemName": "3072. Distribute Elements Into Two Arrays II",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/distribute-elements-into-two-arrays-ii",
-"solutionLink": "#"
-},
-{
-"problemName": "3073. Maximum Increasing Triplet Value",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/maximum-increasing-triplet-value",
-"solutionLink": "#"
-},
-{
-"problemName": "3074. Apple Redistribution into Boxes",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/apple-redistribution-into-boxes",
-"solutionLink": "#"
-},
-{
-"problemName": "3075. Maximize Happiness of Selected Children",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/maximize-happiness-of-selected-children",
-"solutionLink": "/dsa-solutions/lc-solutions/3000-3099/maximize happiness of selected children"
-},
-{
-"problemName": "3076. Shortest Uncommon Substring in an Array",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/shortest-uncommon-substring-in-an-array",
-"solutionLink": "#"
-},
-{
-"problemName": "3077. Maximum Strength of K Disjoint Subarrays",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/maximum-strength-of-k-disjoint-subarrays",
-"solutionLink": "#"
-},
-{
-"problemName": "3078. Match Alphanumerical Pattern in Matrix I",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/match-alphanumerical-pattern-in-matrix-i",
-"solutionLink": "#"
-},
-{
-"problemName": "3079. Find the Sum of Encrypted Integers",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/find-the-sum-of-encrypted-integers",
-"solutionLink": "#"
-},
-{
-"problemName": "3080. Mark Elements on Array by Performing Queries",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/mark-elements-on-array-by-performing-queries",
-"solutionLink": "#"
-},
-{
-"problemName": "3081. Replace Question Marks in String to Minimize Its Value",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/replace-question-marks-in-string-to-minimize-its-value",
-"solutionLink": "#"
-},
-{
-"problemName": "3082. Find the Sum of the Power of All Subsequences",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/find-the-sum-of-the-power-of-all-subsequences",
-"solutionLink": "#"
-},
-{
-"problemName": "3083. Existence of a Substring in a String and Its Reverse",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/existence-of-a-substring-in-a-string-and-its-reverse",
-"solutionLink": "#"
-},
-{
-"problemName": "3084. Count Substrings Starting and Ending with Given Character",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/count-substrings-starting-and-ending-with-given-character",
-"solutionLink": "#"
-},
-{
-"problemName": "3085. Minimum Deletions to Make String K-Special",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/minimum-deletions-to-make-string-k-special",
-"solutionLink": "#"
-},
-{
-"problemName": "3086. Minimum Moves to Pick K Ones",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/minimum-moves-to-pick-k-ones",
-"solutionLink": "#"
-},
-{
-"problemName": "3087. Find Trending Hashtags",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/find-trending-hashtags",
-"solutionLink": "#"
-},
-{
-"problemName": "3088. Make String Anti-palindrome",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/make-string-anti-palindrome",
-"solutionLink": "#"
-},
-{
-"problemName": "3089. Find Bursty Behavior",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/find-bursty-behavior",
-"solutionLink": "#"
-},
-{
-"problemName": "3090. Maximum Length Substring With Two Occurrences",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/maximum-length-substring-with-two-occurrences",
-"solutionLink": "#"
-},
-{
-"problemName": "3091. Apply Operations to Make Sum of Array Greater Than or Equal to k",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/apply-operations-to-make-sum-of-array-greater-than-or-equal-to-k",
-"solutionLink": "#"
-},
-{
-"problemName": "3092. Most Frequent IDs",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/most-frequent-ids",
-"solutionLink": "#"
-},
-{
-"problemName": "3093. Longest Common Suffix Queries",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/longest-common-suffix-queries",
-"solutionLink": "#"
-},
-{
-"problemName": "3094. Guess the Number Using Bitwise Questions II",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/guess-the-number-using-bitwise-questions-ii",
-"solutionLink": "#"
-},
-{
-"problemName": "3095. Shortest Subarray With OR at Least K I",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/shortest-subarray-with-or-at-least-k-i",
-"solutionLink": "#"
-},
-{
-"problemName": "3096. Minimum Levels to Gain More Points",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/minimum-levels-to-gain-more-points",
-"solutionLink": "#"
-},
-{
-"problemName": "3097. Shortest Subarray With OR at Least K II",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/shortest-subarray-with-or-at-least-k-ii",
-"solutionLink": "#"
-},
-{
-"problemName": "3098. Find the Sum of Subsequence Powers",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/find-the-sum-of-subsequence-powers",
-"solutionLink": "#"
-},
-{
-"problemName": "3099. Harshad Number",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/harshad-number",
-"solutionLink": "/dsa-solutions/lc-solutions/3000-3099/Harshad-Number"
-},
-{
-"problemName": "3001. Minimum Moves To Capture The Queen",
-"difficulty": "medium",
-"leetCodeLink": "https://leetcode.com/problems/minimum-moves-to-capture-the-queen/description/",
-"solutionLink": "dsa-solutions/lc-solutions/3000-3099/3001-Minimum-Moves-To-Capture-The-Queen.md"
-}
-];
-
-
-
-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 LeetCode website. You can also click on the solution link to view the solution of the problem.
diff --git a/dsa-problems/leetcode-problems/3100-3199.md b/dsa-problems/leetcode-problems/3100-3199.md
deleted file mode 100644
index 7ab013886..000000000
--- a/dsa-problems/leetcode-problems/3100-3199.md
+++ /dev/null
@@ -1,478 +0,0 @@
----
-id: 3100-3199
-title: LeetCode Problems 3100 - 3199
-sidebar_label: 3100 - 3199
-keywords:
- - LeetCode
- - LeetCode Problems
- - LeetCode Problems 3100 - 3199
- - DSA problems
----
-
-export const problems = [
-{
-"problemName": "3100. Water Bottles II",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/water-bottles-ii",
-"solutionLink": "/dsa-solutions/lc-solutions/3100-3199/water-bottles-II"
-},
-{
-"problemName": "3101. Count Alternating Subarrays",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/count-alternating-subarrays",
-"solutionLink": "/dsa-solutions/lc-solutions/3100-3199/Count-Alternating-subarrays"
-},
-{
-"problemName": "3102. Minimize Manhattan Distances",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/minimize-manhattan-distances",
-"solutionLink": "/dsa-solutions/lc-solutions/3100-3199/Minimize-Manhattan-Distances"
-},
-{
-"problemName": "3103. Find Trending Hashtags II",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/find-trending-hashtags-ii",
-"solutionLink": "#"
-},
-{
-"problemName": "3104. Find Longest Self-Contained Substring",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/find-longest-self-contained-substring",
-"solutionLink": "#"
-},
-{
-"problemName": "3105. Longest Strictly Increasing or Strictly Decreasing Subarray",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/longest-strictly-increasing-or-strictly-decreasing-subarray",
-"solutionLink": "/dsa-solutions/lc-solutions/3100-3199/longest-strictly-subarray"
-},
-{
-"problemName": "3106. Lexicographically Smallest String After Operations With Constraint",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/lexicographically-smallest-string-after-operations-with-constraint",
-"solutionLink": "/dsa-solutions/lc-solutions/3100-3199/Lexicographically-Smallest-String-After-Operations-With-Constraint"
-},
-{
-"problemName": "3107. Minimum Operations to Make Median of Array Equal to K",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/minimum-operations-to-make-median-of-array-equal-to-k",
-"solutionLink": "/dsa-solutions/lc-solutions/3100-3199/Minimum-operation-to-make-median-of-array-equal-to-k"
-},
-{
-"problemName": "3108. Minimum Cost Walk in Weighted Graph",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/minimum-cost-walk-in-weighted-graph",
-"solutionLink": "/dsa-solutions/lc-solutions/3100-3199/Minimum-cost-walk-in-weighted-graph"
-},
-{
-"problemName": "3109. Find the Index of Permutation",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/find-the-index-of-permutation",
-"solutionLink": "#"
-},
-{
-"problemName": "3110. Score of a String",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/score-of-a-string",
-"solutionLink": "/dsa-solutions/lc-solutions/3100-3199/score-of-a-string"
-},
-{
-"problemName": "3111. Minimum Rectangles to Cover Points",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/minimum-rectangles-to-cover-points",
-"solutionLink": "/dsa-solutions/lc-solutions/3100-3199/minimum-rectangle-to-cover-point"
-},
-{
-"problemName": "3112. Minimum Time to Visit Disappearing Nodes",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/minimum-time-to-visit-disappearing-nodes",
-"solutionLink": "#"
-},
-{
-"problemName": "3113. Find the Number of Subarrays Where Boundary Elements Are Maximum",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/find-the-number-of-subarrays-where-boundary-elements-are-maximum",
-"solutionLink": "#"
-},
-{
-"problemName": "3114. Latest Time You Can Obtain After Replacing Characters",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/latest-time-you-can-obtain-after-replacing-characters",
-"solutionLink": "#"
-},
-{
-"problemName": "3115. Maximum Prime Difference",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/maximum-prime-difference",
-"solutionLink": "/dsa-solutions/lc-solutions/3100-3199/maximum-prime-difference"
-},
-{
-"problemName": "3116. Kth Smallest Amount With Single Denomination Combination",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/kth-smallest-amount-with-single-denomination-combination",
-"solutionLink": "#"
-},
-{
-"problemName": "3117. Minimum Sum of Values by Dividing Array",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/minimum-sum-of-values-by-dividing-array",
-"solutionLink": "#"
-},
-{
-"problemName": "3118. Friday Purchase III",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/friday-purchase-iii",
-"solutionLink": "#"
-},
-{
-"problemName": "3119. Maximum Number of Potholes That Can Be Fixed",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/maximum-number-of-potholes-that-can-be-fixed",
-"solutionLink": "#"
-},
-{
-"problemName": "3120. Count the Number of Special Characters I",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/count-the-number-of-special-characters-i",
-"solutionLink": "#"
-},
-{
-"problemName": "3121. Count the Number of Special Characters II",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/count-the-number-of-special-characters-ii",
-"solutionLink": "#"
-},
-{
-"problemName": "3122. Minimum Number of Operations to Satisfy Conditions",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/minimum-number-of-operations-to-satisfy-conditions",
-"solutionLink": "#"
-},
-{
-"problemName": "3123. Find Edges in Shortest Paths",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/find-edges-in-shortest-paths",
-"solutionLink": "#"
-},
-{
-"problemName": "3124. Find Longest Calls",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/find-longest-calls",
-"solutionLink": "#"
-},
-{
-"problemName": "3125. Maximum Number That Makes Result of Bitwise AND Zero",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/maximum-number-that-makes-result-of-bitwise-and-zero",
-"solutionLink": "#"
-},
-{
-"problemName": "3126. Server Utilization Time",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/server-utilization-time",
-"solutionLink": "#"
-},
-{
-"problemName": "3127. Make a Square with the Same Color",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/make-a-square-with-the-same-color",
-"solutionLink": "#"
-},
-{
-"problemName": "3128. Right Triangles",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/right-triangles",
-"solutionLink": "#"
-},
-{
-"problemName": "3129. Find All Possible Stable Binary Arrays I",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/find-all-possible-stable-binary-arrays-i",
-"solutionLink": "#"
-},
-{
-"problemName": "3130. Find All Possible Stable Binary Arrays II",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/find-all-possible-stable-binary-arrays-ii",
-"solutionLink": "#"
-},
-{
-"problemName": "3131. Find the Integer Added to Array I",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/find-the-integer-added-to-array-i",
-"solutionLink": "/dsa-solutions/lc-solutions/3100-3199/find-integer-added-to-array"
-},
-{
-"problemName": "3132. Find the Integer Added to Array II",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/find-the-integer-added-to-array-ii",
-"solutionLink": "#"
-},
-{
-"problemName": "3133. Minimum Array End",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/minimum-array-end",
-"solutionLink": "#"
-},
-{
-"problemName": "3134. Find the Median of the Uniqueness Array",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/find-the-median-of-the-uniqueness-array",
-"solutionLink": "#"
-},
-{
-"problemName": "3135. Equalize Strings by Adding or Removing Characters at Ends",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/equalize-strings-by-adding-or-removing-characters-at-ends",
-"solutionLink": "#"
-},
-{
-"problemName": "3136. Valid Word",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/valid-word",
-"solutionLink": "#"
-},
-{
-"problemName": "3137. Minimum Number of Operations to Make Word K-Periodic",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/minimum-number-of-operations-to-make-word-k-periodic",
-"solutionLink": "#"
-},
-{
-"problemName": "3138. Minimum Length of Anagram Concatenation",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/minimum-length-of-anagram-concatenation",
-"solutionLink": "#"
-},
-{
-"problemName": "3139. Minimum Cost to Equalize Array",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/minimum-cost-to-equalize-array",
-"solutionLink": "/dsa-solutions/lc-solutions/3100-3199/minimum-cost-to-equalize-array"
-},
-{
-"problemName": "3140. Consecutive Available Seats II",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/consecutive-available-seats-ii",
-"solutionLink": "#"
-},
-{
-"problemName": "3141. Maximum Hamming Distances",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/maximum-hamming-distances",
-"solutionLink": "#"
-},
-{
-"problemName": "3142. Check if Grid Satisfies Conditions",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/check-if-grid-satisfies-conditions",
-"solutionLink": "#"
-},
-{
-"problemName": "3143. Maximum Points Inside the Square",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/maximum-points-inside-the-square",
-"solutionLink": "/dsa-solutions/lc-solutions/3100-3199/maximum-points-inside-square"
-},
-{
-"problemName": "3144. Minimum Substring Partition of Equal Character Frequency",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/minimum-substring-partition-of-equal-character-frequency",
-"solutionLink": "/dsa-solutions/lc-solutions/3100-3199/minimum-substring-partition-of-equal-charater-frequency"
-},
-{
-"problemName": "3145. Find Products of Elements of Big Array",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/find-products-of-elements-of-big-array",
-"solutionLink": "/dsa-solutions/lc-solutions/3100-3199/find-product-of-element-of-big-array"
-},
-{
-"problemName": "3146. Permutation Difference between Two Strings",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/permutation-difference-between-two-strings",
-"solutionLink": "/dsa-solutions/lc-solutions/3100-3199/permutation-difference-between-two-string"
-},
-{
-"problemName": "3147. Taking Maximum Energy From the Mystic Dungeon",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/taking-maximum-energy-from-the-mystic-dungeon",
-"solutionLink": "/dsa-solutions/lc-solutions/3100-3199/Taking-Maximum-Energy-From-the-Mystic-Dungeon"
-},
-{
-"problemName": "3148. Maximum Difference Score in a Grid",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/maximum-difference-score-in-a-grid",
-"solutionLink": "#"
-},
-{
-"problemName": "3149. Find the Minimum Cost Array Permutation",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/find-the-minimum-cost-array-permutation",
-"solutionLink": "#"
-},
-{
-"problemName": "3150. Invalid Tweets II",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/invalid-tweets-ii",
-"solutionLink": "#"
-},
-{
-"problemName": "3151. Special Array I",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/special-array-i",
-"solutionLink": "#"
-},
-{
-"problemName": "3152. Special Array II",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/special-array-ii",
-"solutionLink": "#"
-},
-{
-"problemName": "3153. Sum of Digit Differences of All Pairs",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/sum-of-digit-differences-of-all-pairs",
-"solutionLink": "#"
-},
-{
-"problemName": "3154. Find Number of Ways to Reach the K-th Stair",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/find-number-of-ways-to-reach-the-k-th-stair",
-"solutionLink": "#"
-},
-{
-"problemName": "3155. Maximum Number of Upgradable Servers",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/maximum-number-of-upgradable-servers",
-"solutionLink": "#"
-},
-{
-"problemName": "3156. Employee Task Duration and Concurrent Tasks",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/employee-task-duration-and-concurrent-tasks",
-"solutionLink": "#"
-},
-{
-"problemName": "3157. Find the Level of Tree with Minimum Sum",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/find-the-level-of-tree-with-minimum-sum",
-"solutionLink": "#"
-},
-{
-"problemName": "3158. Find the XOR of Numbers Which Appear Twice",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/find-the-xor-of-numbers-which-appear-twice",
-"solutionLink": "#"
-},
-{
-"problemName": "3159. Find Occurrences of an Element in an Array",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/find-occurrences-of-an-element-in-an-array",
-"solutionLink": "#"
-},
-{
-"problemName": "3160. Find the Number of Distinct Colors Among the Balls",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/find-the-number-of-distinct-colors-among-the-balls",
-"solutionLink": "#"
-},
-{
-"problemName": "3161. Block Placement Queries",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/block-placement-queries",
-"solutionLink": "/dsa-solutions/lc-solutions/3100-3199/fenwick-tree-solution"
-},
-{
-"problemName": "3162. Find the Number of Good Pairs I",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/find-the-number-of-good-pairs-i",
-"solutionLink": "#"
-},
-{
-"problemName": "3163. String Compression III",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/string-compression-iii",
-"solutionLink": "#"
-},
-{
-"problemName": "3164. Find the Number of Good Pairs II",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/find-the-number-of-good-pairs-ii",
-"solutionLink": "#"
-},
-{
-"problemName": "3165. Maximum Sum of Subsequence With Non-adjacent Elements",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/maximum-sum-of-subsequence-with-non-adjacent-elements",
-"solutionLink": "#"
-},
-{
-"problemName": "3166. Calculate Parking Fees and Duration",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/calculate-parking-fees-and-duration",
-"solutionLink": "#"
-},
-{
-"problemName": "3167. Better Compression of String",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/better-compression-of-string",
-"solutionLink": "#"
-},
-{
-"problemName": "3169. Count Days Without Meetings",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/count-days-without-meetings/description/",
-"solutionLink": "/dsa-solutions/lc-solutions/3100-3199/count-days-without-meetings"
-},
-{
-"problemName": "3170. Lexicographically Minimum String After Removing Stars",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/lexicographically-minimum-string-after-removing-stars/description/",
-"solutionLink": "/dsa-solutions/lc-solutions/3100-3199/lexicographically-minimum-string-after-removing-stars"
-},
-{
-"problemName": "3179.Find the N-th Value After K Seconds",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/find-the-n-th-value-after-k-seconds/",
-"solutionLink": "/dsa-solutions/lc-solutions/3100-3199/find-the-n-th-value-after-k-seconds"
-},
-{
-"problemName": "3180. Maximum Total Reward Using Operations I",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/maximum-total-reward-using-operations-i",
-"solutionLink": "#"
-},
-{
-"problemName": "3181. Maximum Total Reward Using Operations II",
-"difficulty": "Hard",
-"leetCodeLink": "https://leetcode.com/problems/maximum-total-reward-using-operations-ii",
-"solutionLink": "#"
-},
-{
-"problemName": "3182. Find Top Scoring Students",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/find-top-scoring-students",
-"solutionLink": "#"
-},
-{
-"problemName": "3183. The Number of Ways To Make The Sum",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/the-number-of-ways-to-make-the-sum",
-"solutionLink": "#"
-},
-{
-"problemName": "3195. Find the Minimum Area to Cover All Ones I",
-"difficulty": "Medium",
-"leetCodeLink": "https://leetcode.com/problems/find-the-minimum-area-to-cover-all-ones-i/description/",
-"solutionLink": "/dsa-solutions/lc-solutions/3100-3199/find-the-minimum-area-to-cover-all-ones-i"
-},
-];
-
-
-
-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 LeetCode website. You can also click on the solution link to view the solution of the problem.
diff --git a/dsa-problems/leetcode-problems/3200-3299.md b/dsa-problems/leetcode-problems/3200-3299.md
deleted file mode 100644
index dedcc4cd9..000000000
--- a/dsa-problems/leetcode-problems/3200-3299.md
+++ /dev/null
@@ -1,28 +0,0 @@
----
-id: 3200-3299
-title: LeetCode Problems 3200-3299
-sidebar_label: 3200-3299
-keywords:
- - LeetCode
- - LeetCode Problems
- - LeetCode Problems3200-3299
- - DSA problems
----
-
-export const problems = [
-{
-"problemName": "3216.Lexicographically Smallest String After a Swap",
-"difficulty": "Easy",
-"leetCodeLink": "https://leetcode.com/problems/lexicographically-smallest-string-after-a-swap/description/",
-"solutionLink": "/dsa-solutions/lc-solutions/3200-3299/lexicographically-smallest-string-after-a-swap"
-},
-];
-
-
-
-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 LeetCode website. You can also click on the solution link to view the solution of the problem.
diff --git a/dsa-problems/leetcode-problems/_category_.json b/dsa-problems/leetcode-problems/_category_.json
deleted file mode 100644
index 574bfe164..000000000
--- a/dsa-problems/leetcode-problems/_category_.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "label": "LeetCode Problems",
- "position": 2,
- "link": {
- "type": "generated-index",
- "description": "You will learn about the LeetCode Problems of Data Structures and Algorithms."
- }
- }
\ No newline at end of file
diff --git a/dsa-solutions/Searching-Algorithms/01-Linear-Search.md b/dsa-solutions/Searching-Algorithms/01-Linear-Search.md
deleted file mode 100644
index 1f6dd37c7..000000000
--- a/dsa-solutions/Searching-Algorithms/01-Linear-Search.md
+++ /dev/null
@@ -1,168 +0,0 @@
----
-id: Linear-Search
-title: Linear Search (Geeks for Geeks)
-sidebar_label: Linear Search
-tags:
- - Beginner
- - Search Algorithms
- - Geeks for Geeks
- - CPP
- - Python
- - Java
- - JavaScript
- - DSA
-description: "This is a solution to the Linear Search problem on Geeks for Geeks."
----
-
-## What is Linear Search?
-
-Linear Search is a simple search algorithm used to find the presence of a target element within a list. It sequentially checks each element of the list until the target element is found or the list ends.
-
-## Algorithm for Linear Search
-
-1. Start from the leftmost element of the list and move towards the right.
-2. Compare the target element with each element of the list.
-3. If the target element matches with an element, return the index.
-4. If the target element does not match any element, return -1.
-
-## How does Linear Search work?
-
-- It starts from the first element and compares the target element with each element in the list.
-- If a match is found, it returns the index of the matching element.
-- If no match is found after checking all elements, it returns -1 indicating the target is not present in the list.
-
-
-
-## Problem Description
-
-Given a list and a target element, implement the Linear Search algorithm to find the index of the target element in the list. If the element is not present, return -1.
-
-## Examples
-
-**Example 1:**
-```
-Input:
-list = [1, 3, 5, 7, 9]
-target = 5
-Output: 2
-```
-
-**Example 2:**
-```
-Input:
-list = [2, 4, 6, 8, 10]
-target = 7
-Output: -1
-```
-## Your task
-
-Complete the function search() which takes two integers n , k and an array arr, as input parameters and returns an integer denoting the answer. Return -1 if the number is not found in the array. You don't have to print answers or take inputs.
-
-Expected Time Complexity: $O(n)$
-Expected Auxiliary Space: $O(1)$
-
-## Constraints
-
-- $1 <= n <= 10^6$
-- $1 <= k <= 10^6$
-- $1 <= arr[i] <= 10^9$
-
-## Implementation
-
-
-
-
- ```python
- def linear_search(lst, target):
- for i in range(len(lst)):
- if lst[i] == target:
- return i
- return -1
- ```
-
-
-
-
- ```cpp
- #include
- #include
-
- int linear_search(const std::vector& lst, int target) {
- for (int i = 0; i < lst.size(); i++) {
- if (lst[i] == target) {
- return i;
- }
- }
- return -1;
- }
-
- int main() {
- std::vector lst = {1, 3, 5, 7, 9};
- int target = 5;
- std::cout << "Index: " << linear_search(lst, target) << std::endl;
- return 0;
- }
- ```
-
-
-
-
- ```java
- public class LinearSearch {
- public static int linearSearch(int[] lst, int target) {
- for (int i = 0; i < lst.length; i++) {
- if (lst[i] == target) {
- return i;
- }
- }
- return -1;
- }
-
- public static void main(String[] args) {
- int[] lst = {1, 3, 5, 7, 9};
- int target = 5;
- System.out.println("Index: " + linearSearch(lst, target));
- }
- }
- ```
-
-
-
-
- ```javascript
- function linearSearch(lst, target) {
- for (let i = 0; i < lst.length; i++) {
- if (lst[i] === target) {
- return i;
- }
- }
- return -1;
- }
-
- const lst = [1, 3, 5, 7, 9];
- const target = 5;
- console.log("Index:", linearSearch(lst, target));
- ```
-
-
-
-## Complexity Analysis
-
-- **Time Complexity**: $O(n)$, where $n$ is the number of elements in the list. In the worst case, it will search through the entire list.
-- **Space Complexity**: $O(1)$, as no extra space is required apart from the input list.
-
-## Advantages and Disadvantages
-
-**Advantages:**
-- Simple and easy to implement.
-- Does not require the list to be sorted.
-
-**Disadvantages:**
-- Inefficient for large lists as it has a linear time complexity.
-- Better alternatives exist for sorted lists or when multiple searches are required.
-
-## References
-
-- **GFG Problem:** [GFG Problem](https://www.geeksforgeeks.org/linear-search/)
-- **HackerRank Problem:** [HackerRank](https://www.hackerrank.com/challenges/linear-search/problem)
-- **Author's Geeks for Geeks Profile:** [MuraliDharan](https://www.geeksforgeeks.org/user/ngmuraqrdd/)
\ No newline at end of file
diff --git a/dsa-solutions/Searching-Algorithms/02-Binary-Search.md b/dsa-solutions/Searching-Algorithms/02-Binary-Search.md
deleted file mode 100644
index 2bcd9dab0..000000000
--- a/dsa-solutions/Searching-Algorithms/02-Binary-Search.md
+++ /dev/null
@@ -1,200 +0,0 @@
----
-id: Binary-Search
-title: Binary Search (Geeks for Geeks)
-sidebar_label: Binary Search
-tags:
- - Beginner
- - Search Algorithms
- - Geeks for Geeks
- - CPP
- - Python
- - Java
- - JavaScript
- - DSA
-description: "This is a solution to the Binary Search problem on Geeks for Geeks."
----
-
-## What is Binary Search?
-
-Binary Search is a highly efficient search algorithm used to find the position of a target element within a sorted list. It works by repeatedly dividing the search interval in half and comparing the target value to the middle element of the interval.
-
-## Algorithm for Binary Search
-
-1. Start with the left pointer at the beginning of the list and the right pointer at the end.
-2. Calculate the middle index of the current search interval.
-3. Compare the target value with the middle element:
- - If the target value equals the middle element, return the middle index.
- - If the target value is less than the middle element, move the right pointer to $middle - 1$.
- - If the target value is greater than the middle element, move the left pointer to $middle + 1$.
-4. Repeat steps 2-3 until the left pointer exceeds the right pointer.
-5. If the target value is not found, return -1.
-
-## How does Binary Search work?
-
-- It starts by comparing the target value to the middle element of the list.
-- If the target value matches the middle element, the search is complete.
-- If the target value is less than the middle element, the search continues in the left half of the list.
-- If the target value is greater than the middle element, the search continues in the right half of the list.
-- This process continues until the target value is found or the search interval is empty.
-
-
-
-## Problem Description
-
-Given a sorted list and a target element, implement the Binary Search algorithm to find the index of the target element in the list. If the element is not present, return -1.
-
-## Examples
-
-**Example 1:**
-```
-Input:
-list = [1, 3, 5, 7, 9]
-target = 5
-Output: 2
-```
-
-**Example 2:**
-```
-Input:
-list = [2, 4, 6, 8, 10]
-target = 7
-Output: -1
-```
-
-## Your Task:
-
-You dont need to read input or print anything. Complete the function binarysearch() which takes arr[], N and K as input parameters and returns the index of K in the array. If K is not present in the array, return -1.
-
-
-Expected Time Complexity: $O(LogN)$
-Expected Auxiliary Space: $O(LogN)$ if solving recursively and O(1) otherwise.
-
-## Constraints
-
-- $1 <= N <= 10^5$
-- $1 <= arr[i] <= 10^6$
-- $1 <= K <= 10^6$
-
-## Implementation
-
-
-
-
- ```python
- def binary_search(lst, target):
- left, right = 0, len(lst) - 1
- while left <= right:
- mid = left + (right - left) // 2
- if lst[mid] == target:
- return mid
- elif lst[mid] < target:
- left = mid + 1
- else:
- right = mid - 1
- return -1
- ```
-
-
-
-
- ```cpp
- #include
- #include
-
- int binary_search(const std::vector& lst, int target) {
- int left = 0, right = lst.size() - 1;
- while (left <= right) {
- int mid = left + (right - left) / 2;
- if (lst[mid] == target) {
- return mid;
- } else if (lst[mid] < target) {
- left = mid + 1;
- } else {
- right = mid - 1;
- }
- }
- return -1;
- }
-
- int main() {
- std::vector lst = {1, 3, 5, 7, 9};
- int target = 5;
- std::cout << "Index: " << binary_search(lst, target) << std::endl;
- return 0;
- }
- ```
-
-
-
-
- ```java
- public class BinarySearch {
- public static int binarySearch(int[] lst, int target) {
- int left = 0, right = lst.length - 1;
- while (left <= right) {
- int mid = left + (right - left) / 2;
- if (lst[mid] == target) {
- return mid;
- } else if (lst[mid] < target) {
- left = mid + 1;
- } else {
- right = mid - 1;
- }
- }
- return -1;
- }
-
- public static void main(String[] args) {
- int[] lst = {1, 3, 5, 7, 9};
- int target = 5;
- System.out.println("Index: " + binarySearch(lst, target));
- }
- }
- ```
-
-
-
-
- ```javascript
- function binarySearch(lst, target) {
- let left = 0, right = lst.length - 1;
- while (left <= right) {
- const mid = left + Math.floor((right - left) / 2);
- if (lst[mid] === target) {
- return mid;
- } else if (lst[mid] < target) {
- left = mid + 1;
- } else {
- right = mid - 1;
- }
- }
- return -1;
- }
-
- const lst = [1, 3, 5, 7, 9];
- const target = 5;
- console.log("Index:", binarySearch(lst, target));
- ```
-
-
-
-## Complexity Analysis
-
-- **Time Complexity**: $O(log n)$, where $n$ is the number of elements in the list. The list is divided in half at each step, leading to logarithmic time complexity.
-- **Space Complexity**: $O(1)$, as no extra space is required apart from the input list.
-
-## Advantages and Disadvantages
-
-**Advantages:**
-- Highly efficient for large sorted lists.
-- Fast search time due to logarithmic time complexity.
-
-**Disadvantages:**
-- Requires the list to be sorted.
-- Less efficient for small lists compared to linear search.
-
-## References
-
-- **GFG Problem:** [GFG Problem](https://www.geeksforgeeks.org/binary-search/)
-- **HackerRank Problem:** [HackerRank](https://www.hackerrank.com/challenges/binary-search/problem)
-- **Author's Geeks for Geeks Profile:** [MuraliDharan](https://www.geeksforgeeks.org/user/ngmuraqrdd/)
\ No newline at end of file
diff --git a/dsa-solutions/Searching-Algorithms/03-Breadth-First-Search (BFS).md b/dsa-solutions/Searching-Algorithms/03-Breadth-First-Search (BFS).md
deleted file mode 100644
index 644b2f10e..000000000
--- a/dsa-solutions/Searching-Algorithms/03-Breadth-First-Search (BFS).md
+++ /dev/null
@@ -1,249 +0,0 @@
----
-id: Breadth-First-Search-BFS
-title: Breadth First Search (BFS) (Geeks for Geeks)
-sidebar_label: Breadth First Search (BFS)
-tags:
- - Beginner
- - Graph Algorithms
- - Geeks for Geeks
- - CPP
- - Python
- - Java
- - JavaScript
- - DSA
-description: "This is a solution to the Breadth First Search (BFS) problem on Geeks for Geeks."
----
-
-## 1. What is Breadth First Search (BFS)?
-
-Breadth First Search (BFS) is an algorithm for traversing or searching tree or graph data structures. It starts at the tree's root (or an arbitrary node in the graph) and explores the neighbor nodes at the present depth prior to moving on to nodes at the next depth level.
-
-## 2. Algorithm for Breadth First Search (BFS)
-
-1. Initialize a queue and enqueue the starting node.
-2. Mark the starting node as visited.
-3. While the queue is not empty:
- - Dequeue a node from the queue.
- - Process the dequeued node (e.g., print its value).
- - Enqueue all unvisited adjacent nodes of the dequeued node.
- - Mark the newly enqueued nodes as visited.
-
-## 3. How does Breadth First Search (BFS) work?
-
-- BFS explores all nodes at the present depth level before moving on to nodes at the next depth level.
-- It uses a queue data structure to keep track of nodes to be explored.
-- Nodes are marked as visited to prevent reprocessing.
-
-## 4. Problem Description
-
-Given a graph represented as an adjacency list, implement the Breadth First Search (BFS) algorithm to traverse the graph starting from a given source node.
-
-## 5. Examples
-
-**Example 1:**
-```
-Input:
-graph = {
- 0: [1, 2],
- 1: [2],
- 2: [0, 3],
- 3: [3]
-}
-start_node = 2
-Output: 2 0 3 1
-```
-
-**Example 2:**
-```
-Input:
-graph = {
- 0: [1, 3],
- 1: [0, 2],
- 2: [1, 3],
- 3: [0, 2]
-}
-start_node = 0
-Output: 0 1 3 2
-```
-
-## 6. Constraints
-
-- $The graph can have any number of nodes.$
-- $The graph can be directed or undirected.$
-
-## 7. Implementation
-
-
-
-
- ```python
- from collections import deque
-
- def bfs(graph, start_node):
- visited = set()
- queue = deque([start_node])
- result = []
-
- while queue:
- node = queue.popleft()
- if node not in visited:
- visited.add(node)
- result.append(node)
- queue.extend(neighbor for neighbor in graph[node] if neighbor not in visited)
- return result
-
- # Example usage:
- graph = {
- 0: [1, 2],
- 1: [2],
- 2: [0, 3],
- 3: [3]
- }
- start_node = 2
- print(bfs(graph, start_node))
- ```
-
-
-
-
- ```cpp
- #include
- #include
- #include
- #include
-
- std::vector bfs(const std::vector>& graph, int start_node) {
- std::vector result;
- std::queue queue;
- std::unordered_set visited;
-
- queue.push(start_node);
- visited.insert(start_node);
-
- while (!queue.empty()) {
- int node = queue.front();
- queue.pop();
- result.push_back(node);
-
- for (int neighbor : graph[node]) {
- if (visited.find(neighbor) == visited.end()) {
- queue.push(neighbor);
- visited.insert(neighbor);
- }
- }
- }
- return result;
- }
-
- int main() {
- std::vector> graph = {
- {1, 2},
- {2},
- {0, 3},
- {3}
- };
- int start_node = 2;
- std::vector traversal = bfs(graph, start_node);
-
- for (int node : traversal) {
- std::cout << node << " ";
- }
- return 0;
- }
- ```
-
-
-
-
- ```java
- import java.util.*;
-
- public class BFS {
- public static List bfs(Map> graph, int startNode) {
- List result = new ArrayList<>();
- Queue queue = new LinkedList<>();
- Set visited = new HashSet<>();
-
- queue.add(startNode);
- visited.add(startNode);
-
- while (!queue.isEmpty()) {
- int node = queue.poll();
- result.add(node);
-
- for (int neighbor : graph.get(node)) {
- if (!visited.contains(neighbor)) {
- queue.add(neighbor);
- visited.add(neighbor);
- }
- }
- }
- return result;
- }
-
- public static void main(String[] args) {
- Map> graph = new HashMap<>();
- graph.put(0, Arrays.asList(1, 2));
- graph.put(1, Arrays.asList(2));
- graph.put(2, Arrays.asList(0, 3));
- graph.put(3, Arrays.asList(3));
-
- int startNode = 2;
- List traversal = bfs(graph, startNode);
- System.out.println(traversal);
- }
- }
- ```
-
-
-
-
- ```javascript
- function bfs(graph, startNode) {
- const visited = new Set();
- const queue = [startNode];
- const result = [];
-
- while (queue.length > 0) {
- const node = queue.shift();
- if (!visited.has(node)) {
- visited.add(node);
- result.push(node);
- queue.push(...graph[node].filter(neighbor => !visited.has(neighbor)));
- }
- }
- return result;
- }
-
- const graph = {
- 0: [1, 2],
- 1: [2],
- 2: [0, 3],
- 3: [3]
- };
- const startNode = 2;
- console.log(bfs(graph, startNode));
- ```
-
-
-
-## 8. Complexity Analysis
-
-- **Time Complexity**: $O(V + E)$, where $V$ is the number of vertices and $E$ is the number of edges. Each vertex and edge is processed once.
-- **Space Complexity**: $O(V)$, where $V$ is the number of vertices. This is for the queue and the visited set.
-
-## 9. Advantages and Disadvantages
-
-**Advantages:**
-- Finds the shortest path in unweighted graphs.
-- Simple and easy to understand and implement.
-
-**Disadvantages:**
-- Can be memory intensive as it stores all vertices in the queue.
-
-## 10. References
-
-- **GFG Problem:** [GFG Problem](https://www.geeksforgeeks.org/breadth-first-search-or-bfs-for-a-graph/)
-- **HackerRank Problem:** [HackerRank](https://www.hackerrank.com/challenges/breadth-first-search/problem)
-- **Author's Geeks for Geeks Profile:** [MuraliDharan](https://www.geeksforgeeks.org/user/ngmuraqrdd/)
-
diff --git a/dsa-solutions/Searching-Algorithms/04-Depth-First-Search (DFS).md b/dsa-solutions/Searching-Algorithms/04-Depth-First-Search (DFS).md
deleted file mode 100644
index 1a42a7e96..000000000
--- a/dsa-solutions/Searching-Algorithms/04-Depth-First-Search (DFS).md
+++ /dev/null
@@ -1,220 +0,0 @@
----
-id: Depth-First-Search-DFS
-title: Depth First Search (DFS) (Geeks for Geeks)
-sidebar_label: Depth First Search (DFS)
-tags:
- - Beginner
- - Graph Algorithms
- - Geeks for Geeks
- - CPP
- - Python
- - Java
- - JavaScript
- - DSA
-description: "This is a solution to the Depth First Search (DFS) problem on Geeks for Geeks."
----
-
-## 1. What is Depth First Search (DFS)?
-
-Depth First Search (DFS) is an algorithm for traversing or searching tree or graph data structures. It starts at the root (or an arbitrary node in the graph) and explores as far as possible along each branch before backtracking.
-
-## 2. Algorithm for Depth First Search (DFS)
-
-1. Start with the root node (or an arbitrary node in the graph).
-2. Mark the node as visited.
-3. For each adjacent node, recursively apply the DFS algorithm if the node has not been visited.
-
-## 3. How does Depth First Search (DFS) work?
-
-- DFS explores as far as possible along each branch before backtracking.
-- It uses a stack data structure, either implicitly through recursion or explicitly through an iterative approach.
-- Nodes are marked as visited to prevent reprocessing.
-
-## 4. Problem Description
-
-Given a graph represented as an adjacency list, implement the Depth First Search (DFS) algorithm to traverse the graph starting from a given source node.
-
-## 5. Examples
-
-**Example 1:**
-```
-Input:
-graph = {
- 0: [1, 2],
- 1: [2],
- 2: [0, 3],
- 3: [3]
-}
-start_node = 2
-Output: 2 0 1 3
-```
-
-**Example 2:**
-```
-Input:
-graph = {
- 0: [1, 3],
- 1: [0, 2],
- 2: [1, 3],
- 3: [0, 2]
-}
-start_node = 0
-Output: 0 1 2 3
-```
-
-## 6. Constraints
-
-- $The graph can have any number of nodes.$
-- $The graph can be directed or undirected.$
-
-## 7. Implementation
-
-
-
-
- ```python
- def dfs(graph, start_node, visited=None):
- if visited is None:
- visited = set()
- visited.add(start_node)
- result = [start_node]
- for neighbor in graph[start_node]:
- if neighbor not in visited:
- result.extend(dfs(graph, neighbor, visited))
- return result
-
- # Example usage:
- graph = {
- 0: [1, 2],
- 1: [2],
- 2: [0, 3],
- 3: [3]
- }
- start_node = 2
- print(dfs(graph, start_node))
- ```
-
-
-
-
- ```cpp
- #include
- #include
- #include
-
- void dfsUtil(int node, const std::vector>& graph, std::unordered_set& visited, std::vector& result) {
- visited.insert(node);
- result.push_back(node);
- for (int neighbor : graph[node]) {
- if (visited.find(neighbor) == visited.end()) {
- dfsUtil(neighbor, graph, visited, result);
- }
- }
- }
-
- std::vector dfs(const std::vector>& graph, int start_node) {
- std::unordered_set visited;
- std::vector result;
- dfsUtil(start_node, graph, visited, result);
- return result;
- }
-
- int main() {
- std::vector> graph = {
- {1, 2},
- {2},
- {0, 3},
- {3}
- };
- int start_node = 2;
- std::vector traversal = dfs(graph, start_node);
-
- for (int node : traversal) {
- std::cout << node << " ";
- }
- return 0;
- }
- ```
-
-
-
-
- ```java
- import java.util.*;
-
- public class DFS {
- public static List dfs(Map> graph, int startNode, Set visited) {
- List result = new ArrayList<>();
- visited.add(startNode);
- result.add(startNode);
-
- for (int neighbor : graph.get(startNode)) {
- if (!visited.contains(neighbor)) {
- result.addAll(dfs(graph, neighbor, visited));
- }
- }
- return result;
- }
-
- public static void main(String[] args) {
- Map> graph = new HashMap<>();
- graph.put(0, Arrays.asList(1, 2));
- graph.put(1, Arrays.asList(2));
- graph.put(2, Arrays.asList(0, 3));
- graph.put(3, Arrays.asList(3));
-
- int startNode = 2;
- Set visited = new HashSet<>();
- List traversal = dfs(graph, startNode, visited);
- System.out.println(traversal);
- }
- }
- ```
-
-
-
-
- ```javascript
- function dfs(graph, startNode, visited = new Set()) {
- visited.add(startNode);
- const result = [startNode];
- for (const neighbor of graph[startNode]) {
- if (!visited.has(neighbor)) {
- result.push(...dfs(graph, neighbor, visited));
- }
- }
- return result;
- }
-
- const graph = {
- 0: [1, 2],
- 1: [2],
- 2: [0, 3],
- 3: [3]
- };
- const startNode = 2;
- console.log(dfs(graph, startNode));
- ```
-
-
-
-## 8. Complexity Analysis
-
-- **Time Complexity**: $O(V + E)$, where $V$ is the number of vertices and $E$ is the number of edges. Each vertex and edge is processed once.
-- **Space Complexity**: $O(V)$, where $V$ is the number of vertices. This is for the visited set and the recursive stack space.
-
-## 9. Advantages and Disadvantages
-
-**Advantages:**
-- Can be easily implemented with recursion.
-- Useful for problems that involve exploring all paths, like puzzles and mazes.
-
-**Disadvantages:**
-- Can be memory intensive due to the stack space in recursion.
-- Not optimal for finding the shortest path in unweighted graphs.
-
-## 10. References
-
-- **GFG Problem:** [GFG Problem](https://www.geeksforgeeks.org/depth-first-search-or-dfs-for-a-graph/)
-- **HackerRank Problem:** [HackerRank](https://www.hackerrank.com/challenges/depth-first-search/problem)
-- **Author's Geeks for Geeks Profile:** [MuraliDharan](https://www.geeksforgeeks.org/user/ngmuraqrdd/)
diff --git a/dsa-solutions/Searching-Algorithms/05-AVL-Tree-Search.md b/dsa-solutions/Searching-Algorithms/05-AVL-Tree-Search.md
deleted file mode 100644
index 08781c397..000000000
--- a/dsa-solutions/Searching-Algorithms/05-AVL-Tree-Search.md
+++ /dev/null
@@ -1,195 +0,0 @@
----
-id: avl-tree-search
-title: AVL Tree Search (Geeks for Geeks)
-sidebar_label: AVL Tree Search
-tags:
- - Beginner
- - Search Algorithms
- - Geeks for Geeks
- - CPP
- - Python
- - Java
- - JavaScript
- - DSA
-description: "This is a solution to the AVL Tree Search problem on Geeks for Geeks."
----
-
-## What is AVL Tree Search?
-
-AVL Tree Search is a search operation performed on an AVL tree, a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by no more than one, ensuring O(log N) time complexity for search operations.
-
-## Algorithm for AVL Tree Search
-
-1. Start at the root node of the AVL tree.
-2. Compare the target value with the value of the current node:
-- If the target value equals the current node's value, return the node.
-- If the target value is less than the current node's value, move to the left child.
-- If the target value is greater than the current node's value, move to the right child.
-3. Repeat step 2 until the target value is found or the current node becomes null.
-4. If the target value is not found, return null.
-
-## How does AVL Tree Search work?
-
-- It begins by comparing the target value to the value of the root node.
-- If the target value matches the root node's value, the search is complete.
-- If the target value is less than the root node's value, the search continues in the left subtree.
-- If the target value is greater than the root node's value, the search continues in the right subtree.
-- This process continues until the target value is found or a leaf node is reached without finding the target value.
-
-
-
-## Problem Description
-
-Given an AVL tree and a target element, implement the AVL Tree Search algorithm to find the node containing the target value in the tree. If the element is not present, return null.
-
-## Examples
-
-**Example 1:**
-```
-Input:
-AVL Tree:
- 9
- / \
- 5 12
- / \ \
- 2 7 15
-
-Target: 7
-Output: Node with value 7
-
-```
-
-## Your Task:
-
-You don't need to read input or print anything. Complete the function avlTreeSearch() which takes the root of the AVL tree and a target value as input parameters and returns the node containing the target value. If the target value is not present in the tree, return null.
-
-Expected Time Complexity: $O(LogN)$
-Expected Auxiliary Space: $O(1)$
-
-## Constraints
-
-- $1 <= Number of nodes <= 10^5$
-- $1 <= Node value <= 10^6$
-- $1 <= Target value <= 10^6$
-
-## Implementation
-
-
-
-
-
- ```cpp
- #include
-
-struct AVLNode {
- int value;
- AVLNode* left;
- AVLNode* right;
- AVLNode(int val) : value(val), left(nullptr), right(nullptr) {}
-};
-
-AVLNode* avlTreeSearch(AVLNode* root, int target) {
- AVLNode* current = root;
- while (current) {
- if (current->value == target) {
- return current;
- } else if (current->value < target) {
- current = current->right;
- } else {
- current = current->left;
- }
- }
- return nullptr;
-}
-
-int main() {
- AVLNode* root = new AVLNode(9);
- root->left = new AVLNode(5);
- root->right = new AVLNode(12);
- root->left->left = new AVLNode(2);
- root->left->right = new AVLNode(7);
- root->right->right = new AVLNode(15);
-
- int target = 7;
- AVLNode* result = avlTreeSearch(root, target);
- if (result) {
- std::cout << "Node with value " << result->value << " found." << std::endl;
- } else {
- std::cout << "Node not found." << std::endl;
- }
-
- return 0;
-}
-
-
-
-
-
- ```java
- class AVLNode {
- int value;
- AVLNode left, right;
- AVLNode(int value) {
- this.value = value;
- left = right = null;
- }
-}
-
-public class AVLTreeSearch {
- public static AVLNode avlTreeSearch(AVLNode root, int target) {
- AVLNode current = root;
- while (current != null) {
- if (current.value == target) {
- return current;
- } else if (current.value < target) {
- current = current.right;
- } else {
- current = current.left;
- }
- }
- return null;
- }
-
- public static void main(String[] args) {
- AVLNode root = new AVLNode(9);
- root.left = new AVLNode(5);
- root.right = new AVLNode(12);
- root.left.left = new AVLNode(2);
- root.left.right = new AVLNode(7);
- root.right.right = new AVLNode(15);
-
- int target = 7;
- AVLNode result = avlTreeSearch(root, target);
- if (result != null) {
- System.out.println("Node with value " + result.value + " found.");
- } else {
- System.out.println("Node not found.");
- }
- }
-}
-
- ```
-
-
-
-## Complexity Analysis
-
-- **Time Complexity**:$O(log n)$, where $n$ is the number of nodes in the AVL tree. The height of the tree is kept balanced, leading to logarithmic time complexity.
-- **Space Complexity**: $O(1)$, as no extra space is required apart from the input tree.
-
-## Advantages and Disadvantages
-
-**Advantages:**
-- Ensures balanced tree structure for efficient search, insert, and delete operations.
-- Fast search time due to logarithmic time complexity.
-
-**Disadvantages:**
-- Requires additional rotations to maintain balance during insert and delete operations.
-- More complex to implement compared to simple binary search trees.
-
-
-## References
-
-- **GFG Problem:** [GFG Problem](https://www.geeksforgeeks.org/practice-questions-height-balancedavl-tree//)
-- **Author's Geeks for Geeks Profile:** [MuraliDharan](https://www.geeksforgeeks.org/user/ngmuraqrdd/)
-
diff --git a/dsa-solutions/Searching-Algorithms/Adaptive-Search.md b/dsa-solutions/Searching-Algorithms/Adaptive-Search.md
deleted file mode 100644
index fa5ed024c..000000000
--- a/dsa-solutions/Searching-Algorithms/Adaptive-Search.md
+++ /dev/null
@@ -1,227 +0,0 @@
----
-id: Adaptive-Segment-Search
-title: Adaptive Segment Search Algorithm (Geeks for Geeks)
-sidebar_label: Adaptive Segment Search
-tags:
- - Advanced
- - Search Algorithms
- - Geeks for Geeks
- - CPP
- - Python
- - Java
- - JavaScript
- - DSA
-description: "This is a solution to the Adaptive Segment Search algorithm problem."
----
-
-## What is Adaptive Segment Search?
-
-Adaptive Segment Search is a sophisticated search algorithm designed to efficiently locate an element in a sorted array. It adapts its search strategy based on the distribution of the elements, making it more efficient than traditional search algorithms in certain scenarios.
-
-## Algorithm for Adaptive Segment Search
-
-1. **Initialization:**
- - Divide the array into segments of varying sizes based on the distribution of the elements.
- - Start with the first segment.
-
-2. **Segment Search:**
- - Check if the target element falls within the current segment.
- - If it does, perform a linear or binary search within the segment.
- - If not, move to the next segment and repeat the process.
-
-3. **Adaptation:**
- - Adjust the segment sizes dynamically based on the distribution of the elements encountered during the search.
-
-4. **Termination:**
- - If the target element is found, return its index.
- - If the end of the array is reached without finding the target, return -1.
-
-## How does Adaptive Segment Search work?
-
-- The algorithm starts by dividing the array into segments.
-- It then adapts its search strategy based on the segments and the distribution of elements within the segments.
-- By adjusting the segment sizes dynamically, the algorithm can achieve better performance compared to static segment sizes.
-
-## Problem Description
-
-Given a sorted list and a target element, implement the Adaptive Segment Search algorithm to find the index of the target element in the list. If the element is not present, return -1.
-
-## Examples
-
-**Example 1:**
-Input:
-list = [3, 6, 8, 12, 14, 17, 19, 23, 25, 29]
-target = 17
-Output: 5
-
-**Example 2:**
-Input:
-list = [3, 6, 8, 12, 14, 17, 19, 23, 25, 29]
-target = 10
-Output: -1
-
-## Your Task:
-
-You don't need to read input or print anything. Complete the function adaptive_segment_search() which takes arr[], N and K as input parameters and returns the index of K in the array. If K is not present in the array, return -1.
-
-Expected Time Complexity: $O(\log n)$ in the best case
-Expected Auxiliary Space: $O(1)$
-
-## Constraints
-
-- $1 <= N <= 10^5$
-- $1 <= arr[i] <= 10^6$
-- $1 <= K <= 10^6$
-
-## Implementation
-
-
-
-
-```python
-
-def adaptive_segment_search(arr, n, x):
- segment_size = 1
- while segment_size < n:
- segment_size *= 2
-
- start = 0
- while start < n:
- end = min(start + segment_size, n)
- if arr[end - 1] >= x:
- for i in range(start, end):
- if arr[i] == x:
- return i
- return -1
- start = end
- return -1
-```
-
-
-
-
-```cpp
-
-#include
-#include
-
-int adaptive_segment_search(const std::vector& arr, int n, int x) {
- int segment_size = 1;
- while (segment_size < n) {
- segment_size *= 2;
- }
-
- int start = 0;
- while (start < n) {
- int end = std::min(start + segment_size, n);
- if (arr[end - 1] >= x) {
- for (int i = start; i < end; ++i) {
- if (arr[i] == x) {
- return i;
- }
- }
- return -1;
- }
- start = end;
- }
- return -1;
-}
-
-int main() {
- std::vector arr = {3, 6, 8, 12, 14, 17, 19, 23, 25, 29};
- int target = 17;
- std::cout << "Index: " << adaptive_segment_search(arr, arr.size(), target) << std::endl;
- return 0;
-}
-```
-
-
-
-
-```java
-
-public class AdaptiveSegmentSearch {
- public static int adaptiveSegmentSearch(int[] arr, int n, int x) {
- int segment_size = 1;
- while (segment_size < n) {
- segment_size *= 2;
- }
-
- int start = 0;
- while (start < n) {
- int end = Math.min(start + segment_size, n);
- if (arr[end - 1] >= x) {
- for (int i = start; i < end; i++) {
- if (arr[i] == x) {
- return i;
- }
- }
- return -1;
- }
- start = end;
- }
- return -1;
- }
-
- public static void main(String[] args) {
- int[] arr = {3, 6, 8, 12, 14, 17, 19, 23, 25, 29};
- int target = 17;
- System.out.println("Index: " + adaptiveSegmentSearch(arr, arr.length, target));
- }
-}
-```
-
-
-
-
-```javascript
-
-function adaptiveSegmentSearch(arr, n, x) {
- let segment_size = 1;
- while (segment_size < n) {
- segment_size *= 2;
- }
-
- let start = 0;
- while (start < n) {
- let end = Math.min(start + segment_size, n);
- if (arr[end - 1] >= x) {
- for (let i = start; i < end; i++) {
- if (arr[i] === x) {
- return i;
- }
- }
- return -1;
- }
- start = end;
- }
- return -1;
-}
-
-const arr = [3, 6, 8, 12, 14, 17, 19, 23, 25, 29];
-const target = 17;
-console.log("Index:", adaptiveSegmentSearch(arr, arr.length, target));
-
-```
-
-
-
-
-# Complexity Analysis
-## Time Complexity:
-$O(\log n)$ in the best case, where $n$ is the number of elements in the list.
-
-## Space Complexity:
-$O(1)$, as no extra space is required apart from the input list.
-
-# Advantages and Disadvantages
-## Advantages:
-
-Adapts to the distribution of elements in the array.
-
-Can achieve better performance than traditional search algorithms for certain data distributions.
-
-## Disadvantages:
-
-Requires the list to be sorted.
-Complexity may vary based on the distribution of the elements.
diff --git a/dsa-solutions/Searching-Algorithms/Backward-Search.md b/dsa-solutions/Searching-Algorithms/Backward-Search.md
deleted file mode 100644
index 0c968e2d8..000000000
--- a/dsa-solutions/Searching-Algorithms/Backward-Search.md
+++ /dev/null
@@ -1,146 +0,0 @@
----
-id: Backward-Search-Algorithm
-title: Backward Search Algorithm
-sidebar_label: Backward Search Algorithm
-tags:
- - Advanced
- - Search Algorithms
- - Text Processing
- - CPP
- - Python
- - Java
- - JavaScript
- - DSA
-description: "This is a solution to the Backward Search Algorithm problem."
----
-
-## What is the Backward Search Algorithm?
-
-The Backward Search Algorithm is a search method typically used in text processing and pattern matching. It works by searching for a pattern in a text from right to left, which can be more efficient in certain contexts compared to traditional left-to-right search algorithms.
-
-## Algorithm Steps
-
-1. **Preprocessing**:
- - Construct a rightmost occurrence function that maps each character in the pattern to its rightmost position.
-
-2. **Searching**:
- - Align the pattern with the beginning of the text.
- - Compare characters from right to left.
- - If a mismatch is found, use the rightmost occurrence function to determine the next alignment.
- - If the entire pattern matches, record the position of the match.
-
-## Complexity Analysis
-
-- **Time Complexity**: The average-case time complexity is \(O(n/m)\) where \(n\) is the length of the text and \(m\) is the length of the pattern.
-- **Space Complexity**: The space complexity is \(O(k)\) where \(k\) is the size of the character set.
-
-## Example
-
-Given a pattern and a text:
-
-```
-pattern = "ABC"
-text = "AABCABCDABC"
-```
-
-
-Using the Backward Search Algorithm:
-
-- The algorithm will search the pattern "ABC" in the text "AABCABCDABC" from right to left.
-
-## Implementation
-
-
-
-
-```python
-def rightmost_occurrence_function(pattern):
- rightmost = {}
- for i in range(len(pattern)):
- rightmost[pattern[i]] = i
- return rightmost
-
-def backward_search(text, pattern):
- rightmost = rightmost_occurrence_function(pattern)
- m, n = len(pattern), len(text)
- i = m - 1
- j = m - 1
-
- while i < n:
- if text[i] == pattern[j]:
- if j == 0:
- return i
- else:
- i -= 1
- j -= 1
- else:
- lo = rightmost.get(text[i], -1)
- i += m - min(j, 1 + lo)
- j = m - 1
-
- return -1
-
-# Example usage:
-pattern = "ABC"
-text = "AABCABCDABC"
-result = backward_search(text, pattern)
-print(f"Pattern found at index: {result}")
-```
-
-
-
-
-```cpp
-
-#include
-#include
-#include
-
-std::unordered_map rightmost_occurrence_function(const std::string &pattern) {
- std::unordered_map rightmost;
- for (int i = 0; i < pattern.size(); ++i) {
- rightmost[pattern[i]] = i;
- }
- return rightmost;
-}
-
-int backward_search(const std::string &text, const std::string &pattern) {
- auto rightmost = rightmost_occurrence_function(pattern);
- int m = pattern.size();
- int n = text.size();
- int i = m - 1;
- int j = m - 1;
-
- while (i < n) {
- if (text[i] == pattern[j]) {
- if (j == 0) {
- return i;
- } else {
- --i;
- --j;
- }
- } else {
- int lo = rightmost.find(text[i]) != rightmost.end() ? rightmost[text[i]] : -1;
- i += m - std::min(j, 1 + lo);
- j = m - 1;
- }
- }
-
- return -1;
-}
-
-int main() {
- std::string pattern = "ABC";
- std::string text = "AABCABCDABC";
- int result = backward_search(text, pattern);
- std::cout << "Pattern found at index: " << result << std::endl;
- return 0;
-}
-
-```
-
-
-
-
-# Conclusion
-The Backward Search Algorithm is a powerful method for pattern matching in text processing. By searching from right to left and leveraging the rightmost occurrence function, it provides efficient searching capabilities, especially useful in specific contexts where this directionality offers advantages over traditional approaches.
diff --git a/dsa-solutions/Searching-Algorithms/Beam-Search.md b/dsa-solutions/Searching-Algorithms/Beam-Search.md
deleted file mode 100644
index a493d7c16..000000000
--- a/dsa-solutions/Searching-Algorithms/Beam-Search.md
+++ /dev/null
@@ -1,79 +0,0 @@
----
-id: beam-search
-title: Beam Search Algorithm
-sidebar_label: Beam Search
-tags:
- - Algorithms
- - Search
- - Machine Learning
- - Natural Language Processing
- - AI
-description: "Explanation and implementation of the Beam Search algorithm."
----
-
-Beam Search is a heuristic search algorithm commonly used in the context of sequence-to-sequence models in Natural Language Processing (NLP) and other AI applications. It explores multiple paths simultaneously, aiming to find the optimal sequence based on a scoring function.
-
-## Introduction
-
-Beam Search is an extension of Breadth-First Search (BFS) and Depth-First Search (DFS) algorithms, designed to handle sequences where the number of possible combinations is too large to explore exhaustively.
-
-## How Beam Search Works
-
-1. **Initialization**: Start with an initial sequence or state.
-2. **Expansion**: Generate multiple successors (or next states) from the current set of sequences.
-3. **Scoring**: Rank or score each successor based on a predefined scoring function.
-4. **Pruning**: Keep only the top-scoring successors (typically a fixed number known as the beam width).
-5. **Repeat**: Repeat steps 2-4 for each successor until a termination condition is met (e.g., reaching a maximum sequence length or finding a terminal state).
-
-## Key Concepts
-
-- **Beam Width**: The number of top candidates (sequences) to keep at each step.
-- **Scoring Function**: Determines how successors are evaluated and ranked.
-- **Termination Condition**: Criteria to stop the search, such as reaching a maximum length or achieving a desired score.
-
-## Advantages
-
-- **Efficiency**: Reduces computational cost compared to exhaustive search methods.
-- **Flexibility**: Can handle variable-length sequences and large search spaces.
-- **Parallelism**: Easily parallelizable due to independent scoring of successors.
-
-## Implementation Example
-
-### Pseudocode
-
-```python
-def beam_search(initial_state, beam_width, max_length):
- sequences = [[initial_state]]
- for _ in range(max_length):
- next_sequences = []
- for sequence in sequences:
- successors = generate_successors(sequence)
- scored_successors = score(successors)
- top_successors = select_top(scored_successors, beam_width)
- next_sequences.extend(top_successors)
- sequences = next_sequences
- return sequences
-
-# Example usage
-initial_state = "start"
-beam_width = 3
-max_length = 5
-result = beam_search(initial_state, beam_width, max_length)
-print(result)
-```
-
-### Explanation
-
-- **generate_successors**: Function to generate possible next states or sequences.
-- **score**: Function to evaluate and assign a score to each successor.
-- **select_top**: Function to select the top-ranked successors based on the beam width.
-
-## Applications
-
-- **Machine Translation**: Finding the best translation from source to target language.
-- **Text Summarization**: Generating concise summaries from lengthy documents.
-- **Speech Recognition**: Decoding spoken language into text sequences.
-
-## Conclusion
-
-Beam Search is a powerful algorithm for searching through large, complex search spaces in AI applications. By balancing exploration and exploitation, it efficiently finds near-optimal solutions for sequence-based problems.
diff --git a/dsa-solutions/Searching-Algorithms/Block-Search.md b/dsa-solutions/Searching-Algorithms/Block-Search.md
deleted file mode 100644
index 99da35505..000000000
--- a/dsa-solutions/Searching-Algorithms/Block-Search.md
+++ /dev/null
@@ -1,204 +0,0 @@
----
-id: Block-Search
-title: Block Search
-sidebar_label: Block Search
-tags:
- - Intermediate
- - Search Algorithms
- - CPP
- - Python
- - Java
- - JavaScript
- - DSA
-description: "This is a solution to the Block Search problem."
----
-
-## What is Block Search?
-
-Block Search is a search algorithm that divides the array into fixed-size blocks and performs linear searches within these blocks. It combines the principles of linear search and blocking to improve efficiency.
-
-## Algorithm for Block Search
-
-1. Divide the array into fixed-size blocks.
-2. Search for the block where the target element might be present.
-3. Perform a linear search within the identified block.
-4. If the target element is found, return its index.
-5. If the target element is not found, return -1.
-
-## How does Block Search work?
-
-- It divides the array into smaller blocks of fixed size.
-- It determines the block where the target element might be present.
-- It performs a linear search within the identified block.
-
-## Problem Description
-
-Given a list and a target element, implement the Block Search algorithm to find the index of the target element in the list. If the element is not present, return -1.
-
-## Examples
-
-**Example 1:**
-Input:
-list = [1, 3, 5, 7, 9, 11, 13, 15]
-target = 7
-Output: 3
-
-**Example 2:**
-Input:
-list = [2, 4, 6, 8, 10, 12, 14, 16]
-target = 5
-Output: -1
-
-## Your task
-
-Complete the function block_search() which takes two integers n , k and an array arr, as input parameters and returns an integer denoting the answer. Return -1 if the number is not found in the array. You don't have to print answers or take inputs.
-
-Expected Time Complexity: $O(\sqrt{n})$
-Expected Auxiliary Space: $O(1)$
-
-## Constraints
-
-- $1 <= n <= 10^6$
-- $1 <= k <= 10^6$
-- $1 <= arr[i] <= 10^9$
-
-## Implementation
-
-
-
-
-```python
-
- import math
-
- def block_search(lst, target):
- n = len(lst)
- block_size = int(math.sqrt(n))
- block_start = 0
-
- while block_start < n and lst[min(block_start + block_size, n) - 1] < target:
- block_start += block_size
-
- for i in range(block_start, min(block_start + block_size, n)):
- if lst[i] == target:
- return i
-
- return -1
-```
-
-
-
-
-```cpp
-
- #include
- #include
- #include
-
- int block_search(const std::vector& lst, int target) {
- int n = lst.size();
- int block_size = std::sqrt(n);
- int block_start = 0;
-
- while (block_start < n && lst[std::min(block_start + block_size, n) - 1] < target) {
- block_start += block_size;
- }
-
- for (int i = block_start; i < std::min(block_start + block_size, n); ++i) {
- if (lst[i] == target) {
- return i;
- }
- }
-
- return -1;
- }
-
- int main() {
- std::vector lst = {1, 3, 5, 7, 9, 11, 13, 15};
- int target = 7;
- std::cout << "Index: " << block_search(lst, target) << std::endl;
- return 0;
- }
-```
-
-
-
-
-```java
-
- public class BlockSearch {
- public static int blockSearch(int[] lst, int target) {
- int n = lst.length;
- int block_size = (int) Math.sqrt(n);
- int block_start = 0;
-
- while (block_start < n && lst[Math.min(block_start + block_size, n) - 1] < target) {
- block_start += block_size;
- }
-
- for (int i = block_start; i < Math.min(block_start + block_size, n); i++) {
- if (lst[i] == target) {
- return i;
- }
- }
-
- return -1;
- }
-
- public static void main(String[] args) {
- int[] lst = {1, 3, 5, 7, 9, 11, 13, 15};
- int target = 7;
- System.out.println("Index: " + blockSearch(lst, target));
- }
- }
-```
-
-
-
-
-```javascript
-
- function blockSearch(lst, target) {
- let n = lst.length;
- let block_size = Math.floor(Math.sqrt(n));
- let block_start = 0;
-
- while (block_start < n && lst[Math.min(block_start + block_size, n) - 1] < target) {
- block_start += block_size;
- }
-
- for (let i = block_start; i < Math.min(block_start + block_size, n); i++) {
- if (lst[i] === target) {
- return i;
- }
- }
-
- return -1;
- }
-
- const lst = [1, 3, 5, 7, 9, 11, 13, 15];
- const target = 7;
- console.log("Index:", blockSearch(lst, target));
-```
-
-
-
-## Complexity Analysis
-
-- **Time Complexity**: $O(\sqrt{n})$, where $n$ is the number of elements in the list. The list is divided into blocks, leading to a root-time complexity.
-- **Space Complexity**: $O(1)$, as no extra space is required apart from the input list.
-
-## Advantages and Disadvantages
-
-**Advantages:**
-- Efficient for large lists with fixed-size blocks.
-- Simple implementation with linear search within blocks.
-
-**Disadvantages:**
-- Less efficient compared to other search algorithms for certain cases.
-- Performance depends on the block size chosen.
-
-## References
-
-- **Geeks for Geeks:** [Block Search](https://www.geeksforgeeks.org/block-search/)
-- **HackerRank Problem:** [HackerRank](https://www.hackerrank.com/challenges/block-search/problem)
diff --git a/dsa-solutions/Searching-Algorithms/Exponential-Search.md b/dsa-solutions/Searching-Algorithms/Exponential-Search.md
deleted file mode 100644
index bb7d27f82..000000000
--- a/dsa-solutions/Searching-Algorithms/Exponential-Search.md
+++ /dev/null
@@ -1,239 +0,0 @@
----
-id: Exponential-Search
-title: Exponential Search
-sidebar_label: Exponential Search
-tags:
- - Intermediate
- - Search Algorithms
- - CPP
- - Python
- - Java
- - JavaScript
- - DSA
-description: "This is a solution to the Exponential Search problem."
----
-
-## What is Exponential Search?
-
-Exponential Search is a search algorithm for sorted arrays. It works by finding a range where the target element is likely to be and then performing a binary search within that range. This makes it more efficient than a simple binary search when the target element is expected to be close to the beginning of the array.
-
-## Algorithm for Exponential Search
-
-1. If the first element is the target, return its index.
-2. Find the range for binary search by repeated doubling. Start with the range [1].
-3. Double the range size until the target is within the range or the range exceeds the size of the list.
-4. Perform a binary search within the identified range.
-5. If the target element is found, return its index.
-6. If the target element is not found, return -1.
-
-## How does Exponential Search work?
-
-- It starts by checking if the first element is the target.
-- Then, it repeatedly doubles the range to find a suitable interval where the target element might be located.
-- Finally, it performs a binary search within the identified range.
-
-## Problem Description
-
-Given a sorted list and a target element, implement the Exponential Search algorithm to find the index of the target element in the list. If the element is not present, return -1.
-
-## Examples
-
-**Example 1:**
-Input:
-list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
-target = 6
-Output: 5
-
-
-**Example 2:**
-Input:
-list = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]
-target = 25
-Output: -1
-
-
-## Your Task:
-
-You don't need to read input or print anything. Complete the function `exponential_search()` which takes `arr[]`, `N` and `K` as input parameters and returns the index of `K` in the array. If `K` is not present in the array, return -1.
-
-Expected Time Complexity: $O(\log i)$, where $i$ is the index of the target element.
-Expected Auxiliary Space: $O(1)$
-
-## Constraints
-
-- $1 <= N <= 10^5$
-- $1 <= arr[i] <= 10^6$
-- $1 <= K <= 10^6$
-
-## Implementation
-
-
-
-
-```python
-def binary_search(arr, left, right, target):
- while left <= right:
- mid = left + (right - left) // 2
- if arr[mid] == target:
- return mid
- elif arr[mid] < target:
- left = mid + 1
- else:
- right = mid - 1
- return -1
-
-def exponential_search(arr, target):
- if arr[0] == target:
- return 0
-
- n = len(arr)
- i = 1
- while i < n and arr[i] <= target:
- i *= 2
-
- return binary_search(arr, i // 2, min(i, n - 1), target)
-```
-
-
-
-
-```cpp
-#include
-#include
-#include
-
-int binary_search(const std::vector& arr, int left, int right, int target) {
- while (left <= right) {
- int mid = left + (right - left) / 2;
- if (arr[mid] == target) {
- return mid;
- } else if (arr[mid] < target) {
- left = mid + 1;
- } else {
- right = mid - 1;
- }
- }
- return -1;
-}
-
-int exponential_search(const std::vector& arr, int target) {
- if (arr[0] == target) {
- return 0;
- }
-
- int n = arr.size();
- int i = 1;
- while (i < n && arr[i] <= target) {
- i *= 2;
- }
-
- return binary_search(arr, i / 2, std::min(i, n - 1), target);
-}
-
-int main() {
- std::vector arr = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
- int target = 6;
- std::cout << "Index: " << exponential_search(arr, target) << std::endl;
- return 0;
-}
-```
-
-
-
-
-```java
-
-import java.util.Arrays;
-
-public class ExponentialSearch {
- public static int binarySearch(int[] arr, int left, int right, int target) {
- while (left <= right) {
- int mid = left + (right - left) / 2;
- if (arr[mid] == target) {
- return mid;
- } else if (arr[mid] < target) {
- left = mid + 1;
- } else {
- right = mid - 1;
- }
- }
- return -1;
- }
-
- public static int exponentialSearch(int[] arr, int target) {
- if (arr[0] == target) {
- return 0;
- }
-
- int n = arr.length;
- int i = 1;
- while (i < n && arr[i] <= target) {
- i *= 2;
- }
-
- return binarySearch(arr, i / 2, Math.min(i, n - 1), target);
- }
-
- public static void main(String[] args) {
- int[] arr = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
- int target = 6;
- System.out.println("Index: " + exponentialSearch(arr, target));
- }
-}
-```
-
-
-
-
-```javascript
-
-function binarySearch(arr, left, right, target) {
- while (left <= right) {
- let mid = left + Math.floor((right - left) / 2);
- if (arr[mid] === target) {
- return mid;
- } else if (arr[mid] < target) {
- left = mid + 1;
- } else {
- right = mid - 1;
- }
- }
- return -1;
-}
-
-function exponentialSearch(arr, target) {
- if (arr[0] === target) {
- return 0;
- }
-
- let n = arr.length;
- let i = 1;
- while (i < n && arr[i] <= target) {
- i *= 2;
- }
-
- return binarySearch(arr, Math.floor(i / 2), Math.min(i, n - 1), target);
-}
-
-const arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
-const target = 6;
-console.log("Index:", exponentialSearch(arr, target));
-```
-
-
-
-
-# Complexity Analysis
-### Time Complexity: $O(\log i)$, where $i$ is the index of the target element. The doubling step takes logarithmic time, and the binary search within the range also takes logarithmic time.
-### Space Complexity: $O(1)$, as no extra space is required apart from the input list.
-# Advantages and Disadvantages
-## Advantages:
-
-Efficient for searching in sorted arrays, especially when the target element is close to the beginning.
-
-Combines the benefits of both linear and binary search.
-## Disadvantages:
-
-Requires the list to be sorted.
-
-Slightly more complex to implement compared to binary search alone.
diff --git a/dsa-solutions/Searching-Algorithms/Fibonacci-Search.md b/dsa-solutions/Searching-Algorithms/Fibonacci-Search.md
deleted file mode 100644
index 237dace76..000000000
--- a/dsa-solutions/Searching-Algorithms/Fibonacci-Search.md
+++ /dev/null
@@ -1,283 +0,0 @@
----
-id: Fibonacci-Search
-title: Fibonacci Search (Geeks for Geeks)
-sidebar_label: Fibonacci Search
-tags:
- - Intermediate
- - Search Algorithms
- - Geeks for Geeks
- - CPP
- - Python
- - Java
- - JavaScript
- - DSA
-description: "This is a solution to the Fibonacci Search algorithm problem."
----
-
-## What is Fibonacci Search?
-
-Fibonacci Search is an efficient search algorithm for sorted arrays. It uses Fibonacci numbers to divide the array into smaller subarrays, reducing the search space at each step. This algorithm is particularly useful when the size of the input array is large.
-
-## Algorithm for Fibonacci Search
-
-1. Find the smallest Fibonacci number greater than or equal to the length of the array.
-2. Use the Fibonacci number to divide the array into two parts.
-3. Compare the target element with the element at the division point.
-4. If the target element is equal to the element at the division point, return the index.
-5. If the target element is less than the element at the division point, repeat the process for the left subarray.
-6. If the target element is greater than the element at the division point, repeat the process for the right subarray.
-
-## How does Fibonacci Search work?
-
-- It calculates Fibonacci numbers and uses them to divide the array into smaller subarrays.
-- The search process is repeated within the appropriate subarray based on comparisons.
-- The algorithm reduces the search space at each step, making the search efficient.
-
-
-## Problem Description
-
-Given a sorted list and a target element, implement the Fibonacci Search algorithm to find the index of the target element in the list. If the element is not present, return -1.
-
-## Examples
-
-**Example 1:**
-Input:
-list = [10, 22, 35, 40, 45, 50, 80, 82, 85, 90, 100]
-target = 85
-Output: 8
-
-**Example 2:**
-Input:
-list = [10, 22, 35, 40, 45, 50, 80, 82, 85, 90, 100]
-target = 55
-Output: -1
-
-## Your Task:
-
-You don't need to read input or print anything. Complete the function fibonacci_search() which takes arr[], N and K as input parameters and returns the index of K in the array. If K is not present in the array, return -1.
-
-Expected Time Complexity: $O(\log N)$
-Expected Auxiliary Space: $O(1)$
-
-## Constraints
-
-- $1 <= N <= 10^5$
-- $1 <= arr[i] <= 10^6$
-- $1 <= K <= 10^6$
-
-## Implementation
-
-
-
-
-```python
-def fibonacci_search(arr, x):
- n = len(arr)
- fib_mm2 = 0 # (m-2)'th Fibonacci No.
- fib_mm1 = 1 # (m-1)'th Fibonacci No.
- fib_m = fib_mm1 + fib_mm2 # m'th Fibonacci
-
- while (fib_m < n):
- fib_mm2 = fib_mm1
- fib_mm1 = fib_m
- fib_m = fib_mm2 + fib_mm1
-
- offset = -1
-
- while (fib_m > 1):
- i = min(offset + fib_mm2, n - 1)
-
- if (arr[i] < x):
- fib_m = fib_mm1
- fib_mm1 = fib_mm2
- fib_mm2 = fib_m - fib_mm1
- offset = i
- elif (arr[i] > x):
- fib_m = fib_mm2
- fib_mm1 = fib_mm1 - fib_mm2
- fib_mm2 = fib_m - fib_mm1
- else:
- return i
-
- if (fib_mm1 and arr[offset + 1] == x):
- return offset + 1
-
- return -1
-```
-
-
-
-
-```cpp
-
-#include
-#include
-#include
-
-int fibonacci_search(const std::vector& arr, int x) {
- int n = arr.size();
- int fib_mm2 = 0;
- int fib_mm1 = 1;
- int fib_m = fib_mm2 + fib_mm1;
-
- while (fib_m < n) {
- fib_mm2 = fib_mm1;
- fib_mm1 = fib_m;
- fib_m = fib_mm2 + fib_mm1;
- }
-
- int offset = -1;
-
- while (fib_m > 1) {
- int i = std::min(offset + fib_mm2, n - 1);
-
- if (arr[i] < x) {
- fib_m = fib_mm1;
- fib_mm1 = fib_mm2;
- fib_mm2 = fib_m - fib_mm1;
- offset = i;
- } else if (arr[i] > x) {
- fib_m = fib_mm2;
- fib_mm1 = fib_mm1 - fib_mm2;
- fib_mm2 = fib_m - fib_mm1;
- } else {
- return i;
- }
- }
-
- if (fib_mm1 && arr[offset + 1] == x) {
- return offset + 1;
- }
-
- return -1;
-}
-
-int main() {
- std::vector arr = {10, 22, 35, 40, 45, 50, 80, 82, 85, 90, 100};
- int target = 85;
- std::cout << "Index: " << fibonacci_search(arr, target) << std::endl;
- return 0;
-}
-```
-
-
-
-
-```java
-
-public class FibonacciSearch {
- public static int fibonacciSearch(int[] arr, int x) {
- int n = arr.length;
- int fibMMm2 = 0; // (m-2)'th Fibonacci No.
- int fibMMm1 = 1; // (m-1)'th Fibonacci No.
- int fibM = fibMMm2 + fibMMm1; // m'th Fibonacci
-
- while (fibM < n) {
- fibMMm2 = fibMMm1;
- fibMMm1 = fibM;
- fibM = fibMMm2 + fibMMm1;
- }
-
- int offset = -1;
-
- while (fibM > 1) {
- int i = Math.min(offset + fibMMm2, n - 1);
-
- if (arr[i] < x) {
- fibM = fibMMm1;
- fibMMm1 = fibMMm2;
- fibMMm2 = fibM - fibMMm1;
- offset = i;
- } else if (arr[i] > x) {
- fibM = fibMMm2;
- fibMMm1 = fibMMm1 - fibMMm2;
- fibMMm2 = fibM - fibMMm1;
- } else {
- return i;
- }
- }
-
- if (fibMMm1 == 1 && arr[offset + 1] == x) {
- return offset + 1;
- }
-
- return -1;
- }
-
- public static void main(String[] args) {
- int[] arr = {10, 22, 35, 40, 45, 50, 80, 82, 85, 90, 100};
- int target = 85;
- System.out.println("Index: " + fibonacciSearch(arr, target));
- }
-}
-```
-
-
-
-
-```javascript
-
-function fibonacciSearch(arr, x) {
- let n = arr.length;
- let fibMMm2 = 0;
- let fibMMm1 = 1;
- let fibM = fibMMm2 + fibMMm1;
-
- while (fibM < n) {
- fibMMm2 = fibMMm1;
- fibMMm1 = fibM;
- fibM = fibMMm2 + fibMMm1;
- }
-
- let offset = -1;
-
- while (fibM > 1) {
- let i = Math.min(offset + fibMMm2, n - 1);
-
- if (arr[i] < x) {
- fibM = fibMMm1;
- fibMMm1 = fibMMm2;
- fibMMm2 = fibM - fibMMm1;
- offset = i;
- } else if (arr[i] > x) {
- fibM = fibMMm2;
- fibMMm1 = fibMMm1 - fibMMm2;
- fibMMm2 = fibM - fibMMm1;
- } else {
- return i;
- }
- }
-
- if (fibMMm1 && arr[offset + 1] == x) {
- return offset + 1;
- }
-
- return -1;
-}
-
-const arr = [10, 22, 35, 40, 45, 50, 80, 82, 85, 90, 100];
-const target = 85;
-console.log("Index:", fibonacciSearch(arr, target));
-
-```
-
-
-
-
-# Complexity Analysis
-## Time Complexity:
-$O(\log N)$, where $N$ is the number of elements in the list. The Fibonacci numbers are used to reduce the search space efficiently.
-## Space Complexity:
-$O(1)$, as no extra space is required apart from the input list.
-# Advantages and Disadvantages
-## Advantages:
-
-Efficient for large sorted arrays.
-
-Reduces the search space efficiently using Fibonacci numbers.
-
-## Disadvantages:
-
-Requires the list to be sorted.
-
-May not be as intuitive as other search algorithms like binary search.
diff --git a/dsa-solutions/Searching-Algorithms/Fractal-Search.md b/dsa-solutions/Searching-Algorithms/Fractal-Search.md
deleted file mode 100644
index 56130552d..000000000
--- a/dsa-solutions/Searching-Algorithms/Fractal-Search.md
+++ /dev/null
@@ -1,215 +0,0 @@
----
-id: Fractal-Search-Algorithm
-title: Fractal Search Algorithm
-sidebar_label: Fractal Search Algorithm
-tags:
- - Advanced
- - Search Algorithms
- - Fractals
- - CPP
- - Python
- - Java
- - JavaScript
- - DSA
-description: "This is a detailed explanation and implementation of the Fractal Search Algorithm."
-
----
-
-## What is the Fractal Search Algorithm?
-
-The Fractal Search Algorithm (FSA) is an advanced search algorithm inspired by the fractal nature of various processes and patterns in nature. It leverages the self-similarity and recursive properties of fractals to efficiently search through complex spaces.
-
-## Algorithm for Fractal Search
-
-1. **Initialization**: Define the search space and initialize the fractal pattern.
-2. **Recursive Division**: Recursively divide the search space into smaller subspaces following the fractal pattern.
-3. **Search Subspaces**: Evaluate the subspaces to find the target element.
-4. **Merge Results**: Combine the results from the subspaces to determine the final position of the target element.
-
-## How does Fractal Search work?
-
-- FSA divides the search space into self-similar subspaces recursively.
-- It searches each subspace individually, combining results to identify the target element.
-- This approach reduces the search space significantly, improving efficiency.
-
-
-## Problem Description
-
-Given a complex search space, implement the Fractal Search Algorithm to find the target element. If the element is not present, the algorithm should indicate that as well.
-
-## Examples
-
-**Example 1:**
-Input:
-search_space = [1, 3, 5, 7, 9]
-target = 5
-Output: 2
-
-**Example 2:**
-Input:
-search_space = [2, 4, 6, 8, 10]
-target = 7
-Output: -1
-
-## Your Task
-
-Complete the function `fractal_search()` which takes a list `search_space` and an integer `target` as input parameters and returns the index of the target element. If the element is not present, return -1.
-
-Expected Time Complexity: $O(\log n)$
-Expected Auxiliary Space: $O(n)$
-
-## Constraints
-
-- $1 <= n <= 10^6$
-- $1 <= search_space[i] <= 10^9$
-- $1 <= target <= 10^9$
-
-## Implementation
-
-```python
-import numpy as np
-
-def fractal_search(search_space, target):
- def recursive_search(subspace, depth):
- if len(subspace) == 0:
- return -1
-
- mid_index = len(subspace) // 2
- mid_value = subspace[mid_index]
-
- if mid_value == target:
- return mid_index
-
- if target < mid_value:
- return recursive_search(subspace[:mid_index], depth + 1)
- else:
- result = recursive_search(subspace[mid_index + 1:], depth + 1)
- return mid_index + 1 + result if result != -1 else -1
-
- return recursive_search(search_space, 0)
-
-# Example usage:
-search_space = [1, 3, 5, 7, 9]
-target = 5
-print(fractal_search(search_space, target)) # Output: 2
-```
-
-```cpp
-#include
-#include
-
-int fractal_search(const std::vector& search_space, int target) {
- int recursive_search(const std::vector& subspace, int depth) {
- if (subspace.empty()) {
- return -1;
- }
-
- int mid_index = subspace.size() / 2;
- int mid_value = subspace[mid_index];
-
- if (mid_value == target) {
- return mid_index;
- }
-
- if (target < mid_value) {
- return recursive_search({subspace.begin(), subspace.begin() + mid_index}, depth + 1);
- } else {
- int result = recursive_search({subspace.begin() + mid_index + 1, subspace.end()}, depth + 1);
- return result != -1 ? mid_index + 1 + result : -1;
- }
- }
-
- return recursive_search(search_space, 0);
-}
-
-// Example usage:
-int main() {
- std::vector search_space = {1, 3, 5, 7, 9};
- int target = 5;
- std::cout << fractal_search(search_space, target) << std::endl; // Output: 2
- return 0;
-}
-```
-
-```java
-import java.util.List;
-
-public class FractalSearch {
- public static int fractalSearch(List search_space, int target) {
- int recursiveSearch(List subspace, int depth) {
- if (subspace.isEmpty()) {
- return -1;
- }
-
- int midIndex = subspace.size() / 2;
- int midValue = subspace.get(midIndex);
-
- if (midValue == target) {
- return midIndex;
- }
-
- if (target < midValue) {
- return recursiveSearch(subspace.subList(0, midIndex), depth + 1);
- } else {
- int result = recursiveSearch(subspace.subList(midIndex + 1, subspace.size()), depth + 1);
- return result != -1 ? midIndex + 1 + result : -1;
- }
- }
-
- return recursiveSearch(search_space, 0);
- }
-
- public static void main(String[] args) {
- List search_space = List.of(1, 3, 5, 7, 9);
- int target = 5;
- System.out.println(fractalSearch(search_space, target)); // Output: 2
- }
-}
-```
-
-```javascript
-function fractalSearch(search_space, target) {
- function recursiveSearch(subspace, depth) {
- if (subspace.length === 0) {
- return -1;
- }
-
- const midIndex = Math.floor(subspace.length / 2);
- const midValue = subspace[midIndex];
-
- if (midValue === target) {
- return midIndex;
- }
-
- if (target < midValue) {
- return recursiveSearch(subspace.slice(0, midIndex), depth + 1);
- } else {
- const result = recursiveSearch(subspace.slice(midIndex + 1), depth + 1);
- return result !== -1 ? midIndex + 1 + result : -1;
- }
- }
-
- return recursiveSearch(search_space, 0);
-}
-
-// Example usage:
-const search_space = [1, 3, 5, 7, 9];
-const target = 5;
-console.log(fractalSearch(search_space, target)); // Output: 2
-```
-
-# Complexity Analysis
-### Time Complexity: $O(\log n)$, where $n$ is the number of elements in the search space. The recursive division reduces the search space exponentially.
-### Space Complexity: $O(n)$, due to the additional space required for recursive function calls and subspaces.
-# Advantages and Disadvantages
-## Advantages:
-
-Efficient for large and complex search spaces due to the recursive division.
-Exploits the self-similarity of fractals, making it suitable for certain types of data structures.
-## Disadvantages:
-
-More complex to implement compared to traditional search algorithms.
-Performance may vary depending on the nature of the search space and fractal pattern used.
-### References
-Wikipedia: Fractal
-Research Paper: Fractal Search Algorithm
diff --git a/dsa-solutions/Searching-Algorithms/Heuristic-Search.md b/dsa-solutions/Searching-Algorithms/Heuristic-Search.md
deleted file mode 100644
index d5a3c7417..000000000
--- a/dsa-solutions/Searching-Algorithms/Heuristic-Search.md
+++ /dev/null
@@ -1,190 +0,0 @@
----
-id: Heuristic-Search
-title: Heuristic Search
-sidebar_label: Heuristic Search
-tags:
- - Advanced
- - Search Algorithms
- - Heuristics
- - CPP
- - Python
- - Java
- - JavaScript
- - DSA
-description: "This is a solution to the Heuristic Search problem."
----
-
-## What is Heuristic Search?
-
-Heuristic Search is a search algorithm that uses heuristic functions to guide the search process. The heuristic function estimates the cost to reach the goal from a given state, allowing the algorithm to prioritize which paths to explore. This approach is commonly used in AI and optimization problems.
-
-## Algorithm Steps
-
-1. **Initialization**:
- - Define the heuristic function that estimates the cost to reach the goal.
- - Initialize the search from the starting state.
-
-2. **Search Process**:
- - Use a priority queue to manage the states to be explored, prioritizing states with lower heuristic costs.
- - At each step, expand the state with the lowest estimated cost.
- - If the goal state is reached, return the path or the solution.
-
-## Complexity Analysis
-
-- **Time Complexity**: Depends on the heuristic function. In the best case, it can be $O(\log n)$, but in the worst case, it can approach $O(n)$ where $n$ is the number of states.
-- **Space Complexity**: $O(n)$ for storing the priority queue and explored states.
-
-
-## Example
-
-Given a graph representing a map:
-
-```
-graph = {
-'A': [('B', 1), ('C', 3)],
-'B': [('D', 5)],
-'C': [('D', 2)],
-'D': []
-}
-start = 'A'
-
-goal = 'D'
-```
-
-
-
-Using Heuristic Search:
-
-- Define a heuristic function that estimates the distance from each state to the goal.
-- Use the heuristic to guide the search from the start state to the goal state.
-
-## Implementation
-
-
-
-
-```python
-import heapq
-
-def heuristic(node, goal):
- # Example heuristic: distance to goal
- heuristics = {
- 'A': 4,
- 'B': 2,
- 'C': 2,
- 'D': 0
- }
- return heuristics[node]
-
-def heuristic_search(graph, start, goal):
- priority_queue = [(0 + heuristic(start, goal), start)]
- explored = set()
-
- while priority_queue:
- cost, current = heapq.heappop(priority_queue)
- if current == goal:
- return cost
-
- if current not in explored:
- explored.add(current)
- for neighbor, weight in graph[current]:
- if neighbor not in explored:
- total_cost = cost + weight
- heapq.heappush(priority_queue, (total_cost + heuristic(neighbor, goal), neighbor))
-
- return float('inf')
-
-# Example usage:
-graph = {
- 'A': [('B', 1), ('C', 3)],
- 'B': [('D', 5)],
- 'C': [('D', 2)],
- 'D': []
-}
-start = 'A'
-goal = 'D'
-
-result = heuristic_search(graph, start, goal)
-print(f"Minimum cost from {start} to {goal}: {result}")
-```
-
-
-
-
-```cpp
-
-#include
-#include
-#include
-#include
-#include
-
-struct Node {
- std::string name;
- int cost;
- bool operator>(const Node& other) const {
- return cost > other.cost;
- }
-};
-
-int heuristic(const std::string& node, const std::string& goal) {
- std::unordered_map heuristics = {
- {"A", 4},
- {"B", 2},
- {"C", 2},
- {"D", 0}
- };
- return heuristics[node];
-}
-
-int heuristic_search(const std::unordered_map>>& graph, const std::string& start, const std::string& goal) {
- std::priority_queue, std::greater> priority_queue;
- std::unordered_set explored;
-
- priority_queue.push({start, heuristic(start, goal)});
-
- while (!priority_queue.empty()) {
- Node current = priority_queue.top();
- priority_queue.pop();
-
- if (current.name == goal) {
- return current.cost;
- }
-
- if (explored.find(current.name) == explored.end()) {
- explored.insert(current.name);
- for (const auto& neighbor : graph.at(current.name)) {
- if (explored.find(neighbor.first) == explored.end()) {
- int total_cost = current.cost + neighbor.second;
- priority_queue.push({neighbor.first, total_cost + heuristic(neighbor.first, goal)});
- }
- }
- }
- }
-
- return INT_MAX;
-}
-
-int main() {
- std::unordered_map>> graph = {
- {"A", {{"B", 1}, {"C", 3}}},
- {"B", {{"D", 5}}},
- {"C", {{"D", 2}}},
- {"D", {}}
- };
- std::string start = "A";
- std::string goal = "D";
-
- int result = heuristic_search(graph, start, goal);
- std::cout << "Minimum cost from " << start << " to " << goal << ": " << result << "\n";
-
- return 0;
-}
-
-```
-
-
-
-
-# Conclusion
-The Heuristic Search algorithm efficiently searches for a target state by leveraging heuristic functions to guide the search process. It is widely used in AI, optimization problems, and various applications where informed search strategies are beneficial.
diff --git a/dsa-solutions/Searching-Algorithms/Hierarchical-Binary-Search.md b/dsa-solutions/Searching-Algorithms/Hierarchical-Binary-Search.md
deleted file mode 100644
index 8d7b2d9cf..000000000
--- a/dsa-solutions/Searching-Algorithms/Hierarchical-Binary-Search.md
+++ /dev/null
@@ -1,161 +0,0 @@
----
-id: Hierarchical-Binary-Search
-title: Hierarchical Binary Search
-sidebar_label: Hierarchical Binary Search
-tags:
- - Advanced
- - Search Algorithms
- - CPP
- - Python
- - Java
- - JavaScript
- - DSA
-description: "This is a solution to the Hierarchical Binary Search problem."
----
-
-## What is Hierarchical Binary Search?
-
-Hierarchical Binary Search is a search algorithm designed to search for a target element in a large sorted dataset by recursively dividing the dataset into hierarchical levels and applying binary search at each level. This approach can be particularly useful for distributed databases or filesystems where data is naturally partitioned.
-
-## Algorithm Steps
-
-1. **Initialization**:
- - Start from the top level of the hierarchy.
- - Define boundaries for the current level: `left` and `right`.
-
-2. **Binary Search at Current Level**:
- - Apply binary search to the current level.
- - If the target is found, return its position.
- - If the target is less than the middle element, move to the next lower level on the left side.
- - If the target is greater than the middle element, move to the next lower level on the right side.
-
-3. **Recursive Search**:
- - Recursively apply binary search at each level of the hierarchy until the target is found or the search space is exhausted.
-
-4. **Base Case**:
- - If the search space at the current level is exhausted, return -1 indicating the target is not found.
-
-## Complexity Analysis
-
-- **Time Complexity**: $O(\log(n))$ where $n$ is the total number of elements in the dataset. This is due to the binary search applied at each hierarchical level.
-- **Space Complexity**: $O(\log(n))$ due to the recursive calls on the call stack.
-
-## Example
-
-Given a hierarchical dataset:
-
-level 0: [1, 4, 7, 10]
-level 1 (left of 1): []
-level 1 (right of 1): [2, 3]
-level 1 (left of 4): []
-level 1 (right of 4): [5, 6]
-level 1 (left of 7): []
-level 1 (right of 7): [8, 9]
-level 1 (left of 10): []
-level 1 (right of 10): [11, 12]
-
-
-Using Hierarchical Binary Search:
-
-- Start from the top level: `level 0`.
-- Apply binary search at each level, moving to the next lower level based on comparisons with the target.
-
-## Implementation
-
-
-
-
-```python
-def hierarchical_binary_search(levels, target, level=0, left=0, right=None):
- if right is None:
- right = len(levels[level]) - 1
-
- if left > right:
- return -1
-
- mid = (left + right) // 2
- if levels[level][mid] == target:
- return (level, mid)
- elif levels[level][mid] > target:
- return hierarchical_binary_search(levels, target, level + 1, left, mid - 1)
- else:
- return hierarchical_binary_search(levels, target, level + 1, mid + 1, right)
-
-# Example usage:
-levels = [
- [1, 4, 7, 10],
- [],
- [2, 3],
- [],
- [5, 6],
- [],
- [8, 9],
- [],
- [11, 12]
-]
-target = 5
-
-result = hierarchical_binary_search(levels, target)
-if result != -1:
- print(f"Target {target} found at position: {result}")
-else:
- print(f"Target {target} not found in the dataset")
-```
-
-
-
-
-```cpp
-
-#include
-#include
-#include
-
-std::pair hierarchical_binary_search(std::vector>& levels, int target, int level = 0, int left = 0, int right = -1) {
- if (right == -1) {
- right = levels[level].size() - 1;
- }
-
- if (left > right) {
- return {-1, -1};
- }
-
- int mid = (left + right) / 2;
- if (levels[level][mid] == target) {
- return {level, mid};
- } else if (levels[level][mid] > target) {
- return hierarchical_binary_search(levels, target, level + 1, left, mid - 1);
- } else {
- return hierarchical_binary_search(levels, target, level + 1, mid + 1, right);
- }
-}
-
-int main() {
- std::vector> levels = {
- {1, 4, 7, 10},
- {},
- {2, 3},
- {},
- {5, 6},
- {},
- {8, 9},
- {},
- {11, 12}
- };
- int target = 5;
-
- std::pair result = hierarchical_binary_search(levels, target);
- if (result.first != -1) {
- std::cout << "Target " << target << " found at position: (" << result.first << ", " << result.second << ")\n";
- } else {
- std::cout << "Target " << target << " not found in the dataset\n";
- }
- return 0;
-}
-```
-
-
-
-
-# Conclusion
-The Hierarchical Binary Search algorithm is a unique and efficient way to search for a target element in a large, hierarchically structured dataset. It leverages the divide-and-conquer approach of binary search across multiple levels, making it well-suited for distributed or partitioned data systems.
diff --git a/dsa-solutions/Searching-Algorithms/Hybrid-Jump-Binary-Search.md b/dsa-solutions/Searching-Algorithms/Hybrid-Jump-Binary-Search.md
deleted file mode 100644
index 029edfbe5..000000000
--- a/dsa-solutions/Searching-Algorithms/Hybrid-Jump-Binary-Search.md
+++ /dev/null
@@ -1,250 +0,0 @@
----
-id: Hybrid-Jump-Binary-Search
-title: Hybrid Jump Binary Search (Geeks for Geeks)
-sidebar_label: Hybrid Jump Binary Search
-tags:
- - Advanced
- - Search Algorithms
- - Geeks for Geeks
- - CPP
- - Python
- - Java
- - JavaScript
- - DSA
-description: "This is a solution to the Hybrid Jump Binary Search algorithm problem."
----
-
-## What is Hybrid Jump Binary Search?
-
-Hybrid Jump Binary Search is an advanced search algorithm that combines the features of Jump Search and Binary Search. It first uses a jump step to find a block where the target element might be present and then performs a binary search within that block to find the target element.
-
-## Algorithm for Hybrid Jump Binary Search
-
-1. Calculate the optimal step size $\sqrt{N}$, where $N$ is the length of the list.
-2. Start from the first element and jump ahead by the step size until the target element is greater than or equal to the current element.
-3. Once the block where the target might be located is identified, perform a binary search within that block.
-4. If the target element is found, return its index.
-5. If the target element is not found, return -1.
-
-## How does Hybrid Jump Binary Search work?
-
-- It combines jump search and binary search to efficiently locate the target element.
-- Jump search quickly narrows down the possible range of the target element.
-- Binary search is then used within the identified range to find the target element efficiently.
-
-
-## Problem Description
-
-Given a sorted list and a target element, implement the Hybrid Jump Binary Search algorithm to find the index of the target element in the list. If the element is not present, return -1.
-
-## Examples
-
-**Example 1:**
-Input:
-list = [10, 22, 35, 40, 45, 50, 80, 82, 85, 90, 100]
-target = 85
-Output: 8
-
-**Example 2:**
-Input:
-list = [10, 22, 35, 40, 45, 50, 80, 82, 85, 90, 100]
-target = 55
-Output: -1
-
-## Your Task:
-
-You don't need to read input or print anything. Complete the function hybrid_jump_binary_search() which takes arr[], N and K as input parameters and returns the index of K in the array. If K is not present in the array, return -1.
-
-Expected Time Complexity: $O(\log N)$
-Expected Auxiliary Space: $O(1)$
-
-## Constraints
-
-- $1 <= N <= 10^5$
-- $1 <= arr[i] <= 10^6$
-- $1 <= K <= 10^6$
-
-## Implementation
-
-
-
-
-```python
-
-import math
-
-def binary_search(arr, low, high, x):
- while low <= high:
- mid = low + (high - low) // 2
- if arr[mid] == x:
- return mid
- elif arr[mid] < x:
- low = mid + 1
- else:
- high = mid - 1
- return -1
-
-def hybrid_jump_binary_search(arr, x):
- n = len(arr)
- step = int(math.sqrt(n))
- prev = 0
-
- while arr[min(step, n) - 1] < x:
- prev = step
- step += int(math.sqrt(n))
- if prev >= n:
- return -1
-
- return binary_search(arr, prev, min(step, n) - 1, x)
-```
-
-
-
-
-```cpp
-
-#include
-#include
-#include
-
-int binary_search(const std::vector& arr, int low, int high, int x) {
- while (low <= high) {
- int mid = low + (high - low) / 2;
- if (arr[mid] == x) {
- return mid;
- } else if (arr[mid] < x) {
- low = mid + 1;
- } else {
- high = mid - 1;
- }
- }
- return -1;
-}
-
-int hybrid_jump_binary_search(const std::vector& arr, int x) {
- int n = arr.size();
- int step = sqrt(n);
- int prev = 0;
-
- while (arr[std::min(step, n) - 1] < x) {
- prev = step;
- step += sqrt(n);
- if (prev >= n) {
- return -1;
- }
- }
-
- return binary_search(arr, prev, std::min(step, n) - 1, x);
-}
-
-int main() {
- std::vector arr = {10, 22, 35, 40, 45, 50, 80, 82, 85, 90, 100};
- int target = 85;
- std::cout << "Index: " << hybrid_jump_binary_search(arr, target) << std::endl;
- return 0;
-}
-```
-
-
-
-
-```java
-
-public class HybridJumpBinarySearch {
- public static int binarySearch(int[] arr, int low, int high, int x) {
- while (low <= high) {
- int mid = low + (high - low) / 2;
- if (arr[mid] == x) {
- return mid;
- } else if (arr[mid] < x) {
- low = mid + 1;
- } else {
- high = mid - 1;
- }
- }
- return -1;
- }
-
- public static int hybridJumpBinarySearch(int[] arr, int x) {
- int n = arr.length;
- int step = (int) Math.sqrt(n);
- int prev = 0;
-
- while (arr[Math.min(step, n) - 1] < x) {
- prev = step;
- step += (int) Math.sqrt(n);
- if (prev >= n) {
- return -1;
- }
- }
-
- return binarySearch(arr, prev, Math.min(step, n) - 1, x);
- }
-
- public static void main(String[] args) {
- int[] arr = {10, 22, 35, 40, 45, 50, 80, 82, 85, 90, 100};
- int target = 85;
- System.out.println("Index: " + hybridJumpBinarySearch(arr, target));
- }
-}
-```
-
-
-
-
-```javascript
-
-function binarySearch(arr, low, high, x) {
- while (low <= high) {
- let mid = Math.floor(low + (high - low) / 2);
- if (arr[mid] === x) {
- return mid;
- } else if (arr[mid] < x) {
- low = mid + 1;
- } else {
- high = mid - 1;
- }
- }
- return -1;
-}
-
-function hybridJumpBinarySearch(arr, x) {
- let n = arr.length;
- let step = Math.floor(Math.sqrt(n));
- let prev = 0;
-
- while (arr[Math.min(step, n) - 1] < x) {
- prev = step;
- step += Math.floor(Math.sqrt(n));
- if (prev >= n) {
- return -1;
- }
- }
-
- return binarySearch(arr, prev, Math.min(step, n) - 1, x);
-}
-
-const arr = [10, 22, 35, 40, 45, 50, 80, 82, 85, 90, 100];
-const target = 85;
-console.log("Index:", hybridJumpBinarySearch(arr, target));
-```
-
-
-
-
-# Complexity Analysis
-## Time Complexity:
-$O(\log N)$, where $N$ is the number of elements in the list. The combination of jump search and binary search reduces the search space efficiently.
-## Space Complexity:
-$O(1)$, as no extra space is required apart from the input list.
-# Advantages and Disadvantages
-## Advantages:
-
-Efficient for large sorted arrays.
-
-Combines the advantages of both jump search and binary search.
-## Disadvantages:
-
-Requires the list to be sorted.
-
-Slightly more complex to implement compared to individual search algorithms.
diff --git a/dsa-solutions/Searching-Algorithms/Interpolation-Search.md b/dsa-solutions/Searching-Algorithms/Interpolation-Search.md
deleted file mode 100644
index 8c9a81f90..000000000
--- a/dsa-solutions/Searching-Algorithms/Interpolation-Search.md
+++ /dev/null
@@ -1,223 +0,0 @@
----
-id: Interpolation-Search
-title: Interpolation Search (Geeks for Geeks)
-sidebar_label: Interpolation Search
-tags:
- - Intermediate
- - Search Algorithms
- - Geeks for Geeks
- - CPP
- - Python
- - Java
- - JavaScript
- - DSA
-description: "This is a solution to the Interpolation Search problem."
----
-
-## What is Interpolation Search?
-
-Interpolation Search is an efficient search algorithm for uniformly distributed sorted arrays. It works by estimating the position of the target value based on the value's distribution, making it faster than linear search and in some cases more efficient than binary search.
-
-## Algorithm for Interpolation Search
-
-1. Initialize the low and high indices to 0 and N-1, respectively.
-2. While the target value is within the range defined by the current low and high indices:
- - Calculate the probe position using the formula:
- $$
- \text{pos} = \text{low} + \left( \frac{(x - \text{arr}[low]) \times (\text{high} - \text{low})}{\text{arr}[high] - \text{arr}[low]} \right)
- $$
-3. Check the value at the probe position:
- - If `arr[pos]` is equal to the target value, return `pos`.
- - If `arr[pos]` is less than the target value, update `low` to `pos + 1`.
- - If `arr[pos]` is greater than the target value, update `high` to `pos - 1`.
-4. If the target value is not found, return -1.
-
-## How does Interpolation Search work?
-
-- It calculates a probe position using a formula that considers the distribution of values within the array.
-- The probe position is used to narrow down the search range, making the search process more efficient compared to a linear search.
-
-## Problem Description
-
-Given a sorted list and a target element, implement the Interpolation Search algorithm to find the index of the target element in the list. If the element is not present, return -1.
-
-## Examples
-
-**Example 1:**
-Input:
-list = [10, 12, 13, 16, 18, 19, 20, 21, 22, 23]
-target = 18
-Output: 4
-
-
-**Example 2:**
-Input:
-list = [10, 12, 13, 16, 18, 19, 20, 21, 22, 23]
-target = 25
-Output: -1
-
-
-## Your Task:
-
-You don't need to read input or print anything. Complete the function interpolation_search() which takes arr[], N and K as input parameters and returns the index of K in the array. If K is not present in the array, return -1.
-
-Expected Time Complexity: $O(\log \log N)$
-Expected Auxiliary Space: $O(1)$
-
-## Constraints
-
-- $1 <= N <= 10^5$
-- $1 <= arr[i] <= 10^6$
-- $1 <= K <= 10^6$
-
-## Implementation
-
-
-
-
-```python
-
-def interpolation_search(arr, n, x):
- low = 0
- high = n - 1
-
- while low <= high and x >= arr[low] and x <= arr[high]:
- if low == high:
- if arr[low] == x:
- return low
- return -1
-
- pos = low + ((x - arr[low]) * (high - low) // (arr[high] - arr[low]))
-
- if arr[pos] == x:
- return pos
- if arr[pos] < x:
- low = pos + 1
- else:
- high = pos - 1
- return -1
-```
-
-
-
-```cpp
-
-#include
-#include
-
-int interpolation_search(const std::vector& arr, int n, int x) {
- int low = 0, high = n - 1;
-
- while (low <= high && x >= arr[low] && x <= arr[high]) {
- if (low == high) {
- if (arr[low] == x) return low;
- return -1;
- }
-
- int pos = low + ((x - arr[low]) * (high - low) / (arr[high] - arr[low]));
-
- if (arr[pos] == x)
- return pos;
- if (arr[pos] < x)
- low = pos + 1;
- else
- high = pos - 1;
- }
- return -1;
-}
-
-int main() {
- std::vector arr = {10, 12, 13, 16, 18, 19, 20, 21, 22, 23};
- int target = 18;
- std::cout << "Index: " << interpolation_search(arr, arr.size(), target) << std::endl;
- return 0;
-}
-```
-
-
-
-
-```java
-
-public class InterpolationSearch {
- public static int interpolationSearch(int[] arr, int n, int x) {
- int low = 0, high = n - 1;
-
- while (low <= high && x >= arr[low] && x <= arr[high]) {
- if (low == high) {
- if (arr[low] == x) return low;
- return -1;
- }
-
- int pos = low + ((x - arr[low]) * (high - low) / (arr[high] - arr[low]));
-
- if (arr[pos] == x)
- return pos;
- if (arr[pos] < x)
- low = pos + 1;
- else
- high = pos - 1;
- }
- return -1;
- }
-
- public static void main(String[] args) {
- int[] arr = {10, 12, 13, 16, 18, 19, 20, 21, 22, 23};
- int target = 18;
- System.out.println("Index: " + interpolationSearch(arr, arr.length, target));
- }
-}
-```
-
-
-
-
-```javascript
-
-function interpolationSearch(arr, n, x) {
- let low = 0, high = n - 1;
-
- while (low <= high && x >= arr[low] && x <= arr[high]) {
- if (low === high) {
- if (arr[low] === x) return low;
- return -1;
- }
-
- let pos = low + Math.floor(((x - arr[low]) * (high - low) / (arr[high] - arr[low])));
-
- if (arr[pos] === x)
- return pos;
- if (arr[pos] < x)
- low = pos + 1;
- else
- high = pos - 1;
- }
- return -1;
-}
-
-const arr = [10, 12, 13, 16, 18, 19, 20, 21, 22, 23];
-const target = 18;
-console.log("Index:", interpolationSearch(arr, arr.length, target));
-```
-
-
-
-
-# Complexity Analysis
-## Time Complexity:
-$O(\log \log n)$ for uniformly distributed data, where $n$ is the number of elements in the list.
-## Space Complexity:
-$O(1)$, as no extra space is required apart from the input list.
-
-# Advantages and Disadvantages
-## Advantages:
-
-Faster than linear search and binary search for uniformly distributed sorted lists.
-
-Efficient for large datasets.
-
-## Disadvantages:
-
-Requires the list to be sorted.
-
-Performance degrades if the distribution of elements is not uniform.
diff --git a/dsa-solutions/Searching-Algorithms/Inverted-Index-Search.md b/dsa-solutions/Searching-Algorithms/Inverted-Index-Search.md
deleted file mode 100644
index b67ceaac3..000000000
--- a/dsa-solutions/Searching-Algorithms/Inverted-Index-Search.md
+++ /dev/null
@@ -1,124 +0,0 @@
----
-id: Inverted-Index-Search
-title: Inverted Index Search
-sidebar_label: Inverted Index Search
-tags:
- - Advanced
- - Search Algorithms
- - Information Retrieval
- - CPP
- - Python
- - Java
- - JavaScript
- - DSA
-description: "This is a solution to the Inverted Index Search problem."
----
-
-## What is Inverted Index Search?
-
-Inverted Index Search is an advanced search algorithm used primarily in information retrieval systems. It involves creating an inverted index, which maps each unique element (or keyword) to the list of positions (or documents) in which it appears. This allows for efficient searches and is widely used in search engines and document retrieval systems.
-
-## Algorithm Steps
-
-1. **Inverted Index Creation**:
- - Iterate through the dataset and create a mapping of each unique element to its positions.
-
-2. **Search Using Inverted Index**:
- - Query the inverted index to quickly retrieve the positions of the target element.
-
-## Complexity Analysis
-
-- **Time Complexity**:
- - Inverted Index Creation: $O(n)$ where $n$ is the total number of elements in the dataset.
- - Search Using Inverted Index: $O(1)$ average case for retrieving the list of positions of the target element.
-
-- **Space Complexity**: $O(n)$ for storing the inverted index.
-
-## Example
-
-Given a dataset:
-
-dataset = [3, 5, 7, 3, 9, 1, 5, 7]
-target = 5
-
-
-Using Inverted Index Search:
-
-- Create an inverted index: `{3: [0, 3], 5: [1, 6], 7: [2, 7], 9: [4], 1: [5]}`
-- Search for `5` in the inverted index to retrieve positions `[1, 6]`.
-
-## Implementation
-
-
-
-
-```python
-def create_inverted_index(dataset):
- inverted_index = {}
- for idx, value in enumerate(dataset):
- if value in inverted_index:
- inverted_index[value].append(idx)
- else:
- inverted_index[value] = [idx]
- return inverted_index
-
-def inverted_index_search(inverted_index, target):
- return inverted_index.get(target, [])
-
-# Example usage:
-dataset = [3, 5, 7, 3, 9, 1, 5, 7]
-target = 5
-
-inverted_index = create_inverted_index(dataset)
-result = inverted_index_search(inverted_index, target)
-print(f"Target {target} found at positions: {result}")
-```
-
-
-
-
-```cpp
-
-#include
-#include
-#include
-
-std::unordered_map> create_inverted_index(const std::vector& dataset) {
- std::unordered_map> inverted_index;
- for (int i = 0; i < dataset.size(); ++i) {
- inverted_index[dataset[i]].push_back(i);
- }
- return inverted_index;
-}
-
-std::vector inverted_index_search(const std::unordered_map>& inverted_index, int target) {
- auto it = inverted_index.find(target);
- if (it != inverted_index.end()) {
- return it->second;
- } else {
- return {};
- }
-}
-
-int main() {
- std::vector dataset = {3, 5, 7, 3, 9, 1, 5, 7};
- int target = 5;
-
- std::unordered_map> inverted_index = create_inverted_index(dataset);
- std::vector result = inverted_index_search(inverted_index, target);
-
- std::cout << "Target " << target << " found at positions: ";
- for (int pos : result) {
- std::cout << pos << " ";
- }
- std::cout << "\n";
-
- return 0;
-}
-```
-
-
-
-
-# Conclusion
-The Inverted Index Search algorithm is a powerful and efficient way to search for elements in a dataset, especially when dealing with large datasets and frequent queries. It is widely used in search engines and information retrieval systems to quickly locate documents containing specific keywords.
diff --git a/dsa-solutions/Searching-Algorithms/Jump-Search.md b/dsa-solutions/Searching-Algorithms/Jump-Search.md
deleted file mode 100644
index 444b941a8..000000000
--- a/dsa-solutions/Searching-Algorithms/Jump-Search.md
+++ /dev/null
@@ -1,212 +0,0 @@
----
-id: Jump-Search
-title: Jump Search (Geeks for Geeks)
-sidebar_label: Jump Search
-tags:
- - Intermediate
- - Search Algorithms
- - Geeks for Geeks
- - CPP
- - Python
- - Java
- - JavaScript
- - DSA
-description: "This is a solution to the Jump Search problem."
----
-
-## What is Jump Search?
-
-Jump Search is an efficient search algorithm for sorted arrays. It works by jumping ahead by fixed steps and then performing a linear search within a block, making it faster than linear search but less complex than binary search.
-
-## Algorithm for Jump Search
-
-1. Calculate the optimal step size $\sqrt{N}$, where $N$ is the length of the list.
-2. Start from the first element and jump ahead by the step size until the target element is greater than or equal to the current element.
-3. Perform a linear search within the identified block.
-4. If the target element is found, return its index.
-5. If the target element is not found, return -1.
-
-## How does Jump Search work?
-
-- It calculates a jump step based on the length of the list.
-- It jumps ahead in blocks, comparing the target value with the current element at each step.
-- Once the block where the target might be located is identified, a linear search within the block is performed.
-
-
-
-## Problem Description
-
-Given a sorted list and a target element, implement the Jump Search algorithm to find the index of the target element in the list. If the element is not present, return -1.
-
-## Examples
-
-**Example 1:**
-Input:
-list = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
-target = 6
-Output: 6
-
-
-**Example 2:**
-Input:
-list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
-target = 15
-Output: -1
-
-
-## Your Task:
-
-You don't need to read input or print anything. Complete the function jump_search() which takes arr[], N and K as input parameters and returns the index of K in the array. If K is not present in the array, return -1.
-
-Expected Time Complexity: $O(\sqrt{N})$
-Expected Auxiliary Space: $O(1)$
-
-## Constraints
-
-- $1 <= N <= 10^5$
-- $1 <= arr[i] <= 10^6$
-- $1 <= K <= 10^6$
-
-## Implementation
-
-
-
-
-```python
- import math
-
- def jump_search(lst, target):
- length = len(lst)
- step = int(math.sqrt(length))
- prev = 0
-
- while lst[min(step, length) - 1] < target:
- prev = step
- step += int(math.sqrt(length))
- if prev >= length:
- return -1
-
- for i in range(prev, min(step, length)):
- if lst[i] == target:
- return i
- return -1
- ```
-
-
-
- ```cpp
- #include
- #include
- #include
-int jump_search(const std::vector& lst, int target) {
-int length = lst.size();
-int step = sqrt(length);
-int prev = 0;
- while (lst[std::min(step, length) - 1] < target) {
- prev = step;
- step += sqrt(length);
- if (prev >= length) {
- return -1;
- }
- }
-
- for (int i = prev; i < std::min(step, length); ++i) {
- if (lst[i] == target) {
- return i;
- }
- }
- return -1;
-}
-
-int main() {
-std::vector lst = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
-int target = 6;
-std::cout << "Index: " << jump_search(lst, target) << std::endl;
-return 0;
-}
-
-```
-
-
-
-
-```java
-import java.util.Arrays;
-
-public class JumpSearch {
- public static int jumpSearch(int[] lst, int target) {
- int length = lst.length;
- int step = (int) Math.sqrt(length);
- int prev = 0;
-
- while (lst[Math.min(step, length) - 1] < target) {
- prev = step;
- step += (int) Math.sqrt(length);
- if (prev >= length) {
- return -1;
- }
- }
-
- for (int i = prev; i < Math.min(step, length); i++) {
- if (lst[i] == target) {
- return i;
- }
- }
- return -1;
- }
-
- public static void main(String[] args) {
- int[] lst = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
- int target = 6;
- System.out.println("Index: " + jumpSearch(lst, target));
- }
-}
-
-```
-
-
-
-
- ```javascript
- function jumpSearch(lst, target) {
- let length = lst.length;
- let step = Math.floor(Math.sqrt(length));
- let prev = 0;
- while (lst[Math.min(step, length) - 1] < target) {
- prev = step;
- step += Math.floor(Math.sqrt(length));
- if (prev >= length) {
- return -1;
- }
- }
-
- for (let i = prev; i < Math.min(step, length); i++) {
- if (lst[i] === target) {
- return i;
- }
- }
- return -1;
-}
-
-const lst = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
-const target = 6;
-console.log("Index:", jumpSearch(lst, target));
-```
-
-
-
-
-## Complexity Analysis
-
-- **Time Complexity**: $O(\sqrt{n})$, where $n$ is the number of elements in the list. The list is divided into blocks, leading to a root-time complexity.
-- **Space Complexity**: $O(1)$, as no extra space is required apart from the input list.
-
-## Advantages and Disadvantages
-
-**Advantages:**
-- Faster than linear search for large sorted lists.
-- Simpler than binary search while still being efficient.
-
-**Disadvantages:**
-- Requires the list to be sorted.
-- Less efficient compared to binary search in terms of time complexity.
diff --git a/dsa-solutions/Searching-Algorithms/Pattern-Matching-with-Wildcards.md b/dsa-solutions/Searching-Algorithms/Pattern-Matching-with-Wildcards.md
deleted file mode 100644
index 3c014fc1b..000000000
--- a/dsa-solutions/Searching-Algorithms/Pattern-Matching-with-Wildcards.md
+++ /dev/null
@@ -1,147 +0,0 @@
----
-id: Pattern-Matching-Wildcards
-title: Pattern Matching with Wildcards
-sidebar_label: Pattern Matching with Wildcards
-tags:
- - Advanced
- - Search Algorithms
- - Pattern Matching
- - CPP
- - Python
- - Java
- - JavaScript
- - DSA
-description: "This is a solution to the Pattern Matching with Wildcards problem."
----
-
-## What is Pattern Matching with Wildcards?
-
-Pattern Matching with Wildcards is an advanced search algorithm that extends traditional pattern matching by allowing wildcard characters ('*') to represent any sequence of characters (including empty sequence) during the search process. This approach is useful for flexible and efficient text searching in various applications.
-
-## Algorithm Steps
-
-1. **Initialization**:
- - Prepare the pattern with wildcards and the text to search within.
-
-2. **Pattern Matching**:
- - Iterate through the pattern and text character by character.
- - Handle wildcard characters ('*') to match any sequence of characters or positions.
-
-3. **Matching Strategy**:
- - Use dynamic programming or a recursive approach to efficiently handle wildcard expansion and pattern matching.
-
-## Complexity Analysis
-
-- **Time Complexity**: Depends on the specific implementation. It can range from $O(m \times n) )$ to $ O(m + n) $, where $m$ is the length of the pattern and $n$ is the length of the text.
-- **Space Complexity**: $O(m \times n) )$ in worst cases due to the potential recursion depth or dynamic programming table.
-
-## Example
-
-Given a pattern with wildcards and a text:
-
-```
-
-pattern = "acd"
-text = "abcd"
-
-```
-
-Using Pattern Matching with Wildcards:
-
-- Match the pattern against the text, considering '*' as a wildcard that matches any sequence of characters.
-
-## Implementation
-
-
-
-
-```python
-def pattern_matching_with_wildcards(pattern, text):
- # Dynamic programming approach
- m, n = len(pattern), len(text)
- dp = [[False] * (n + 1) for _ in range(m + 1)]
- dp[0][0] = True
-
- # Handle initial wildcard characters
- for i in range(1, m + 1):
- if pattern[i - 1] == '*':
- dp[i][0] = dp[i - 1][0]
-
- # Fill dp table
- for i in range(1, m + 1):
- for j in range(1, n + 1):
- if pattern[i - 1] == '*':
- dp[i][j] = dp[i - 1][j] or dp[i][j - 1]
- elif pattern[i - 1] == '?' or pattern[i - 1] == text[j - 1]:
- dp[i][j] = dp[i - 1][j - 1]
-
- return dp[m][n]
-
-# Example usage:
-pattern = "a*c*d"
-text = "abcd"
-
-if pattern_matching_with_wildcards(pattern, text):
- print(f"Pattern '{pattern}' matches text '{text}'")
-else:
- print(f"Pattern '{pattern}' does not match text '{text}'")
-```
-
-
-
-
-```cpp
-
-#include
-#include
-#include
-
-bool pattern_matching_with_wildcards(const std::string& pattern, const std::string& text) {
- int m = pattern.size();
- int n = text.size();
-
- std::vector> dp(m + 1, std::vector(n + 1, false));
- dp[0][0] = true;
-
- // Handle initial wildcard characters
- for (int i = 1; i <= m; ++i) {
- if (pattern[i - 1] == '*') {
- dp[i][0] = dp[i - 1][0];
- }
- }
-
- // Fill dp table
- for (int i = 1; i <= m; ++i) {
- for (int j = 1; j <= n; ++j) {
- if (pattern[i - 1] == '*') {
- dp[i][j] = dp[i - 1][j] || dp[i][j - 1];
- } else if (pattern[i - 1] == '?' || pattern[i - 1] == text[j - 1]) {
- dp[i][j] = dp[i - 1][j - 1];
- }
- }
- }
-
- return dp[m][n];
-}
-
-int main() {
- std::string pattern = "a*c*d";
- std::string text = "abcd";
-
- if (pattern_matching_with_wildcards(pattern, text)) {
- std::cout << "Pattern '" << pattern << "' matches text '" << text << "'\n";
- } else {
- std::cout << "Pattern '" << pattern << "' does not match text '" << text << "'\n";
- }
-
- return 0;
-}
-
-```
-
-
-
-
-# Conclusion
-Pattern Matching with Wildcards is a versatile algorithm that allows for flexible matching of patterns containing wildcard characters ('*') against text sequences. It is useful in various applications such as text processing, file search utilities, and more where flexible and efficient pattern matching is required.
-
diff --git a/dsa-solutions/Searching-Algorithms/Quantum-Walk-Search.md b/dsa-solutions/Searching-Algorithms/Quantum-Walk-Search.md
deleted file mode 100644
index 2cf3ec23b..000000000
--- a/dsa-solutions/Searching-Algorithms/Quantum-Walk-Search.md
+++ /dev/null
@@ -1,148 +0,0 @@
----
-id: Quantum-Walk-Search
-title: Quantum Walk Search
-sidebar_label: Quantum Walk Search
-tags:
- - Advanced
- - Search Algorithms
- - Quantum Computing
- - CPP
- - Python
-description: "This is a solution to the Quantum Walk Search problem."
-
----
-
-## What is Quantum Walk Search?
-
-Quantum Walk Search is a search algorithm that leverages quantum computing principles, specifically quantum walks, to search through an unstructured database or graph more efficiently than classical algorithms. Quantum walks are the quantum analog of classical random walks and can achieve quadratic speedup in search tasks.
-
-## Algorithm for Quantum Walk Search
-
-1. **Initialization**: Initialize the quantum state representing the search space.
-2. **Quantum Walk Operator**: Apply the quantum walk operator that evolves the quantum state according to the structure of the search space.
-3. **Marking**: Mark the target states by applying a phase shift to the target elements.
-4. **Amplitude Amplification**: Use amplitude amplification to increase the probability of measuring the target state.
-5. **Measurement**: Measure the quantum state to obtain the target element with high probability.
-
-## How does Quantum Walk Search work?
-
-- Quantum Walk Search utilizes the principles of superposition and interference to explore the search space efficiently.
-- The quantum walk operator spreads the probability amplitude over the search space, while the marking and amplitude amplification steps increase the probability of finding the target element.
-
-
-## Problem Description
-
-Given an unstructured database or graph, implement the Quantum Walk Search algorithm to find the target element. If the element is not present, the algorithm should indicate that as well.
-
-## Examples
-
-**Example 1:**
-Input:
-database = [1, 3, 5, 7, 9]
-target = 5
-Output: 2
-
-**Example 2:**
-Input:
-database = [2, 4, 6, 8, 10]
-target = 7
-Output: -1
-
-## Your Task
-
-Complete the function `quantum_walk_search()` which takes a list `database` and an integer `target` as input parameters and returns the index of the target element. If the element is not present, return -1.
-
-Expected Time Complexity: $O(\sqrt{n})$
-Expected Auxiliary Space: $O(n)$
-
-## Constraints
-
-- $1 <= n <= 10^5$
-- $1 <= database[i] <= 10^6$
-- $1 <= target <= 10^6$
-
-## Implementation
-
-
-
-
-```python
-import numpy as np
-
-def quantum_walk_search(database, target):
- n = len(database)
- steps = int(np.sqrt(n))
-
- # Initialize quantum state
- state = np.zeros(n)
- state.fill(1 / np.sqrt(n))
-
- # Quantum walk operator
- for step in range(steps):
- for i in range(n):
- if database[i] == target:
- state[i] *= -1
-
- # Amplitude amplification
- for i in range(n):
- state[i] *= -1
- state.fill(2 / n * np.sum(state))
-
- # Measurement
- probabilities = state ** 2
- index = np.argmax(probabilities)
- return index if database[index] == target else -1
-
-# Example usage:
-database = [1, 3, 5, 7, 9]
-target = 5
-print(quantum_walk_search(database, target)) # Output: 2
-```
-
-
-
-
-```cpp
-#include
-#include
-#include
-#include
-
-int quantum_walk_search(std::vector& database, int target) {
- int n = database.size();
- int steps = static_cast(std::sqrt(n));
-
- // Initialize quantum state
- std::vector state(n, 1.0 / std::sqrt(n));
-
- // Quantum walk operator
- for (int step = 0; step < steps; ++step) {
- for (int i = 0; i < n; ++i) {
- if (database[i] == target) {
- state[i] *= -1;
- }
- }
- }
-
- // Amplitude amplification
- double sum = std::accumulate(state.begin(), state.end(), 0.0);
- for (int i = 0; i < n; ++i) {
- state[i] = (2.0 / n) * sum - state[i];
- }
-
- // Measurement
- auto max_it = std::max_element(state.begin(), state.end());
- int index = std::distance(state.begin(), max_it);
- return (database[index] == target) ? index : -1;
-}
-
-int main() {
- std::vector database = {1, 3, 5, 7, 9};
- int target = 5;
- std::cout << quantum_walk_search(database, target) << std::endl; // Output: 2
- return 0;
-}
-```
-
-
-
diff --git a/dsa-solutions/Searching-Algorithms/Quantum-Wave-Search.md b/dsa-solutions/Searching-Algorithms/Quantum-Wave-Search.md
deleted file mode 100644
index 326cc5bff..000000000
--- a/dsa-solutions/Searching-Algorithms/Quantum-Wave-Search.md
+++ /dev/null
@@ -1,183 +0,0 @@
----
-id: Quantum-Wave-Search
-title: Quantum Wave Search
-sidebar_label: Quantum Wave Search
-tags:
- - Advanced
- - Search Algorithms
- - CPP
- - Python
- - Java
- - JavaScript
- - DSA
-description: "This is a solution to the Quantum Wave Search problem."
----
-
-## What is Quantum Wave Search?
-
-Quantum Wave Search is an advanced search algorithm inspired by quantum computing principles. It leverages the concept of quantum superposition and wave interference to efficiently search an unsorted list.
-
-## Algorithm for Quantum Wave Search
-
-1. Initialize the system in a superposition of all possible states.
-2. Apply a sequence of quantum gates to evolve the state of the system.
-3. Measure the state of the system, collapsing the superposition to a specific state.
-4. If the target element is found, return the index; otherwise, repeat the process.
-
-## How does Quantum Wave Search work?
-
-- It uses quantum superposition to represent all possible states simultaneously.
-- Quantum gates manipulate the superposition state.
-- Measurement collapses the superposition to a single state, potentially revealing the target element.
-
-## Problem Description
-
-Given a list and a target element, implement the Quantum Wave Search algorithm to find the index of the target element in the list. If the element is not present, return -1.
-
-## Examples
-
-**Example 1:**
-Input:
-list = [1, 3, 5, 7, 9, 11, 13, 15]
-target = 7
-Output: 3
-
-**Example 2:**
-Input:
-list = [2, 4, 6, 8, 10, 12, 14, 16]
-target = 5
-Output: -1
-
-## Your task
-
-Complete the function quantum_wave_search() which takes two integers n , k and an array arr, as input parameters and returns an integer denoting the answer. Return -1 if the number is not found in the array. You don't have to print answers or take inputs.
-
-Expected Time Complexity: $O(\sqrt{n})$
-Expected Auxiliary Space: $O(1)$
-
-## Constraints
-
-- $1 <= n <= 10^6$
-- $1 <= k <= 10^6$
-- $1 <= arr[i] <= 10^9$
-
-## Implementation
-
-
-
-
-```python
- import random
-
- def quantum_wave_search(lst, target):
- n = len(lst)
- for _ in range(int(n ** 0.5)):
- index = random.randint(0, n - 1)
- if lst[index] == target:
- return index
- return -1
-```
-
-
-
-
-
-```cpp
- #include
- #include
- #include
- #include
- #include
-
- int quantum_wave_search(const std::vector& lst, int target) {
- int n = lst.size();
- std::srand(std::time(0));
- for (int i = 0; i < std::sqrt(n); i++) {
- int index = std::rand() % n;
- if (lst[index] == target) {
- return index;
- }
- }
- return -1;
- }
-
- int main() {
- std::vector lst = {1, 3, 5, 7, 9, 11, 13, 15};
- int target = 7;
- std::cout << "Index: " << quantum_wave_search(lst, target) << std::endl;
- return 0;
- }
-```
-
-
-
-
-
-```java
- import java.util.Random;
-
- public class QuantumWaveSearch {
- public static int quantumWaveSearch(int[] lst, int target) {
- int n = lst.length;
- Random rand = new Random();
- for (int i = 0; i < Math.sqrt(n); i++) {
- int index = rand.nextInt(n);
- if (lst[index] == target) {
- return index;
- }
- }
- return -1;
- }
-
- public static void main(String[] args) {
- int[] lst = {1, 3, 5, 7, 9, 11, 13, 15};
- int target = 7;
- System.out.println("Index: " + quantumWaveSearch(lst, target));
- }
- }
-```
-
-
-
-
-
-```javascript
- function quantumWaveSearch(lst, target) {
- let n = lst.length;
- for (let i = 0; i < Math.sqrt(n); i++) {
- let index = Math.floor(Math.random() * n);
- if (lst[index] === target) {
- return index;
- }
- }
- return -1;
- }
-
- const lst = [1, 3, 5, 7, 9, 11, 13, 15];
- const target = 7;
- console.log("Index:", quantumWaveSearch(lst, target));
-```
-
-
-
-
-## Complexity Analysis
-
-- **Time Complexity**: $O(\sqrt{n})$, where $n$ is the number of elements in the list. Quantum Wave Search leverages the principles of quantum mechanics to achieve sublinear time complexity.
-- **Space Complexity**: $O(1)$, as no extra space is required apart from the input list.
-
-## Advantages and Disadvantages
-
-**Advantages:**
-- Utilizes quantum principles for efficient search.
-- Sublinear time complexity.
-
-**Disadvantages:**
-- Requires quantum computing concepts.
-- Performance is probabilistic and may require multiple iterations.
-
-## References
-
-- **Quantum Computing:** [Quantum Computing](https://en.wikipedia.org/wiki/Quantum_computing)
-- **Geeks for Geeks:** [Quantum Search](https://www.geeksforgeeks.org/quantum-search/)
-- **HackerRank Problem:** [HackerRank](https://www.hackerrank.com/challenges/quantum-wave-search/problem)
diff --git a/dsa-solutions/Searching-Algorithms/Recursive-Matrix-Search.md b/dsa-solutions/Searching-Algorithms/Recursive-Matrix-Search.md
deleted file mode 100644
index ce32590aa..000000000
--- a/dsa-solutions/Searching-Algorithms/Recursive-Matrix-Search.md
+++ /dev/null
@@ -1,96 +0,0 @@
-# Recursive Matrix Search Algorithm
-
-## Overview
-
-Recursive Matrix Search is an algorithm designed to search for a target element in a 2D matrix. It uses a recursive approach to divide and conquer the search space, similar to binary search but applied in a matrix context.
-
-## Algorithm Steps
-
-1. **Initialization**:
- - Start from the top-left corner of the matrix.
- - Define boundaries: `left`, `right`, `top`, and `bottom`.
-
-2. **Recursive Search**:
- - Divide the matrix into sub-matrices recursively.
- - Compare the middle element of the current sub-matrix with the target.
- - If the middle element matches the target, return its coordinates.
- - If the target is less than the middle element, search the sub-matrix to the left or above recursively.
- - If the target is greater than the middle element, search the sub-matrix to the right or below recursively.
-
-3. **Base Case**:
- - If the boundaries (`left`, `right`, `top`, `bottom`) converge or cross over (indicating no more search space), terminate the recursion.
-
-4. **Complexity**:
- - Time Complexity: \( O(\log(n)) \) in the average case, where \( n \) is the total number of elements in the matrix. This is achieved due to the divide-and-conquer nature of the search.
- - Space Complexity: \( O(\log(n)) \) due to the recursive calls on the call stack.
-
-## Example
-
-Given a 2D matrix:
-
-matrix = [
-[1, 4, 7, 11, 15],
-[2, 5, 8, 12, 19],
-[3, 6, 9, 16, 22],
-[10, 13, 14, 17, 24],
-[18, 21, 23, 26, 30]
-]
-
-target = 14
-
-Using Recursive Matrix Search:
-
-- Start from the top-left corner: `matrix[0][0]`.
-- Check against the target `14`.
-- Recursive steps narrow down the search until the target is found or deemed absent.
-
-## Implementation Note
-
-The algorithm can be implemented in various programming languages using a recursive function that navigates through the matrix based on comparisons with the target element.
-
-```python
-def recursive_matrix_search(matrix, target, left, right, top, bottom):
- if left > right or top > bottom:
- return None
-
- mid_row = (top + bottom) // 2
- mid_col = (left + right) // 2
-
- mid_element = matrix[mid_row][mid_col]
- if mid_element == target:
- return (mid_row, mid_col)
- elif mid_element > target:
- # Search in top-left and bottom sub-matrices
- result = recursive_matrix_search(matrix, target, left, mid_col-1, top, bottom)
- if result is None:
- result = recursive_matrix_search(matrix, target, left, right, top, mid_row-1)
- return result
- else:
- # Search in top-right and bottom sub-matrices
- result = recursive_matrix_search(matrix, target, mid_col+1, right, top, bottom)
- if result is None:
- result = recursive_matrix_search(matrix, target, left, right, mid_row+1, bottom)
- return result
-```
-
-# Example usage:
-matrix = [
- [1, 4, 7, 11, 15],
- [2, 5, 8, 12, 19],
- [3, 6, 9, 16, 22],
- [10, 13, 14, 17, 24],
- [18, 21, 23, 26, 30]
-]
-target = 14
-
-# Initial search starts from top-left corner (0, 0) to (4, 4)
-```
-result = recursive_matrix_search(matrix, target, 0, len(matrix[0])-1, 0, len(matrix)-1)
-if result:
- print(f"Target {target} found at position: {result}")
-else:
- print(f"Target {target} not found in the matrix")
-
-```
-
-This algorithm uniquely combines the concepts of binary search with matrix traversal using recursion, offering efficient search capabilities in 2D matrices.
diff --git a/dsa-solutions/Searching-Algorithms/Skip-List-Search.md b/dsa-solutions/Searching-Algorithms/Skip-List-Search.md
deleted file mode 100644
index e2d52db67..000000000
--- a/dsa-solutions/Searching-Algorithms/Skip-List-Search.md
+++ /dev/null
@@ -1,247 +0,0 @@
----
-id: Skip-List-Search
-title: Skip List Search
-sidebar_label: Skip List Search
-tags:
- - Advanced
- - Search Algorithms
- - Data Structures
- - CPP
- - Python
- - Java
- - JavaScript
- - DSA
-description: "This is a solution to the Skip List Search problem."
-
----
-
-## What is Skip List Search?
-
-Skip List Search is an advanced search algorithm that combines elements of linked lists and binary search trees to efficiently search through sorted data. Skip Lists use multiple levels of linked lists with increasingly sparse elements, allowing for fast search, insertion, and deletion operations.
-
-## Algorithm for Skip List Search
-
-1. **Start at the top level**: Begin the search at the highest level of the skip list.
-2. **Traverse horizontally**: Move forward until the next element is greater than or equal to the target.
-3. **Move down a level**: If the target is not found, move down to the next level and repeat the horizontal traversal.
-4. **Repeat**: Continue the process until the lowest level is reached.
-5. **Check for the target**: If the target is found at any level, return its position. If the target is not found after reaching the lowest level, return -1.
-
-## How does Skip List Search work?
-
-- Skip Lists are constructed with multiple layers where each layer is a subset of the layer below it.
-- The top layer is the sparsest, while the bottom layer contains all the elements.
-- Searching starts from the top layer and progresses horizontally and vertically, narrowing down the search range efficiently.
-
-## Problem Description
-
-Given a skip list and a target element, implement the Skip List Search algorithm to find the position of the target element. If the element is not present, return -1.
-
-## Examples
-
-**Example 1:**
-Input:
-skip_list = [[1, 3, 5, 7, 9], [1, 3, 7], [1]]
-target = 5
-Output: 2
-
-**Example 2:**
-Input:
-skip_list = [[2, 4, 6, 8, 10], [2, 6], [2]]
-target = 7
-Output: -1
-
-## Your Task
-
-Complete the function `skip_list_search()` which takes a 2D array `skip_list` and an integer `target` as input parameters and returns the index of the target element. If the element is not present, return -1.
-
-Expected Time Complexity: $O(\log n)$
-Expected Auxiliary Space: $O(n)$
-
-## Constraints
-
-- $1 <= n <= 10^5$
-- $1 <= skip_list[i] <= 10^6$
-- $1 <= target <= 10^6$
-
-## Implementation
-
-
-
-
-```python
-class Node:
- def __init__(self, value=None, right=None, down=None):
- self.value = value
- self.right = right
- self.down = down
-
-class SkipList:
- def __init__(self):
- self.head = Node()
-
- def search(self, target):
- current = self.head
- while current:
- while current.right and current.right.value < target:
- current = current.right
- if current.right and current.right.value == target:
- return True
- current = current.down
- return False
-
-# Example usage:
-skip_list = SkipList()
-# Add elements to skip_list...
-print(skip_list.search(5)) # Output: True or False
-```
-
-
-
-
-```cpp
-#include
-#include
-
-struct Node {
- int value;
- Node* right;
- Node* down;
- Node(int val) : value(val), right(nullptr), down(nullptr) {}
-};
-
-class SkipList {
-public:
- SkipList() {
- head = new Node(-1);
- }
-
- bool search(int target) {
- Node* current = head;
- while (current) {
- while (current->right && current->right->value < target) {
- current = current->right;
- }
- if (current->right && current->right->value == target) {
- return true;
- }
- current = current->down;
- }
- return false;
- }
-
-private:
- Node* head;
-};
-
-// Example usage:
-int main() {
- SkipList skip_list;
- // Add elements to skip_list...
- std::cout << skip_list.search(5) << std::endl; // Output: 1 or 0
- return 0;
-}
-```
-
-
-
-
-```java
-class Node {
- int value;
- Node right, down;
- Node(int val) {
- value = val;
- right = down = null;
- }
-}
-
-class SkipList {
- private Node head;
-
- public SkipList() {
- head = new Node(-1);
- }
-
- public boolean search(int target) {
- Node current = head;
- while (current != null) {
- while (current.right != null && current.right.value < target) {
- current = current.right;
- }
- if (current.right != null && current.right.value == target) {
- return true;
- }
- current = current.down;
- }
- return false;
- }
-
- public static void main(String[] args) {
- SkipList skipList = new SkipList();
- // Add elements to skipList...
- System.out.println(skipList.search(5)); // Output: true or false
- }
-}
-```
-
-
-
-
-```javascript
-class Node {
- constructor(value = null, right = null, down = null) {
- this.value = value;
- this.right = right;
- this.down = down;
- }
-}
-
-class SkipList {
- constructor() {
- this.head = new Node();
- }
-
- search(target) {
- let current = this.head;
- while (current) {
- while (current.right && current.right.value < target) {
- current = current.right;
- }
- if (current.right && current.right.value === target) {
- return true;
- }
- current = current.down;
- }
- return false;
- }
-}
-
-// Example usage:
-const skipList = new SkipList();
-// Add elements to skipList...
-console.log(skipList.search(5)); // Output: true or false
-```
-
-
-
-
-# Complexity Analysis
-### Time Complexity: $O(\log n)$, where $n$ is the number of elements in the list. Skip List Search provides a logarithmic time complexity by reducing the number of elements to check at each level.
-### Space Complexity: $O(n)$, as it requires additional space to store the multiple levels of linked lists.
-# Advantages and Disadvantages
-## Advantages:
-
-Faster search times compared to linear search.
-
-Easier to implement and maintain compared to balanced trees like AVL or Red-Black trees.
-
-Allows for efficient insertion and deletion operations.
-## Disadvantages:
-
-Requires extra space to maintain the skip list levels.
-
-Performance can degrade if the levels are not well-balanced.
-References
-Wikipedia: Skip List
-Geeks for Geeks: Skip List
diff --git a/dsa-solutions/Searching-Algorithms/Spiral-Matrix-Search.md b/dsa-solutions/Searching-Algorithms/Spiral-Matrix-Search.md
deleted file mode 100644
index f88d7fb09..000000000
--- a/dsa-solutions/Searching-Algorithms/Spiral-Matrix-Search.md
+++ /dev/null
@@ -1,195 +0,0 @@
----
-id: Spiral-Matrix-Search
-title: Spiral Matrix Search
-sidebar_label: Spiral Matrix Search
-tags:
- - Advanced
- - Search Algorithms
- - Matrix
- - CPP
- - Python
- - Java
- - JavaScript
- - DSA
-description: "This is a solution to the Spiral Matrix Search problem."
----
-
-## What is Spiral Matrix Search?
-
-Spiral Matrix Search is a search algorithm designed to search for a target element in a 2D matrix by traversing the matrix in a spiral order. The traversal starts from the top-left corner and proceeds in a spiral (clockwise) fashion until the entire matrix is covered or the target element is found.
-
-## Algorithm Steps
-
-1. **Initialization**:
- - Start from the top-left corner of the matrix.
- - Define boundaries: `top`, `bottom`, `left`, and `right`.
-
-2. **Spiral Traversal**:
- - Move from left to right across the topmost untraversed row.
- - Move from top to bottom down the rightmost untraversed column.
- - Move from right to left across the bottommost untraversed row.
- - Move from bottom to top up the leftmost untraversed column.
- - Adjust the boundaries accordingly after each move.
-
-3. **Check Element**:
- - At each position during the traversal, check if the current element matches the target.
- - If a match is found, return the coordinates of the target element.
-
-4. **End Condition**:
- - The traversal continues until the entire matrix is covered or the target element is found.
-
-## Complexity Analysis
-
-- **Time Complexity**: \( O(n) \) where \( n \) is the total number of elements in the matrix. Each element is visited exactly once.
-- **Space Complexity**: \( O(1) \) as no extra space is used other than variables for traversal and boundaries.
-
-## Example
-
-Given a 2D matrix:
-
-matrix = [
-[1, 2, 3, 4],
-[5, 6, 7, 8],
-[9, 10, 11, 12],
-[13, 14, 15, 16]
-]
-
-target = 7
-
-
-Using Spiral Matrix Search:
-
-- Start from the top-left corner: `matrix[0][0]`.
-- Traverse in a spiral order until the target `7` is found.
-
-## Implementation
-
-
-
-
-```python
-def spiral_matrix_search(matrix, target):
- if not matrix or not matrix[0]:
- return None
-
- rows, cols = len(matrix), len(matrix[0])
- top, bottom, left, right = 0, rows - 1, 0, cols - 1
-
- while top <= bottom and left <= right:
- # Traverse from left to right
- for col in range(left, right + 1):
- if matrix[top][col] == target:
- return (top, col)
- top += 1
-
- # Traverse from top to bottom
- for row in range(top, bottom + 1):
- if matrix[row][right] == target:
- return (row, right)
- right -= 1
-
- # Traverse from right to left
- if top <= bottom:
- for col in range(right, left - 1, -1):
- if matrix[bottom][col] == target:
- return (bottom, col)
- bottom -= 1
-
- # Traverse from bottom to top
- if left <= right:
- for row in range(bottom, top - 1, -1):
- if matrix[row][left] == target:
- return (row, left)
- left += 1
-
- return None
-
-# Example usage:
-matrix = [
- [1, 2, 3, 4],
- [5, 6, 7, 8],
- [9, 10, 11, 12],
- [13, 14, 15, 16]
-]
-target = 7
-
-result = spiral_matrix_search(matrix, target)
-if result:
- print(f"Target {target} found at position: {result}")
-else:
- print(f"Target {target} not found in the matrix")
-```
-
-
-
-
-```cpp
-
-#include
-#include
-
-std::pair spiral_matrix_search(std::vector>& matrix, int target) {
- if (matrix.empty() || matrix[0].empty()) return {-1, -1};
-
- int rows = matrix.size();
- int cols = matrix[0].size();
- int top = 0, bottom = rows - 1;
- int left = 0, right = cols - 1;
-
- while (top <= bottom && left <= right) {
- // Traverse from left to right
- for (int col = left; col <= right; ++col) {
- if (matrix[top][col] == target) return {top, col};
- }
- top++;
-
- // Traverse from top to bottom
- for (int row = top; row <= bottom; ++row) {
- if (matrix[row][right] == target) return {row, right};
- }
- right--;
-
- // Traverse from right to left
- if (top <= bottom) {
- for (int col = right; col >= left; --col) {
- if (matrix[bottom][col] == target) return {bottom, col};
- }
- bottom--;
- }
-
- // Traverse from bottom to top
- if (left <= right) {
- for (int row = bottom; row >= top; --row) {
- if (matrix[row][left] == target) return {row, left};
- }
- left++;
- }
- }
-
- return {-1, -1};
-}
-
-int main() {
- std::vector> matrix = {
- {1, 2, 3, 4},
- {5, 6, 7, 8},
- {9, 10, 11, 12},
- {13, 14, 15, 16}
- };
- int target = 7;
-
- std::pair result = spiral_matrix_search(matrix, target);
- if (result.first != -1) {
- std::cout << "Target " << target << " found at position: (" << result.first << ", " << result.second << ")\n";
- } else {
- std::cout << "Target " << target << " not found in the matrix\n";
- }
- return 0;
-}
-```
-
-
-
-
-# Conclusion
-The Spiral Matrix Search algorithm is an efficient way to traverse a 2D matrix in a spiral order to find a target element. It ensures each element is visited exactly once, maintaining a linear time complexity and constant space complexity.
diff --git a/dsa-solutions/Searching-Algorithms/Ternary-search.md b/dsa-solutions/Searching-Algorithms/Ternary-search.md
deleted file mode 100644
index 3a3daa9cb..000000000
--- a/dsa-solutions/Searching-Algorithms/Ternary-search.md
+++ /dev/null
@@ -1,239 +0,0 @@
----
-id: Ternary-Search
-title: Ternary Search (Geeks for Geeks)
-sidebar_label: Ternary Search
-tags:
- - Intermediate
- - Search Algorithms
- - Geeks for Geeks
- - CPP
- - Python
- - Java
- - JavaScript
- - DSA
-description: "This is a solution to the Ternary Search problem on Geeks for Geeks."
----
-
-## What is Ternary Search?
-
-Ternary Search is a divide-and-conquer search algorithm used to find the position of a target value within a sorted array. It divides the array into three parts and determines which part the target value belongs to, reducing the search space by one third each time.
-
-## Algorithm for Ternary Search
-
-1. Divide the array into three parts by calculating two midpoints.
-2. Compare the target value with the values at these midpoints.
-3. If the target value matches either midpoint, return the index.
-4. If the target value is less than the first midpoint, repeat the process on the left third.
-5. If the target value is greater than the first midpoint but less than the second midpoint, repeat the process on the middle third.
-6. If the target value is greater than the second midpoint, repeat the process on the right third.
-7. If the target value is not found, return -1.
-
-## How does Ternary Search work?
-
-- It calculates two midpoints to divide the array into three parts.
-- It compares the target value with the elements at the midpoints.
-- Based on the comparison, it reduces the search space to one of the three parts and repeats the process.
-
-## Problem Description
-
-Given a sorted array and a target element, implement the Ternary Search algorithm to find the index of the target element in the array. If the element is not present, return -1.
-
-## Examples
-
-**Example 1:**
-Input:
-list = [1, 2, 3, 4, 5, 6, 7, 8, 9]
-target = 5
-Output: 4
-
-**Example 2:**
-Input:
-list = [1, 2, 3, 4, 5, 6, 7, 8, 9]
-target = 10
-Output: -1
-
-## Your task
-
-Complete the function ternary_search() which takes two integers n, k and an array arr, as input parameters and returns an integer denoting the answer. Return -1 if the number is not found in the array. You don't have to print answers or take inputs.
-
-Expected Time Complexity: $O(\log_3 n)$
-Expected Auxiliary Space: $O(1)$
-
-## Constraints
-
-- $1 <= n <= 10^6$
-- $1 <= k <= 10^6$
-- $1 <= arr[i] <= 10^9$
-
-## Implementation
-
-
-
-
-
-```python
- def ternary_search(arr, target):
- left, right = 0, len(arr) - 1
-
- while left <= right:
- mid1 = left + (right - left) // 3
- mid2 = right - (right - left) // 3
-
- if arr[mid1] == target:
- return mid1
- if arr[mid2] == target:
- return mid2
-
- if target < arr[mid1]:
- right = mid1 - 1
- elif target > arr[mid2]:
- left = mid2 + 1
- else:
- left = mid1 + 1
- right = mid2 - 1
-
- return -1
-```
-
-
-
-
-```cpp
-
- #include
- #include
-
- int ternary_search(const std::vector& arr, int target) {
- int left = 0, right = arr.size() - 1;
-
- while (left <= right) {
- int mid1 = left + (right - left) / 3;
- int mid2 = right - (right - left) / 3;
-
- if (arr[mid1] == target) {
- return mid1;
- }
- if (arr[mid2] == target) {
- return mid2;
- }
-
- if (target < arr[mid1]) {
- right = mid1 - 1;
- } else if (target > arr[mid2]) {
- left = mid2 + 1;
- } else {
- left = mid1 + 1;
- right = mid2 - 1;
- }
- }
-
- return -1;
- }
-
- int main() {
- std::vector arr = {1, 2, 3, 4, 5, 6, 7, 8, 9};
- int target = 5;
- std::cout << "Index: " << ternary_search(arr, target) << std::endl;
- return 0;
- }
-```
-
-
-
-
-```java
- public class TernarySearch {
- public static int ternarySearch(int[] arr, int target) {
- int left = 0, right = arr.length - 1;
-
- while (left <= right) {
- int mid1 = left + (right - left) / 3;
- int mid2 = right - (right - left) / 3;
-
- if (arr[mid1] == target) {
- return mid1;
- }
- if (arr[mid2] == target) {
- return mid2;
- }
-
- if (target < arr[mid1]) {
- right = mid1 - 1;
- } else if (target > arr[mid2]) {
- left = mid2 + 1;
- } else {
- left = mid1 + 1;
- right = mid2 - 1;
- }
- }
-
- return -1;
- }
-
- public static void main(String[] args) {
- int[] arr = {1, 2, 3, 4, 5, 6, 7, 8, 9};
- int target = 5;
- System.out.println("Index: " + ternarySearch(arr, target));
- }
- }
-```
-
-
-
-
-```javascript
- function ternarySearch(arr, target) {
- let left = 0, right = arr.length - 1;
-
- while (left <= right) {
- let mid1 = left + Math.floor((right - left) / 3);
- let mid2 = right - Math.floor((right - left) / 3);
-
- if (arr[mid1] === target) {
- return mid1;
- }
- if (arr[mid2] === target) {
- return mid2;
- }
-
- if (target < arr[mid1]) {
- right = mid1 - 1;
- } else if (target > arr[mid2]) {
- left = mid2 + 1;
- } else {
- left = mid1 + 1;
- right = mid2 - 1;
- }
- }
-
- return -1;
- }
-
- const arr = [1, 2, 3, 4, 5, 6, 7, 8, 9];
- const target = 5;
- console.log("Index:", ternarySearch(arr, target));
-```
-
-
-
-## Complexity Analysis
-
-- **Time Complexity**: $O(\log_3 n)$, where $n$ is the number of elements in the array. The search space is divided into three parts each time, leading to a logarithmic time complexity base 3.
-- **Space Complexity**: $O(1)$, as no extra space is required apart from the input array.
-
-## Advantages and Disadvantages
-
-**Advantages:**
-- Faster than binary search for large arrays due to reducing the search space by one third each time.
-- Efficient for large datasets.
-
-**Disadvantages:**
-- Requires the array to be sorted.
-- More complex to implement compared to binary search.
-- Not significantly faster than binary search for small datasets.
-
-## References
-
-- **GFG Problem:** [GFG Problem](https://www.geeksforgeeks.org/ternary-search/)
-- **HackerRank Problem:** [HackerRank](https://www.hackerrank.com/challenges/ternary-search/problem)
-- **Author's Geeks for Geeks Profile:** [MuraliDharan](https://www.geeksforgeeks.org/user/ngmuraqrdd/)
diff --git a/dsa-solutions/Sorting-Algorithms/Bitonic-Sort.md b/dsa-solutions/Sorting-Algorithms/Bitonic-Sort.md
deleted file mode 100644
index 14a4a3892..000000000
--- a/dsa-solutions/Sorting-Algorithms/Bitonic-Sort.md
+++ /dev/null
@@ -1,132 +0,0 @@
----
-id: Bitonic-Sort-Algorithm
-title: Bitonic Sort Algorithm
-sidebar_label: Bitonic Sort Algorithm
-tags:
- - Sorting Algorithms
- - Simple
- - CPP
- - Python
- - Java
- - JavaScript
- - DSA
-description: "This is a solution to the Bitonic Sort Algorithm problem."
----
-
-## What is the Bitonic Sort Algorithm?
-
-Bitonic Sort is a parallel sorting algorithm that is efficient for hardware implementation. It works by recursively sorting two halves of the array into a bitonic sequence (one half in ascending order and the other in descending order) and then merging them into a single sorted sequence.
-
-## Algorithm Steps
-
-1. **Bitonic Sequence**:
- - Divide the array into two halves.
- - Recursively sort one half in ascending order and the other half in descending order to form a bitonic sequence.
-
-2. **Bitonic Merge**:
- - Compare and swap elements to merge the bitonic sequence into a single sorted sequence.
-
-3. **Recursive Sorting**:
- - Apply the bitonic sequence and bitonic merge steps recursively until the entire array is sorted.
-
-## Complexity Analysis
-
-- **Time Complexity**: $O(n \log^2 n)$ in the worst case.
-- **Space Complexity**: $O(n)$ auxiliary space due to the recursive calls.
-
-## Example
-
-Given an unsorted array:
-
-```
-array = [4, 3, 2, 1]
-```
-
-Using the Bitonic Sort Algorithm:
-
-- Create bitonic sequences: `[4, 3]` (ascending), `[2, 1]` (descending)
-- Merge bitonic sequences: `[3, 4]` and `[1, 2]` to `[1, 2, 3, 4]`
-
-## Implementation
-
-
-
-
-```python
-def bitonic_sort(arr, low, cnt, direction):
- if cnt > 1:
- k = cnt // 2
- bitonic_sort(arr, low, k, 1)
- bitonic_sort(arr, low + k, k, 0)
- bitonic_merge(arr, low, cnt, direction)
-
-def bitonic_merge(arr, low, cnt, direction):
- if cnt > 1:
- k = cnt // 2
- for i in range(low, low + k):
- if (direction == 1 and arr[i] > arr[i + k]) or (direction == 0 and arr[i] < arr[i + k]):
- arr[i], arr[i + k] = arr[i + k], arr[i]
- bitonic_merge(arr, low, k, direction)
- bitonic_merge(arr, low + k, k, direction)
-
-def sort(arr, N, up):
- bitonic_sort(arr, 0, N, up)
-
-# Example usage:
-array = [4, 3, 2, 1]
-sort(array, len(array), 1)
-print(array) # Output: [1, 2, 3, 4]
-```
-
-
-
-
-```cpp
-#include
-#include
-
-void bitonicMerge(std::vector& arr, int low, int cnt, bool dir) {
- if (cnt > 1) {
- int k = cnt / 2;
- for (int i = low; i < low + k; i++) {
- if (dir == (arr[i] > arr[i + k])) {
- std::swap(arr[i], arr[i + k]);
- }
- }
- bitonicMerge(arr, low, k, dir);
- bitonicMerge(arr, low + k, k, dir);
- }
-}
-
-void bitonicSort(std::vector& arr, int low, int cnt, bool dir) {
- if (cnt > 1) {
- int k = cnt / 2;
- bitonicSort(arr, low, k, true);
- bitonicSort(arr, low + k, k, false);
- bitonicMerge(arr, low, cnt, dir);
- }
-}
-
-void sort(std::vector& arr, int N, bool up) {
- bitonicSort(arr, 0, N, up);
-}
-
-int main() {
- std::vector array = {4, 3, 2, 1};
- sort(array, array.size(), true);
-
- for (int num : array) {
- std::cout << num << " ";
- }
- std::cout << std::endl; // Output: 1 2 3 4
-
- return 0;
-}
-```
-
-
-
-
-## Conclusion
-
-Bitonic Sort is an efficient parallel sorting algorithm with a consistent \( O(n \log^2 n) \) time complexity. It is well-suited for hardware implementations and can be useful in parallel computing environments.
diff --git a/dsa-solutions/Sorting-Algorithms/Bubble-Sort.md b/dsa-solutions/Sorting-Algorithms/Bubble-Sort.md
deleted file mode 100644
index 71a012e8f..000000000
--- a/dsa-solutions/Sorting-Algorithms/Bubble-Sort.md
+++ /dev/null
@@ -1,183 +0,0 @@
----
-id: Bubble-Sort
-title: Bubble Sort (Geeks for Geeks)
-sidebar_label: Bubble Sort
-tags:
- - Beginner
- - Sorting Algorithms
- - Geeks for Geeks
- - CPP
- - Python
- - Java
- - JavaScript
- - DSA
-description: "This is a solution to the Bubble Sort problem on Geeks for Geeks."
----
-
-## 1. What is Bubble Sort?
-
-Bubble Sort is a simple comparison-based sorting algorithm. It repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order. The process is repeated until the list is sorted.
-
-## 2. Algorithm for Bubble Sort
-
-1. Start with the first element and compare it with the second element.
-2. If the first element is greater than the second element, swap them.
-3. Move to the next pair and repeat the process until the end of the list.
-4. Repeat steps 1-3 for all elements in the list until no swaps are needed.
-
-## 3. How does Bubble Sort work?
-
-- Bubble Sort works by repeatedly swapping adjacent elements if they are in the wrong order.
-- The largest element "bubbles up" to its correct position in each iteration.
-
-## 4. Problem Description
-
-Given an array of integers, implement the Bubble Sort algorithm to sort the array in ascending order.
-
-## 5. Examples
-
-**Example 1:**
-```
-Input: [64, 34, 25, 12, 22, 11, 90]
-Output: [11, 12, 22, 25, 34, 64, 90]
-```
-
-**Example 2:**
-```
-Input: [5, 1, 4, 2, 8]
-Output: [1, 2, 4, 5, 8]
-```
-
-**Explanation of Example 1:**
-- The initial array is [64, 34, 25, 12, 22, 11, 90].
-- First pass: [34, 25, 12, 22, 11, 64, 90].
-- Second pass: [25, 12, 22, 11, 34, 64, 90].
-- Continue until the array is sorted: [11, 12, 22, 25, 34, 64, 90].
-
-## 6. Constraints
-
-- $The array can have any number of elements.$
-- $All elements in the array are integers.$
-
-## 7. Implementation
-
-
-
-
- ```python
- def bubble_sort(arr):
- n = len(arr)
- for i in range(n):
- for j in range(0, n-i-1):
- if arr[j] > arr[j+1]:
- arr[j], arr[j+1] = arr[j+1], arr[j]
- return arr
-
- # Example usage:
- arr = [64, 34, 25, 12, 22, 11, 90]
- bubble_sort(arr)
- print(arr)
- ```
-
-
-
-
- ```cpp
- #include
- #include
-
- void bubbleSort(std::vector& arr) {
- int n = arr.size();
- for (int i = 0; i < n - 1; i++) {
- for (int j = 0; j < n - i - 1; j++) {
- if (arr[j] > arr[j + 1]) {
- std::swap(arr[j], arr[j + 1]);
- }
- }
- }
- }
-
- int main() {
- std::vector arr = {64, 34, 25, 12, 22, 11, 90};
- bubbleSort(arr);
- for (int num : arr)
- std::cout << num << " ";
- return 0;
- }
- ```
-
-
-
-
- ```java
- public class BubbleSort {
- public static void bubbleSort(int[] arr) {
- int n = arr.length;
- for (int i = 0; i < n - 1; i++) {
- for (int j = 0; j < n - i - 1; j++) {
- if (arr[j] > arr[j + 1]) {
- int temp = arr[j];
- arr[j] = arr[j + 1];
- arr[j + 1] = temp;
- }
- }
- }
- }
-
- public static void main(String[] args) {
- int[] arr = {64, 34, 25, 12, 22, 11, 90};
- bubbleSort(arr);
- for (int num : arr)
- System.out.print(num + " ");
- }
- }
- ```
-
-
-
-
- ```javascript
- function bubbleSort(arr) {
- let n = arr.length;
- for (let i = 0; i < n - 1; i++) {
- for (let j = 0; j < n - i - 1; j++) {
- if (arr[j] > arr[j + 1]) {
- [arr[j], arr[j + 1]] = [arr[j + 1], arr[j]];
- }
- }
- }
- return arr;
- }
-
- // Example usage:
- let arr = [64, 34, 25, 12, 22, 11, 90];
- bubbleSort(arr);
- console.log(arr);
- ```
-
-
-
-## 8. Complexity Analysis
-
-- **Time Complexity**:
- - Best case: $O(n)$ (when the array is already sorted)
- - Average case: $O(n^2)$
- - Worst case: $O(n^2)$
-
-- **Space Complexity**: $O(1)$ (in-place sorting)
-
-## 9. Advantages and Disadvantages
-
-**Advantages:**
-- Simple to understand and implement.
-- Works well with small datasets.
-
-**Disadvantages:**
-- Inefficient for large datasets due to $O(n^2)$ time complexity.
-- Requires multiple passes through the list.
-
-## 10. References
-
-- **GFG Problem:** [GFG Problem](https://www.geeksforgeeks.org/bubble-sort/)
-- **HackerRank Problem:** [HackerRank](https://www.hackerrank.com/challenges/bubble-sort/problem)
-- **Author's Geeks for Geeks Profile:** [MuraliDharan](https://www.geeksforgeeks.org/user/ngmuraqrdd/)
\ No newline at end of file
diff --git a/dsa-solutions/Sorting-Algorithms/Cocktail-Sort.md b/dsa-solutions/Sorting-Algorithms/Cocktail-Sort.md
deleted file mode 100644
index 28ebe7502..000000000
--- a/dsa-solutions/Sorting-Algorithms/Cocktail-Sort.md
+++ /dev/null
@@ -1,146 +0,0 @@
---
-id: Cocktail-Sort
-title: Cocktail Sort (Geeks for Geeks)
-sidebar_label: Cocktail Sort
-tags:
- - Intermediate
- - Sorting Algorithms
- - Geeks for Geeks
- - CPP
- - Python
- - Java
- - JavaScript
- - DSA
-description: "This is a solution to the Cocktail Sort problem on Geeks for Geeks."
----
-
-## 1. What is Cocktail Sort?
-
-Cocktail Sort is a variation of Bubble Sort. It traverses the list in both directions alternatively. This algorithm is also known as Bidirectional Bubble Sort or Shaker Sort.
-
-## 2. Algorithm for Cocktail Sort
-
-1. Start at the beginning of the list.
-2. Traverse the list from left to right, swapping adjacent items if they are in the wrong order.
-3. When the end of the list is reached, reverse the direction and traverse from right to left, again swapping adjacent items if they are in the wrong order.
-4. Repeat steps 2 and 3 until the list is sorted.
-
-## 3. How does Cocktail Sort work?
-
-- It sorts in both directions in each pass through the list, which can help elements move into place faster.
-- This bidirectional approach allows earlier elements to "bubble up" and later elements to "bubble down" in the same pass, potentially reducing the number of overall passes needed.
-
-## 4. Problem Description
-
-Given an array of integers, implement the Cocktail Sort algorithm to sort the array.
-
-## 5. Examples
-
-**Example 1:**
-
-```
-Input: [5, 1, 4, 2, 8, 0, 2]
-Output: [0, 1, 2, 2, 4, 5, 8]
-```
-**Example 2:**
-```
-Input: [5, 1, 4, 2, 9, 8]
-Output: [1, 2, 4, 5, 8, 9]
-```
-
-## 6. Constraints
-
-- The array should contain at least one element.
-
-## 7. Implementation
-
-**Python**
-```python
-def cocktail_sort(arr):
- n = len(arr)
- swapped = True
- start = 0
- end = n - 1
- while swapped:
- swapped = False
- for i in range(start, end):
- if arr[i] > arr[i + 1]:
- arr[i], arr[i + 1] = arr[i + 1], arr[i]
- swapped = True
- if not swapped:
- break
- swapped = False
- end -= 1
- for i in range(end - 1, start - 1, -1):
- if arr[i] > arr[i + 1]:
- arr[i], arr[i + 1] = arr[i + 1], arr[i]
- swapped = True
- start += 1
- return arr
-```
-```java
-import java.util.Arrays;
-
-public class CocktailSort {
- public static void cocktailSort(int[] arr) {
- boolean swapped = true;
- int start = 0;
- int end = arr.length - 1;
-
- while (swapped) {
- swapped = false;
- for (int i = start; i < end; i++) {
- if (arr[i] > arr[i + 1]) {
- int temp = arr[i];
- arr[i] = arr[i + 1];
- arr[i + 1] = temp;
- swapped = true;
- }
- }
- if (!swapped) break;
- swapped = false;
- end--;
- for (int i = end - 1; i >= start; i--) {
- if (arr[i] > arr[i + 1]) {
- int temp = arr[i];
- arr[i] = arr[i + 1];
- arr[i + 1] = temp;
- swapped = true;
- }
- }
- start++;
- }
- }
-
- public static void main(String[] args) {
- int[] arr = {5, 1, 4, 2, 8, 0, 2};
- cocktailSort(arr);
- System.out.println(Arrays.toString(arr));
- }
-}
-
-```
-
-## 8. Complexity Analysis
-
-- **Time Complexity**:
- - Best case: $O(n)$ (when the array is already sorted)
- Average case: $O(n^2)$
- Worst case: $O(n^2)$
-
-- **Space Complexity**: $O(1)$ (in-place sorting)
-
-## 9. Advantages and Disadvantages
-
-**Advantages:**
-- Cocktail Sort can be more efficient than Bubble Sort for certain types of input because it can address issues where small elements are initially near the end of the list.
-- Simple to understand and implement.
-
-**Disadvantages:**
-- Still has a worst-case time complexity of $O(n^2)$, making it inefficient on large lists compared to more advanced algorithms like Quick Sort, Merge Sort, or Heap Sort.
-- The bidirectional approach does not significantly improve performance for most input cases.
-
-## 10. References
-
-- **GFG Article on Cocktail Sort:** [Geeks for Geeks Cocktail Sort](https://www.geeksforgeeks.org/cocktail-sort/)
-- **Wikipedia Article on Cocktail Sort:** [Cocktail Sort - Wikipedia](https://en.wikipedia.org/wiki/cocktail_sort)
diff --git a/dsa-solutions/Sorting-Algorithms/Counting-Sort.md b/dsa-solutions/Sorting-Algorithms/Counting-Sort.md
deleted file mode 100644
index cee880759..000000000
--- a/dsa-solutions/Sorting-Algorithms/Counting-Sort.md
+++ /dev/null
@@ -1,122 +0,0 @@
----
-id: Counting-Sort
-title: Counting Sort (Geeks for Geeks)
-sidebar_label: Counting Sort
-tags:
- - Beginner
- - Sorting Algorithms
- - Geeks for Geeks
- - CPP
- - Python
- - Java
- - JavaScript
- - DSA
-description: "This is a solution to the Counting Sort problem on Geeks for Geeks."
----
-
-## 1. What is Counting Sort?
-
-Counting Sort is a non-comparison-based sorting algorithm. It works by counting the number of occurrences of each unique element in the input array. The algorithm uses this count information to place the elements in their correct positions in the output array.
-
-## 2. Algorithm for Counting Sort
-
-1. Find the maximum element in the input array.
-2. Create a count array of size (maximum element + 1) and initialize all elements to 0.
-3. Count the occurrences of each element in the input array and store it in the count array.
-4. Modify the count array such that each element at each index stores the sum of previous counts.
-5. Output each element from the input array into the correct sorted position in the output array.
-
-## 3. How does Counting Sort work?
-
-- Counting Sort calculates the position of each element in the sorted array by using the count array.
-- The count array stores the count of each unique element.
-- By iterating through the input array and the count array, elements are placed into their correct positions in the output array.
-
-## 4. Problem Description
-
-Given an array of integers, implement the Counting Sort algorithm to sort the array in ascending order.
-
-## 5. Examples
-
-**Example 1:**
-```markdown
-Input: [4, 2, 2, 8, 3, 3, 1]
-Output: [1, 2, 2, 3, 3, 4, 8]
-
-**Example 2:**
-```markdown
-Input: [7, 4, 4, 6, 2, 1, 5, 3, 8, 5]
-Output: [1, 2, 3, 4, 4, 5, 5, 6, 7, 8]
-```
-
-**Explanation of Example 1:**
-- The initial array is [4, 2, 2, 8, 3, 3, 1].
-- Count array: [0, 1, 2, 2, 1, 0, 0, 0, 1]
-- Sorted array: [1, 2, 2, 3, 3, 4, 8]
-
-## 6. Constraints
-
-- The array can have any number of elements.
-- All elements in the array are non-negative integers.
-
-## 7. Implementation
-
-```java
-public class CountingSort {
- public static void countingSort(int arr[]) {
- int largest = Integer.MIN_VALUE;
- for (int i = 0; i < arr.length; i++) {
- largest = Math.max(largest, arr[i]);
- }
-
- int count[] = new int[largest + 1];
-
- for (int i = 0; i < arr.length; i++) {
- count[arr[i]]++;
- }
-
- int j = 0;
- for (int i = 0; i < count.length; i++) {
- while (count[i] > 0) {
- arr[j] = i;
- j++;
- count[i]--;
- }
- }
- }
-
- public static void main(String[] args) {
- int[] arr = {4, 2, 2, 8, 3, 3, 1};
- countingSort(arr);
- for (int num : arr) {
- System.out.print(num + " ");
- }
- }
-}
-```
-
-## 8. Complexity Analysis
-
-- **Time Complexity**:
- - Best case: $O(n + k)$
- - Average case: $O(n + k)$
- - Worst case: $O(n + k)$
- - where (n) is the number of elements in the input array and (k) is the range of the input.
-
-- **Space Complexity**: $O(n + k)$
-
-## 9. Advantages and Disadvantages
-
-**Advantages:**
-- Simple to implement.
-- Efficient for sorting integers when the range of the input values is not significantly greater than the number of elements.
-
-**Disadvantages:**
-- Not suitable for sorting strings or floating-point numbers.
-- The space complexity can be high if the range of input values is very large.
-
-## 10. References
-
-- **GFG Article on Counting Sort:** [Geeks for Geeks Counting Sort](https://www.geeksforgeeks.org/counting-sort/)
-- **GFG Problem** [Counting Sort Problem](https://www.geeksforgeeks.org/problems/counting-sort/1)
-- **Wikipedia Article on Counting Sort:** [Counting Sort - Wikipedia](https://en.wikipedia.org/wiki/Counting_sort)
diff --git a/dsa-solutions/Sorting-Algorithms/Cycle-Sort.md b/dsa-solutions/Sorting-Algorithms/Cycle-Sort.md
deleted file mode 100644
index 7308e6931..000000000
--- a/dsa-solutions/Sorting-Algorithms/Cycle-Sort.md
+++ /dev/null
@@ -1,208 +0,0 @@
----
-id: Cycle-Sort
-title: Cycle Sort (Geeks for Geeks)
-sidebar_label: Cycle Sort
-tags:
- - Beginner
- - Sorting Algorithms
- - Geeks for Geeks
- - CPP
- - Python
- - Java
- - JavaScript
- - DSA
-description: "This is a solution to the Cycle Sort problem on Geeks for Geeks."
----
-
-## 1. What is Cycle Sort?
-
-Cycle Sort is a comparison-based sorting algorithm that is particularly efficient when memory writes are a costly operation. The algorithm minimizes the number of memory writes to sort the array. The idea is to write each element to its correct position and hence reduce the number of write operations.
-
-## 2. Algorithm for Cycle Sort
-
-*Cycle Start:* Begin from the first element of the array.
-
-*Find Position:* For the current element, find the position where it should be placed by counting the number of elements smaller than it.
-
-*Place the Element:* Place the element in its correct position. If the element is already in its correct position, continue to the next element.
-
-*Cycle:* If the element is not in its correct position, put the displaced element to its correct position, creating a cycle of swaps until all elements are in their correct positions.
-
-*Repeat:* Repeat the process for all elements of the array.
-
-## 3. How does Cycle Sort work?
-
-Cycle Sort works by ensuring that each element is placed directly into its correct position.
-
-This is achieved by counting the number of elements smaller than the current element and placing it at the corresponding index.
-
-If an element is already in its correct position, it is skipped.
-
-The displaced element is then placed in its correct position, creating a cycle until all elements are sorted.
-
-## 4. Problem Description
-
-Given an array of integers, implement the Cycle Sort algorithm to sort the array in ascending order.
-
-
-## 5. Examples
-
-**Example 1:**
-```
-Input: [20, 40, 50, 10, 30]
-Output: [10, 20, 30, 40, 50]
-```
-**Example 2:**
-```
-Input: [64, 25, 12, 22, 11]
-Output: [11, 12, 22, 25, 64]
-```
-
-**Explanation of Example 1:**
-
--The initial array is [20, 40, 50, 10, 30]
--First cycle: Place 20 at index 1 (correct position).[10, 20, 50, 40, 30]
--Second cycle: 40 is already in the correct position.
--Third cycle: Place 50 at index 4 (correct position).[10, 20, 30, 40, 50]
--Fourth and fifth cycles: Remaining elements are already in the correct position.
--Final sorted array: [10, 20, 30, 40, 50].
-
-## 6. key constraints and characteristics of Cycle Sort:
-
-- **Memory Writes**: Minimizes the number of write operations, making it efficient where write operations are costly.
-- **Stability**: Maintains the relative order of equal elements, making it a stable sorting algorithm.
-- **Performance**:
- - Time Complexity: $O(n^2)$ in the worst case.
- - Space Complexity: $O(1)$ additional space, as it sorts in-place.
-- **Data Type**: Can be applied to any data type supporting comparison and swap operations.
-- **Use Cases**: Suitable for small datasets or scenarios requiring stable sorting with minimal writes, like embedded systems.
-- **Performance Issues**:
- - Inefficient for large datasets due to its quadratic time complexity.
- - May not perform well on datasets with many duplicates or pre-sorted data.
-
-## 7. Implementation
-
-**Java Implementation**
-```java
-public class CycleSort {
- public static void cycleSort(int[] arr) {
- int n = arr.length;
- for (int cycleStart = 0; cycleStart <= n - 2; cycleStart++) {
- int item = arr[cycleStart];
- int pos = cycleStart;
- for (int i = cycleStart + 1; i < n; i++) {
- if (arr[i] < item)
- pos++;
- }
- while (item == arr[pos])
- pos++;
- if (pos != cycleStart) {
- int temp = item;
- item = arr[pos];
- arr[pos] = temp;
- }
- while (pos != cycleStart) {
- pos = cycleStart;
- for (int i = cycleStart + 1; i < n; i++) {
- if (arr[i] < item)
- pos++;
- }
- while (item == arr[pos])
- pos++;
- if (item != arr[pos]) {
- int temp = item;
- item = arr[pos];
- arr[pos] = temp;
- }
- }
- }
- }
-
- public static void main(String[] args) {
- int[] arr = {20, 40, 50, 10, 30};
- cycleSort(arr);
- for (int num : arr) {
- System.out.print(num + " ");
- }
- }
-}
-```
-
-**Python**
-```python
-def cycle_sort(arr):
- writes = 0
-
- for cycleStart in range(0, len(arr) - 1):
- item = arr[cycleStart]
- pos = cycleStart
-
- for i in range(cycleStart + 1, len(arr)):
- if arr[i] < item:
- pos += 1
-
- while item == arr[pos]:
- pos += 1
-
- if pos != cycleStart:
- arr[pos], item = item, arr[pos]
- writes += 1
-
- while pos != cycleStart:
- pos = cycleStart
- for i in range(cycleStart + 1, len(arr)):
- if arr[i] < item:
- pos += 1
-
- while item == arr[pos]:
- pos += 1
-
- if item != arr[pos]:
- arr[pos], item = item, arr[pos]
- writes += 1
-
- return writes
-
-arr = [20, 40, 50, 10, 30]
-cycle_sort(arr)
-print(arr)
-```
-
-## 8. Complexity
-
--**Time Complexity**
- - Best Case: $O(n^2)$
- - Average Case: $O(n^2)$
- - Worst Case: $O(n^2)$
- Cycle Sort typically exhibits quadratic time complexity, where n is the number of elements in the array. This arises because each element may need to be moved multiple times to its correct position, especially in the presence of duplicates or when the array is in reverse order.
-
--**Space Complexity**
- - $O(1)$
- - Cycle Sort is an in-place sorting algorithm, meaning it requires only a constant amount of extra space for auxiliary variables such as loops and temporary variables used for swaps.
-
-
-## 9. Advantages and disadvantages
-### Advantages:
-
-- **Minimizes Writes:** Cycle Sort reduces memory writes, making it efficient where write operations are costly.
-
-- **Stable Sorting:** Preserves the order of equal elements, ensuring stability in sorting results.
-
-- **In-Place Algorithm:** Sorts elements directly within the input array, requiring minimal extra space.
-
-- **Suitable for Small Data Sets:** Efficient for small datasets or nearly sorted arrays due to direct placement of elements.
-
-### Disadvantages:
-
-- **Quadratic Time Complexity:** Has $O(n^2)$ time complexity in the worst-case scenario, limiting efficiency for large datasets.
-
-- **Not Adaptive:** Performs the same number of operations regardless of initial data order, lacking adaptability.
-
-- **May Perform Poorly with Duplicates:** Can require additional operations to handle datasets with many duplicate values.
-
-- **Limited Use Cases:** Less suitable for large or dynamic datasets where faster algorithms are more efficient, such as Quick Sort or Merge Sort.
-
-## 10. References
-
-- **GFG Article on Cycle Sort:** [Geeks for Geeks Cycle Sort](https://www.geeksforgeeks.org/cycle-sort/)
-- **Wikipedia Article on Cycle Sort:** [Cycle Sort - Wikipedia](https://en.wikipedia.org/wiki/Cycle_sort)
diff --git a/dsa-solutions/Sorting-Algorithms/Gnome_Sort.md b/dsa-solutions/Sorting-Algorithms/Gnome_Sort.md
deleted file mode 100644
index 1ff37382a..000000000
--- a/dsa-solutions/Sorting-Algorithms/Gnome_Sort.md
+++ /dev/null
@@ -1,143 +0,0 @@
----
-id: Gnome-Sort
-title: Gnome Sort (Geeks for Geeks)
-sidebar_label: Gnome Sort
-tags:
- - Beginner
- - Sorting Algorithms
- - Geeks for Geeks
- - CPP
- - Python
- - Java
- - JavaScript
- - DSA
-description: "This is a solution to the Gnome Sort problem on Geeks for Geeks."
----
-
-## 1. What is Gnome Sort?
-
-Gnome Sort is a straightforward comparison-based sorting algorithm. It iteratively steps through the list, compares each pair of adjacent elements, and swaps them if they are in the wrong order. The algorithm moves forward if elements are in the correct order, but steps backward and continues swapping until the elements are ordered correctly when a pair is out of order. This process is repeated until the entire list is sorted.
-
-## 2. Algorithm for Gnome Sort
-
-1. Start with the first element.
-2. If the current element is in the correct order (greater than or equal to the previous element), move to the next element.
-3. If the current element is in the wrong order (less than the previous element), swap them and move one step back.
-4. Repeat steps 2-3 until the end of the list is reached.
-5. If the beginning of the list is reached, move forward and continue the process.
-
-## 3. How does Gnome Sort work?
-
-- Gnome Sort works by repeatedly comparing and swapping adjacent elements if they are in the wrong order.
-- If a swap is made, it steps backward to ensure the order of all previous elements.
-- It progresses forward only when elements are in the correct order, sorting the list step by step.
-
-## 4. Problem Description
-
-Given an array of integers, implement the Gnome Sort algorithm to sort the array in ascending order.
-
-## 5. Examples
-
-**Example 1:**
-```
-Input: [64, 34, 25, 12, 22, 11, 90]
-Output: [11, 12, 22, 25, 34, 64, 90]
-```
-
-**Example 2:**
-```
-Input: [5, 1, 4, 2, 8]
-Output: [1, 2, 4, 5, 8]
-```
-
-**Explanation of Example 1:**
-- The initial array is [64, 34, 25, 12, 22, 11, 90].
-- First pass: [34, 64, 25, 12, 22, 11, 90].
-- After correcting: [34, 25, 64, 12, 22, 11, 90].
-- Continue until the array is sorted: [11, 12, 22, 25, 34, 64, 90].
-
-## 6. Constraints
-
-- The input array can contain any integers, positive or negative.
-- The size of the array can range from 1 to $10^5$ elements.
-- The sorting should be done in-place with $O(1)$ additional space.
-- The algorithm should maintain stability, meaning the relative order of equal elements should be preserved.
-
-
-## 7. Implementation
-### Gnome Sort in Java
-
-```java
-public class GnomeSort {
- public static void gnomeSort(int[] arr) {
- int index = 0;
- int n = arr.length;
-
- while (index < n) {
- if (index == 0 || arr[index] >= arr[index - 1]) {
- index++;
- } else {
- int temp = arr[index];
- arr[index] = arr[index - 1];
- arr[index - 1] = temp;
- index--;
- }
- }
- }
-
- public static void main(String[] args) {
- int[] arr = {64, 34, 25, 12, 22, 11, 90};
- gnomeSort(arr);
- for (int num : arr) {
- System.out.print(num + " ");
- }
- }
-}
-```
-
-### Gnome Sort in Python
-
-```python
-def gnome_sort(arr):
- index = 0
- n = len(arr)
-
- while index < n:
- if index == 0 or arr[index] >= arr[index - 1]:
- index += 1
- else:
- arr[index], arr[index - 1] = arr[index - 1], arr[index]
- index -= 1
-
-# Example usage
-arr = [64, 34, 25, 12, 22, 11, 90]
-gnome_sort(arr)
-print(arr)
-```
-
-## 8. Complexity Analysis
-
-- **Time Complexity**:
- - Best case: $O(n)$ (when the array is already sorted)
- - Average case: $O(n^2)$
- - Worst case: $O(n^2)$
-
-- **Space Complexity**: $O(1)$ (in-place sorting)
-
-## 9. Advantages and Disadvantages
-
-**Advantages:**
-- Simple to understand and implement.
-- Requires minimal additional space, making it space-efficient.
-- Suitable for small datasets or nearly sorted arrays.
-
-**Disadvantages:**
-- Inefficient for large datasets due to $O(n^2)$ time complexity.
-- Can perform poorly with datasets containing many duplicate values.
-- Requires multiple backward steps when elements are out of order.
-
-## 10. References
-
-- **GFG Problem:** [GFG Problem](https://www.geeksforgeeks.org/gnome-sort-a-stupid-one/)
-- **Wikipedia Article on Gnome Sort:** [Gnome Sort - Wikipedia](https://en.wikipedia.org/wiki/Gnome_sort)
-
diff --git a/dsa-solutions/Sorting-Algorithms/Heap-Sort.md b/dsa-solutions/Sorting-Algorithms/Heap-Sort.md
deleted file mode 100644
index 9c3082bd8..000000000
--- a/dsa-solutions/Sorting-Algorithms/Heap-Sort.md
+++ /dev/null
@@ -1,295 +0,0 @@
----
-id: Heap-Sort
-title: Heap Sort (Geeks for Geeks)
-sidebar_label: Heap Sort
-tags:
- - Beginner
- - Sorting Algorithms
- - Geeks for Geeks
- - CPP
- - Python
- - Java
- - JavaScript
- - DSA
-description: "This is a solution to the Heap Sort problem on Geeks for Geeks."
----
-
-## 1. What is Heap Sort?
-
-Heap sort is a comparison-based sorting technique based on Binary Heap data structure. It is similar to the selection sort where we first find the minimum element and place the minimum element at the beginning. Repeat the same process for the remaining elements.
-
-## 2. Algorithm for Heap Sort
-
-First convert the array into heap data structure using heapify, then one by one delete the root node of the Max-heap and replace it with the last node in the heap and then heapify the root of the heap. Repeat this process until size of heap is greater than 1.
-
-1. Build a heap from the given input array.
-2. Repeat the following steps until the heap contains only one element:
-
-- Swap the root element of the heap (which is the largest element) with the last element of the heap.
-- Remove the last element of the heap (which is now in the correct position).
-- Heapify the remaining elements of the heap.
-
-3. The sorted array is obtained by reversing the order of the elements in the input array.
-
-## 3. How does Heap Sort work?
-
-To understand heap sort more clearly, let’s take an unsorted array and try to sort it using heap sort.
-
-1. Build Complete Binary Tree: Build a complete binary tree from the array.
-
-2. Transform into max heap: After that, the task is to construct a tree from that unsorted array and try to convert it into max heap.
-
-3. To transform a heap into a max-heap, the parent node should always be greater than or equal to the child nodes
-
-4. Perform heap sort: Remove the maximum element in each step (i.e., move it to the end position and remove that) and then consider the remaining elements and transform it into a max heap.
-
-5. Delete the root element (10) from the max heap. In order to delete this node, try to swap it with the last node. After removing the root element, again heapify it to convert it into max heap.
-
-6. Repeat the above steps. Now remove the root again and perform heapify.
- Now when the root is removed once again it is sorted
-
-## 4. Problem Description
-
-Given an array of integers, implement the Heap Sort algorithm to sort the array in ascending order.
-
-## 5. Examples
-
-**Example 1:**
-
-```
-Input: [64, 34, 25, 12, 22, 11, 90]
-Output: [11, 12, 22, 25, 34, 64, 90]
-```
-
-**Example 2:**
-
-```
-Input: [5, 1, 4, 2, 8]
-Output: [1, 2, 4, 5, 8]
-```
-
-## 6. Constraints
-
-- The array can have any number of elements.
-- All elements in the array are integers.
-
-## 7. Implementation
-
-## Python
-
-
-
- ```python
-
-def heapify(arr, N, i):
-largest = i # Initialize largest as root
-l = 2 * i + 1 # left = 2*i + 1
-r = 2 * i + 2 # right = 2*i + 2
-
- # See if left child of root exists and is
- # greater than root
- if l < N and arr[largest] < arr[l]:
- largest = l
-
- # See if right child of root exists and is
- # greater than root
- if r < N and arr[largest] < arr[r]:
- largest = r
-
- # Change root, if needed
- if largest != i:
- arr[i], arr[largest] = arr[largest], arr[i] # swap
-
- # Heapify the root.
- heapify(arr, N, largest)
-
-# The main function to sort an array of given size
-
-def heapSort(arr):
-N = len(arr)
-
- # Build a maxheap.
- for i in range(N//2 - 1, -1, -1):
- heapify(arr, N, i)
-
- # One by one extract elements
- for i in range(N-1, 0, -1):
- arr[i], arr[0] = arr[0], arr[i] # swap
- heapify(arr, i, 0)
-
-
-```
-## C++
-
-
-
-
-
-```cpp
-
-#include
-using namespace std;
-void heapify(int arr[], int N, int i)
-{
- int largest = i;
- int l = 2 * i + 1;
- int r = 2 * i + 2;
-
-
- if (l < N && arr[l] > arr[largest])
- largest = l;
-
- if (r < N && arr[r] > arr[largest])
- largest = r;
-
-
- if (largest != i) {
- swap(arr[i], arr[largest]);
-
- heapify(arr, N, largest);
- }
-}
-
-// Main function to do heap sort
-void heapSort(int arr[], int N)
-{
-
- for (int i = N / 2 - 1; i >= 0; i--)
- heapify(arr, N, i);
- for (int i = N - 1; i > 0; i--) {
- swap(arr[0], arr[i]);
- heapify(arr, i, 0);
- }
-}
-
-```
-## Java
-
-
-
-```java
-
-public class HeapSort {
- public void sort(int arr[])
- {
- int N = arr.length;
-
- // Build heap (rearrange array)
- for (int i = N / 2 - 1; i >= 0; i--)
- heapify(arr, N, i);
-
- // One by one extract an element from heap
- for (int i = N - 1; i > 0; i--) {
- // Move current root to end
- int temp = arr[0];
- arr[0] = arr[i];
- arr[i] = temp;
-
- // call max heapify on the reduced heap
- heapify(arr, i, 0);
- }
- }
- void heapify(int arr[], int N, int i)
- {
- int largest = i; // Initialize largest as root
- int l = 2 * i + 1; // left = 2*i + 1
- int r = 2 * i + 2; // right = 2*i + 2
-
- // If left child is larger than root
- if (l < N && arr[l] > arr[largest])
- largest = l;
-
- // If right child is larger than largest so far
- if (r < N && arr[r] > arr[largest])
- largest = r;
-
- // If largest is not root
- if (largest != i) {
- int swap = arr[i];
- arr[i] = arr[largest];
- arr[largest] = swap;
-
- // Recursively heapify the affected sub-tree
- heapify(arr, N, largest);
- }
- }
-}
-
-```
-## JavaScript
-
-
-
-
-```javascript
-function sort( arr)
- {
- var N = arr.length;
-
- // Build heap (rearrange array)
- for (var i = Math.floor(N / 2) - 1; i >= 0; i--)
- heapify(arr, N, i);
-
- // One by one extract an element from heap
- for (var i = N - 1; i > 0; i--) {
- // Move current root to end
- var temp = arr[0];
- arr[0] = arr[i];
- arr[i] = temp;
-
- // call max heapify on the reduced heap
- heapify(arr, i, 0);
- }
- }
-
- // To heapify a subtree rooted with node i which is
- // an index in arr[]. n is size of heap
- function heapify(arr, N, i)
- {
- var largest = i; // Initialize largest as root
- var l = 2 * i + 1; // left = 2*i + 1
- var r = 2 * i + 2; // right = 2*i + 2
-
- // If left child is larger than root
- if (l < N && arr[l] > arr[largest])
- largest = l;
-
- // If right child is larger than largest so far
- if (r < N && arr[r] > arr[largest])
- largest = r;
-
- // If largest is not root
- if (largest != i) {
- var swap = arr[i];
- arr[i] = arr[largest];
- arr[largest] = swap;
-
- // Recursively heapify the affected sub-tree
- heapify(arr, N, largest);
- }
- }
-````
-
-
-
-
-## 8. Complexity Analysis
-
-- Time Complexity: $O(N log N)$
-- Auxiliary Space: $O(log n)$, due to the recursive call stack. However, auxiliary space can be $O(1)$ for iterative implementation.
-
-## 9. Advantages and Disadvantages
-
-**Advantages:**
-- **Efficient Time Complexity**: Heap Sort has a time complexity of $O(n log n)$ in all cases. This makes it efficient for sorting large datasets. The log n factor comes from the height of the binary heap, and it ensures that the algorithm maintains good performance even with a large number of elements.
-- **Memory Usage** – Memory usage can be minimal (by writing an iterative heapify() instead of a recursive one). So apart from what is necessary to hold the initial list of items to be sorted, it needs no additional memory space to work
-- **Simplicity** – It is simpler to understand than other equally efficient sorting algorithms because it does not use advanced computer science concepts such as recursion.
-
-**Disadvantages:**
-- **Costly**: Heap sort is costly as the constants are higher compared to merge sort even if the time complexity is $O(n Log n)$ for both.
-- **Unstable**: Heap sort is unstable. It might rearrange the relative order.
-- **Efficiency**: Heap Sort is not very efficient when working with highly complex data.
-
-## 10. References
-
-- **GFG Problem:** [GFG Problem](https://www.geeksforgeeks.org/Heap-sort/)
diff --git a/dsa-solutions/Sorting-Algorithms/Insertion-Sort.md b/dsa-solutions/Sorting-Algorithms/Insertion-Sort.md
deleted file mode 100644
index d156b4ba4..000000000
--- a/dsa-solutions/Sorting-Algorithms/Insertion-Sort.md
+++ /dev/null
@@ -1,192 +0,0 @@
----
-id: Insertion-Sort
-title: Insertion Sort (Geeks for Geeks)
-sidebar_label: Insertion Sort
-tags:
- - Beginner
- - Sorting Algorithms
- - Geeks for Geeks
- - CPP
- - Python
- - Java
- - JavaScript
- - DSA
-description: "This is a solution to the Insertion Sort problem on Geeks for Geeks."
----
-
-## 1. What is Insertion Sort?
-
-Insertion Sort is a simple comparison-based sorting algorithm that builds the final sorted array one item at a time. It is much less efficient on large lists than more advanced algorithms such as quicksort, heapsort, or merge sort.
-
-## 2. Algorithm for Insertion Sort
-
-1. Start with the first element (consider it as sorted).
-2. Pick the next element.
-3. Compare the picked element with the elements in the sorted part of the array.
-4. Shift all the elements in the sorted part that are greater than the picked element to one position to their right.
-5. Insert the picked element at its correct position.
-6. Repeat steps 2-5 until the entire array is sorted.
-
-## 3. How does Insertion Sort work?
-
-- Insertion Sort works by dividing the list into a sorted and an unsorted part.
-- It iteratively takes one element from the unsorted part and inserts it into the correct position in the sorted part.
-
-## 4. Problem Description
-
-Given an array of integers, implement the Insertion Sort algorithm to sort the array in ascending order.
-
-## 5. Examples
-
-**Example 1:**
-```
-Input: [12, 11, 13, 5, 6]
-Output: [5, 6, 11, 12, 13]
-```
-
-**Example 2:**
-```
-Input: [31, 41, 59, 26, 41, 58]
-Output: [26, 31, 41, 41, 58, 59]
-```
-
-**Explanation of Example 1:**
-- The initial array is [12, 11, 13, 5, 6].
-- First pass: [11, 12, 13, 5, 6].
-- Second pass: [11, 12, 13, 5, 6].
-- Third pass: [5, 11, 12, 13, 6].
-- Fourth pass: [5, 6, 11, 12, 13].
-
-## 6. Constraints
-
-- $The array can have any number of elements.$
-- $All elements in the array are integers.$
-
-## 7. Implementation
-
-
-
-
- ```python
- def insertion_sort(arr):
- for i in range(1, len(arr)):
- key = arr[i]
- j = i - 1
- while j >= 0 and key < arr[j]:
- arr[j + 1] = arr[j]
- j -= 1
- arr[j + 1] = key
- return arr
-
- # Example usage:
- arr = [12, 11, 13, 5, 6]
- insertion_sort(arr)
- print(arr)
- ```
-
-
-
-
- ```cpp
- #include
- #include
-
- void insertionSort(std::vector& arr) {
- int n = arr.size();
- for (int i = 1; i < n; i++) {
- int key = arr[i];
- int j = i - 1;
- while (j >= 0 && arr[j] > key) {
- arr[j + 1] = arr[j];
- j--;
- }
- arr[j + 1] = key;
- }
- }
-
- int main() {
- std::vector arr = {12, 11, 13, 5, 6};
- insertionSort(arr);
- for (int num : arr)
- std::cout << num << " ";
- return 0;
- }
- ```
-
-
-
-
- ```java
- public class InsertionSort {
- public static void insertionSort(int[] arr) {
- int n = arr.length;
- for (int i = 1; i < n; i++) {
- int key = arr[i];
- int j = i - 1;
- while (j >= 0 && arr[j] > key) {
- arr[j + 1] = arr[j];
- j = j - 1;
- }
- arr[j + 1] = key;
- }
- }
-
- public static void main(String[] args) {
- int[] arr = {12, 11, 13, 5, 6};
- insertionSort(arr);
- for (int num : arr)
- System.out.print(num + " ");
- }
- }
- ```
-
-
-
-
- ```javascript
- function insertionSort(arr) {
- let n = arr.length;
- for (let i = 1; i < n; i++) {
- let key = arr[i];
- let j = i - 1;
- while (j >= 0 && arr[j] > key) {
- arr[j + 1] = arr[j];
- j = j - 1;
- }
- arr[j + 1] = key;
- }
- return arr;
- }
-
- // Example usage:
- let arr = [12, 11, 13, 5, 6];
- insertionSort(arr);
- console.log(arr);
- ```
-
-
-
-## 8. Complexity Analysis
-
-- **Time Complexity**:
- - Best case: $O(n)$ (when the array is already sorted)
- - Average case: $O(n^2)$
- - Worst case: $O(n^2)$
-
-- **Space Complexity**: $O(1)$ (in-place sorting)
-
-## 9. Advantages and Disadvantages
-
-**Advantages:**
-- Simple to understand and implement.
-- Efficient for small datasets.
-- Adaptive: Efficient for data sets that are already substantially sorted.
-
-**Disadvantages:**
-- Inefficient for large datasets due to $O(n^2)$ time complexity.
-
-## 10. References
-
-- **GFG Problem:** [GFG Problem](https://www.geeksforgeeks.org/insertion-sort/)
-- **HackerRank Problem:** [HackerRank](https://www.hackerrank.com/challenges/insertionsort1/problem)
-- **Author's Geeks for Geeks Profile:** [MuraliDharan](https://www.geeksforgeeks.org/user/ngmuraqrdd/)
\ No newline at end of file
diff --git a/dsa-solutions/Sorting-Algorithms/Merge-Sort.md b/dsa-solutions/Sorting-Algorithms/Merge-Sort.md
deleted file mode 100644
index c95f24e81..000000000
--- a/dsa-solutions/Sorting-Algorithms/Merge-Sort.md
+++ /dev/null
@@ -1,304 +0,0 @@
----
-id: Merge-Sort
-title: Merge Sort (Geeks for Geeks)
-sidebar_label: Merge Sort
-tags:
- - Beginner
- - Sorting Algorithms
- - Geeks for Geeks
- - CPP
- - Python
- - Java
- - JavaScript
- - DSA
-description: "This is a solution to the Merge Sort problem on Geeks for Geeks."
----
-
-## 1. What is Merge Sort?
-
-Merge Sort is a Divide and Conquer algorithm. It divides the input array into two halves, calls itself for the two halves, and then merges the two sorted halves. The merge() function is used for merging two halves. The $merge(arr, l, m, r)$ is a key process that assumes that $arr[l..m]$ and $arr[m+1..r]$ are sorted and merges the two sorted sub-arrays into one.
-
-## 2. Algorithm for Merge Sort
-
-1. If the array has more than one element:
- - Find the middle point to divide the array into two halves.
- - Call mergeSort for the first half.
- - Call mergeSort for the second half.
- - Merge the two halves sorted in the previous steps.
-
-## 3. How does Merge Sort work?
-
-- Merge Sort repeatedly divides the array into halves until it can no more be divided.
-- It then combines the smaller sorted arrays into larger ones until the whole array is merged and sorted.
-
-## 4. Problem Description
-
-Given an array of integers, implement the Merge Sort algorithm to sort the array in ascending order.
-
-## 5. Examples
-
-**Example 1:**
-```
-Input: [12, 11, 13, 5, 6, 7]
-Output: [5, 6, 7, 11, 12, 13]
-```
-
-**Example 2:**
-```
-Input: [38, 27, 43, 3, 9, 82, 10]
-Output: [3, 9, 10, 27, 38, 43, 82]
-```
-## Your Task:
-
-You don't need to take the input or print anything. Your task is to complete the function merge() which takes arr[], l, m, r as its input parameters and modifies arr[] in-place such that it is sorted from position l to position r, and function mergeSort() which uses merge() to sort the array in ascending order using merge sort algorithm.
-
-Expected Time Complexity: $O(nlogn)$
-Expected Auxiliary Space: $O(n)$
-
-**Explanation of Example 1:**
-- The initial array is $[12, 11, 13, 5, 6, 7]$.
-- The array is divided into two halves: $[12, 11, 13] and [5, 6, 7]$.
-- The first half $[12, 11, 13]$ is further divided into $[12]$ and $[11, 13]$.
-- $[11, 13]$ is divided into $[11]$ and $[13]$, and then merged to $[11, 13]$.
-- $[12]$ and $[11, 13]$ are merged to form $[11, 12, 13]$.
-- Similarly, $[5, 6, 7]$ is divided and merged to form $[5, 6, 7]$.
-- Finally, $[11, 12, 13]$ and $[5, 6, 7]$ are merged to form the sorted array $[5, 6, 7, 11, 12, 13]$.
-
-## 6. Constraints
-
-- $1 <= N <= 10^5$
-- $1 <= arr[i] <= 10^5$
-
-## 7. Implementation
-
-
-
-
- ```python
- def merge_sort(arr):
- if len(arr) > 1:
- mid = len(arr) // 2
- L = arr[:mid]
- R = arr[mid:]
-
- merge_sort(L)
- merge_sort(R)
-
- i = j = k = 0
-
- while i < len(L) and j < len(R):
- if L[i] < R[j]:
- arr[k] = L[i]
- i += 1
- else:
- arr[k] = R[j]
- j += 1
- k += 1
-
- while i < len(L):
- arr[k] = L[i]
- i += 1
- k += 1
-
- while j < len(R):
- arr[k] = R[j]
- j += 1
- k += 1
-
- # Example usage:
- arr = [12, 11, 13, 5, 6, 7]
- merge_sort(arr)
- print(arr)
- ```
-
-
-
-
- ```cpp
- #include
- #include
-
- void merge(std::vector& arr, int left, int mid, int right) {
- int n1 = mid - left + 1;
- int n2 = right - mid;
-
- std::vector L(n1), R(n2);
-
- for (int i = 0; i < n1; ++i)
- L[i] = arr[left + i];
- for (int j = 0; j < n2; ++j)
- R[j] = arr[mid + 1 + j];
-
- int i = 0, j = 0, k = left;
- while (i < n1 && j < n2) {
- if (L[i] <= R[j]) {
- arr[k] = L[i];
- i++;
- } else {
- arr[k] = R[j];
- j++;
- }
- k++;
- }
-
- while (i < n1) {
- arr[k] = L[i];
- i++;
- k++;
- }
-
- while (j < n2) {
- arr[k] = R[j];
- j++;
- k++;
- }
- }
-
- void mergeSort(std::vector& arr, int left, int right) {
- if (left < right) {
- int mid = left + (right - left) / 2;
-
- mergeSort(arr, left, mid);
- mergeSort(arr, mid + 1, right);
-
- merge(arr, left, mid, right);
- }
- }
-
- int main() {
- std::vector arr = {12, 11, 13, 5, 6, 7};
- mergeSort(arr, 0, arr.size() - 1);
-
- for (int num : arr)
- std::cout << num << " ";
- return 0;
- }
- ```
-
-
-
-
- ```java
- public class MergeSort {
- public static void merge(int[] arr, int left, int mid, int right) {
- int n1 = mid - left + 1;
- int n2 = right - mid;
-
- int[] L = new int[n1];
- int[] R = new int[n2];
-
- for (int i = 0; i < n1; ++i)
- L[i] = arr[left + i];
- for (int j = 0; j < n2; ++j)
- R[j] = arr[mid + 1 + j];
-
- int i = 0, j = 0, k = left;
- while (i < n1 && j < n2) {
- if (L[i] <= R[j]) {
- arr[k] = L[i];
- i++;
- } else {
- arr[k] = R[j];
- j++;
- }
- k++;
- }
-
- while (i < n1) {
- arr[k] = L[i];
- i++;
- k++;
- }
-
- while (j < n2) {
- arr[k] = R[j];
- j++;
- k++;
- }
- }
-
- public static void mergeSort(int[] arr, int left, int right) {
- if (left < right) {
- int mid = left + (right - left) / 2;
-
- mergeSort(arr, left, mid);
- mergeSort(arr, mid + 1, right);
-
- merge(arr, left, mid, right);
- }
- }
-
- public static void main(String[] args) {
- int[] arr = {12, 11, 13, 5, 6, 7};
- mergeSort(arr, 0, arr.length - 1);
-
- for (int num : arr)
- System.out.print(num + " ");
- }
- }
- ```
-
-
-
-
- ```javascript
- function merge(left, right) {
- let result = [];
- let i = 0;
- let j = 0;
-
- while (i < left.length && j < right.length) {
- if (left[i] < right[j]) {
- result.push(left[i]);
- i++;
- } else {
- result.push(right[j]);
- j++;
- }
- }
-
- return result.concat(left.slice(i)).concat(right.slice(j));
- }
-
- function mergeSort(arr) {
- if (arr.length <= 1) {
- return arr;
- }
-
- const mid = Math.floor(arr.length / 2);
- const left = mergeSort(arr.slice(0, mid));
- const right = mergeSort(arr.slice(mid));
-
- return merge(left, right);
- }
-
- // Example usage:
- const arr = [12, 11, 13, 5, 6, 7];
- console.log(mergeSort(arr));
- ```
-
-
-
-## 8. Complexity Analysis
-
--
-
- **Time Complexity**: $O(n log n)$ in all cases (best, average, and worst) due to the divide and conquer approach.
-- **Space Complexity**: $O(n)$ due to the additional arrays used for merging.
-
-## 9. Advantages and Disadvantages
-
-**Advantages:**
-- Guarantees $O(n log n)$ time complexity for all cases.
-- Stable sort (does not change the relative order of equal elements).
-- Efficient for large datasets.
-
-**Disadvantages:**
-- Requires $O(n)$ additional space, which can be significant for large arrays.
-- The recursive implementation may lead to a large call stack for very large arrays.
-
-## 10. References
-
-- **GFG Problem:** [GFG Problem](https://www.geeksforgeeks.org/merge-sort/)
-- **HackerRank Problem:** [HackerRank](https://www.hackerrank.com/challenges/merge-sort/problem)
-- **Author's Geeks for Geeks Profile:** [MuraliDharan](https://www.geeksforgeeks.org/user/ngmuraqrdd/)
\ No newline at end of file
diff --git a/dsa-solutions/Sorting-Algorithms/Odd-even-sort.md b/dsa-solutions/Sorting-Algorithms/Odd-even-sort.md
deleted file mode 100644
index e277e5c8c..000000000
--- a/dsa-solutions/Sorting-Algorithms/Odd-even-sort.md
+++ /dev/null
@@ -1,127 +0,0 @@
----
-id: Odd-Even-Sort-Algorithm
-title: Odd-Even Sort Algorithm
-sidebar_label: Odd-Even Sort Algorithm
-tags:
- - Sorting Algorithms
- - Simple
- - CPP
- - Python
- - Java
- - JavaScript
- - DSA
-description: "This is a solution to the Odd-Even Sort Algorithm problem."
----
-
-## What is the Odd-Even Sort Algorithm?
-
-Odd-Even Sort, also known as Brick Sort, is a simple comparison-based sorting algorithm. It works by repeatedly comparing and swapping adjacent elements, alternating between odd and even indexed pairs. This process continues until the array is sorted.
-
-## Algorithm Steps
-
-1. **Initialize**:
- - Start with an unsorted array of elements.
-
-2. **Odd Phase**:
- - Compare all odd-indexed elements with their next even-indexed elements and swap them if necessary.
-
-3. **Even Phase**:
- - Compare all even-indexed elements with their next odd-indexed elements and swap them if necessary.
-
-4. **Repeat**:
- - Continue alternating between the odd and even phases until no swaps are needed in a complete pass through the array.
-
-## Complexity Analysis
-
-- **Time Complexity**: The worst-case time complexity is $O(n^2)$, where $n$ is the number of elements in the array.
-- **Space Complexity**: The space complexity is $O(1)$ since it is an in-place sorting algorithm.
-
-## Example
-
-Given an unsorted array:
-
-```
-array = [5, 3, 2, 8, 1, 4]
-```
-
-
-Using the Odd-Even Sort Algorithm:
-
-- Perform the odd and even phases alternately until the array is sorted.
-
-## Implementation
-
-
-
-
-```python
-def odd_even_sort(arr):
- n = len(arr)
- is_sorted = False
- while not is_sorted:
- is_sorted = True
- for i in range(1, n-1, 2):
- if arr[i] > arr[i + 1]:
- arr[i], arr[i + 1] = arr[i + 1], arr[i]
- is_sorted = False
- for i in range(0, n-1, 2):
- if arr[i] > arr[i + 1]:
- arr[i], arr[i + 1] = arr[i + 1], arr[i]
- is_sorted = False
- return arr
-
-# Example usage:
-array = [5, 3, 2, 8, 1, 4]
-sorted_array = odd_even_sort(array)
-print(sorted_array) # Output: [1, 2, 3, 4, 5, 8]
-```
-
-
-
-
-```cpp
-
-#include
-#include
-
-void oddEvenSort(std::vector& arr) {
- int n = arr.size();
- bool isSorted = false;
-
- while (!isSorted) {
- isSorted = true;
-
- for (int i = 1; i <= n - 2; i += 2) {
- if (arr[i] > arr[i + 1]) {
- std::swap(arr[i], arr[i + 1]);
- isSorted = false;
- }
- }
-
- for (int i = 0; i <= n - 2; i += 2) {
- if (arr[i] > arr[i + 1]) {
- std::swap(arr[i], arr[i + 1]);
- isSorted = false;
- }
- }
- }
-}
-
-int main() {
- std::vector array = {5, 3, 2, 8, 1, 4};
- oddEvenSort(array);
-
- for (int i : array) {
- std::cout << i << " ";
- }
- std::cout << std::endl; // Output: 1 2 3 4 5 8
-
- return 0;
-}
-```
-
-
-
-
-# Conclusion
-The Odd-Even Sort Algorithm is a simple and intuitive sorting technique that alternates between comparing odd and even indexed pairs. While it has a quadratic time complexity, it can be useful for small datasets or educational purposes to understand the basics of sorting algorithms.
diff --git a/dsa-solutions/Sorting-Algorithms/Pigeonhole-Sort.md b/dsa-solutions/Sorting-Algorithms/Pigeonhole-Sort.md
deleted file mode 100644
index 1b4a4994c..000000000
--- a/dsa-solutions/Sorting-Algorithms/Pigeonhole-Sort.md
+++ /dev/null
@@ -1,160 +0,0 @@
----
-id: Pigeonhole-Sort
-title: Pigeonhole Sort (Geeks for Geeks)
-sidebar_label: Pigeonhole Sort
-tags:
- - Beginner
- - Sorting Algorithms
- - Geeks for Geeks
- - CPP
- - Python
- - Java
- - JavaScript
- - DSA
-description: "This is a solution to the Pigeonhole Sort problem on Geeks for Geeks."
----
-
-## 1. What is Pigeonhole Sort?
-
-Pigeonhole Sort is a non-comparison-based sorting algorithm that is efficient when the range of possible key values is close to the number of elements to be sorted. It works by placing each element into a corresponding "pigeonhole" based on its value and then collecting the elements in order.
-
-## 2. Algorithm for Pigeonhole Sort
-
-1. Find the minimum and maximum values in the array.
-2. Calculate the range of values and create an array of pigeonholes.
-3. Iterate through the input array and place each element into its corresponding pigeonhole.
-4. Collect the elements from the pigeonholes in order, overwriting the original array.
-
-## 3. How does Pigeonhole Sort work?
-
-- Pigeonhole Sort distributes the elements into a number of buckets (pigeonholes) equal to the range of values.
-- Each element is placed in its respective bucket based on its value.
-- The elements are then collected from the buckets in order to produce a sorted array.
-
-## 4. Problem Description
-
-Given an array of integers with a known and limited range, implement the Pigeonhole Sort algorithm to sort the array in ascending order.
-
-## 5. Examples
-
-**Example 1:**
-```
-Input: [8, 3, 2, 7, 4, 6, 8]
-Output: [2, 3, 4, 6, 7, 8, 8]
-```
-
-**Example 2:**
-```
-Input: [5, 9, 1, 2, 8, 3, 7, 6, 4]
-Output: [1, 2, 3, 4, 5, 6, 7, 8, 9]
-```
-
-**Explanation of Example 1:**
-- The initial array is [8, 3, 2, 7, 4, 6, 8].
-- Create pigeonholes for each value in the range [2, 8].
-- Place each element in its corresponding pigeonhole:
- - 8 -> pigeonhole 8
- - 3 -> pigeonhole 3
- - 2 -> pigeonhole 2
- - 7 -> pigeonhole 7
- - 4 -> pigeonhole 4
- - 6 -> pigeonhole 6
- - 8 -> pigeonhole 8
-- Collect the elements from the pigeonholes in order: [2, 3, 4, 6, 7, 8, 8].
-
-## 6. Constraints
-
-- The input array can contain any integers within a known and limited range.
-- The size of the array can range from 1 to $10^5$ elements.
-- The sorting should be done in-place with O(1) additional space.
-- The algorithm should maintain stability, meaning the relative order of equal elements should be preserved.
-
-### Pigeonhole Sort in Java
-
-```java
-import java.util.Arrays;
-
-public class PigeonholeSort {
- public static void pigeonholeSort(int[] arr) {
- int min = Arrays.stream(arr).min().orElse(Integer.MIN_VALUE);
- int max = Arrays.stream(arr).max().orElse(Integer.MAX_VALUE);
- int range = max - min + 1;
-
- // Create pigeonholes
- int[] holes = new int[range];
-
- // Populate the pigeonholes
- for (int num : arr) {
- holes[num - min]++;
- }
-
- // Collect elements from pigeonholes
- int index = 0;
- for (int i = 0; i < range; i++) {
- while (holes[i]-- > 0) {
- arr[index++] = i + min;
- }
- }
- }
-
- public static void main(String[] args) {
- int[] arr = {8, 3, 2, 7, 4, 6, 8};
- pigeonholeSort(arr);
- System.out.println(Arrays.toString(arr));
- }
-}
-```
-
-### Pigeonhole Sort in Python
-
-```python
-def pigeonhole_sort(arr):
- min_val = min(arr)
- max_val = max(arr)
- range_of_values = max_val - min_val + 1
-
- # Create pigeonholes
- holes = [0] * range_of_values
-
- # Populate the pigeonholes
- for num in arr:
- holes[num - min_val] += 1
-
- # Collect elements from pigeonholes
- index = 0
- for i in range(range_of_values):
- while holes[i] > 0:
- arr[index] = i + min_val
- index += 1
- holes[i] -= 1
-
-# Example usage
-arr = [8, 3, 2, 7, 4, 6, 8]
-pigeonhole_sort(arr)
-print(arr)
-```
-
-## 8. Complexity Analysis
-
-- **Time Complexity**:
- - Best case: $O(n + k)$ where $k$ is the range of values (when the array is nearly sorted or uniformly distributed)
- - Average case: $O(n + k)$
- - Worst case: $O(n + k)$ (when all elements fall into the same pigeonhole)
-
-- **Space Complexity**: $O(n + k)$ where $n$ is the number of elements and $k$ is the range of values
-
-## 9. Advantages and Disadvantages
-
-**Advantages:**
-- Efficient for sorting when the range of possible key values $k$ is not significantly larger than the number of elements $n$.
-- Simple to implement and understand.
-
-**Disadvantages:**
-- Space complexity can be an issue for large ranges of values.
-- Not suitable for datasets where the range $k$ is much larger than $n$, as it would lead to inefficient memory usage.
-- Performs poorly with highly skewed or clustered distributions of elements.
-
-## 10. References
-
-- **GFG Article on Pigeonhole Sort:** [Geeks for Geeks Cocktail Sort](https://www.geeksforgeeks.org/pigeonhole-sort/)
-- **Wikipedia Article on Pigeonhole Sort:** [Pigeonhole Sort - Wikipedia](https://en.wikipedia.org/wiki/Pigeonhole_sort)
diff --git a/dsa-solutions/Sorting-Algorithms/Quick-Sort.md b/dsa-solutions/Sorting-Algorithms/Quick-Sort.md
deleted file mode 100644
index 297a81542..000000000
--- a/dsa-solutions/Sorting-Algorithms/Quick-Sort.md
+++ /dev/null
@@ -1,226 +0,0 @@
----
-id: Quick-Sort
-title: Quick Sort (Geeks for Geeks)
-sidebar_label: Quick Sort
-tags:
- - Beginner
- - Sorting Algorithms
- - Geeks for Geeks
- - CPP
- - Python
- - Java
- - JavaScript
- - DSA
-description: "This is a solution to the Quick Sort problem on Geeks for Geeks."
----
-
-## 1. What is Quick Sort?
-
-Quick Sort is a Divide and Conquer algorithm. It picks an element as a pivot and partitions the given array around the picked pivot. There are different versions of Quick Sort that pick the pivot in different ways:
-- Always pick the first element as the pivot.
-- Always pick the last element as the pivot.
-- Pick a random element as the pivot.
-- Pick the median as the pivot.
-
-## 2. Algorithm for Quick Sort
-
-1. Choose a pivot element from the array.
-2. Partition the array into two sub-arrays: elements less than the pivot and elements greater than the pivot.
-3. Recursively apply the above steps to the sub-arrays.
-4. Combine the results to get the sorted array.
-
-## 3. How does Quick Sort work?
-
-- Quick Sort recursively sorts elements before and after partition.
-- It selects a pivot and partitions the array such that elements less than the pivot come before it, and elements greater than the pivot come after it.
-
-## 4. Problem Description
-
-Given an array of integers, implement the Quick Sort algorithm to sort the array in ascending order.
-
-## 5. Examples
-
-**Example 1:**
-```
-Input: [10, 7, 8, 9, 1, 5]
-Output: [1, 5, 7, 8, 9, 10]
-```
-
-**Example 2:**
-```
-Input: [38, 27, 43, 3, 9, 82, 10]
-Output: [3, 9, 10, 27, 38, 43, 82]
-```
-
-**Explanation of Example 1:**
-- The initial array is [10, 7, 8, 9, 1, 5].
-- Select 5 as the pivot.
-- Partition the array: [1, 5, 8, 9, 10, 7].
-- Recursively sort the left part [1] and the right part [8, 9, 10, 7].
-- The final sorted array is [1, 5, 7, 8, 9, 10].
-
-## 6. Constraints
-
-- $The array can have any number of elements.$
-- $All elements in the array are integers.$
-
-## 7. Implementation
-
-
-
-
- ```python
- def partition(arr, low, high):
- pivot = arr[high]
- i = low - 1
- for j in range(low, high):
- if arr[j] < pivot:
- i += 1
- arr[i], arr[j] = arr[j], arr[i]
- arr[i + 1], arr[high] = arr[high], arr[i + 1]
- return i + 1
-
- def quick_sort(arr, low, high):
- if low < high:
- pi = partition(arr, low, high)
- quick_sort(arr, low, pi - 1)
- quick_sort(arr, pi + 1, high)
-
- # Example usage:
- arr = [10, 7, 8, 9, 1, 5]
- quick_sort(arr, 0, len(arr) - 1)
- print(arr)
- ```
-
-
-
-
- ```cpp
- #include
- #include
-
- int partition(std::vector& arr, int low, int high) {
- int pivot = arr[high];
- int i = low - 1;
- for (int j = low; j < high; j++) {
- if (arr[j] < pivot) {
- i++;
- std::swap(arr[i], arr[j]);
- }
- }
- std::swap(arr[i + 1], arr[high]);
- return i + 1;
- }
-
- void quickSort(std::vector& arr, int low, int high) {
- if (low < high) {
- int pi = partition(arr, low, high);
- quickSort(arr, low, pi - 1);
- quickSort(arr, pi + 1, high);
- }
- }
-
- int main() {
- std::vector arr = {10, 7, 8, 9, 1, 5};
- quickSort(arr, 0, arr.size() - 1);
- for (int num : arr)
- std::cout << num << " ";
- return 0;
- }
- ```
-
-
-
-
- ```java
- public class QuickSort {
- public static int partition(int[] arr, int low, int high) {
- int pivot = arr[high];
- int i = (low - 1);
- for (int j = low; j < high; j++) {
- if (arr[j] < pivot) {
- i++;
- int temp = arr[i];
- arr[i] = arr[j];
- arr[j] = temp;
- }
- }
- int temp = arr[i + 1];
- arr[i + 1] = arr[high];
- arr[high] = temp;
- return i + 1;
- }
-
- public static void quickSort(int[] arr, int low, int high) {
- if (low < high) {
- int pi = partition(arr, low, high);
- quickSort(arr, low, pi - 1);
- quickSort(arr, pi + 1, high);
- }
- }
-
- public static void main(String[] args) {
- int[] arr = {10, 7, 8, 9, 1, 5};
- quickSort(arr, 0, arr.length - 1);
- for (int num : arr)
- System.out.print(num + " ");
- }
- }
- ```
-
-
-
-
- ```javascript
- function partition(arr, low, high) {
- let pivot = arr[high];
- let i = low - 1;
- for (let j = low; j < high; j++) {
- if (arr[j] < pivot) {
- i++;
- [arr[i], arr[j]] = [arr[j], arr[i]];
- }
- }
- [arr[i + 1], arr[high]] = [arr[high], arr[i + 1]];
- return i + 1;
- }
-
- function quickSort(arr, low, high) {
- if (low < high) {
- let pi = partition(arr, low, high);
- quickSort(arr, low, pi - 1);
- quickSort(arr, pi + 1, high);
- }
- }
-
- // Example usage:
- let arr = [10, 7, 8, 9, 1, 5];
- quickSort(arr, 0, arr.length - 1);
- console.log(arr);
- ```
-
-
-
-## 8. Complexity Analysis
-
-- **Time Complexity**:
- - Best case: $O(n log n)$
- - Average case: $O(n log n)$
- - Worst case: $O(n^2)$ (occurs when the smallest or largest element is always chosen as the pivot)
-
-- **Space Complexity**: $O(log n)$ for the recursive stack space.
-
-## 9. Advantages and Disadvantages
-
-**Advantages:**
-- In-place sorting algorithm.
-- Average-case time complexity is $O(n log n)$.
-
-**Disadvantages:**
-- Worst-case time complexity is $O(n^2)$, although this can be mitigated with good pivot selection strategies like randomized or median-of-three.
-
-## 10. References
-
-- **GFG Problem:** [GFG Problem](https://www.geeksforgeeks.org/quick-sort/)
-- **HackerRank Problem:** [HackerRank](https://www.hackerrank.com/challenges/quicksort1/problem)
-- **Author's Geeks for Geeks Profile:** [MuraliDharan](https://www.geeksforgeeks.org/user/ngmuraqrdd/)
\ No newline at end of file
diff --git a/dsa-solutions/Sorting-Algorithms/Radix-Sort.md b/dsa-solutions/Sorting-Algorithms/Radix-Sort.md
deleted file mode 100644
index a9c390218..000000000
--- a/dsa-solutions/Sorting-Algorithms/Radix-Sort.md
+++ /dev/null
@@ -1,257 +0,0 @@
----
-id: Radix-Sort
-title: Radix Sort (Geeks for Geeks)
-sidebar_label: Radix Sort
-tags:
- - Intermediate
- - Sorting Algorithm
- - CPP
- - Python
- - Java
- - JavaScript
- - DSA
-description: "This is a solution to the Radix Sort problem"
----
-
-## 1. What is Radix Sort?
-
-Radix Sort is a non-comparative integer sorting algorithm that sorts numbers by processing individual digits. It processes digits starting from the least significant digit to the most significant digit (LSD Radix Sort).
-
-## 2. Algorithm for Radix Sort
-
-1. Find the maximum number in the array to determine the number of digits.
-2. Start from the least significant digit and use a stable sorting algorithm to sort the array based on the current digit.
-3. Repeat the process for each digit until all digits are processed.
-
-## 3. How does Radix Sort work?
-
-- Radix Sort processes each digit of the numbers starting from the least significant digit.
-- It uses Counting Sort as a subroutine to sort the digits, ensuring the algorithm remains stable.
-- By processing each digit and leveraging the stability of Counting Sort, Radix Sort ensures the overall order is maintained.
-
-## 4. Problem Description
-
-Given an array of integers, implement the Radix Sort algorithm to sort the array in ascending order.
-
-## 5. Examples
-
-**Example 1:**
-Input: [170, 45, 75, 90, 802, 24, 2, 66]
-Output: [2, 24, 45, 66, 75, 90, 170, 802]
-
-**Example 2:**
-Input: [3, 6, 9, 1, 4, 7, 8, 2, 5]
-Output: [1, 2, 3, 4, 5, 6, 7, 8, 9]
-
-
-## 6. Constraints
-
-- The array can have any number of elements.
-- All elements in the array are non-negative integers.
-
-## 7. Implementation
-
-
-
-
-```python
-
- def counting_sort(arr, exp):
- n = len(arr)
- output = [0] * n
- count = [0] * 10
-
- for i in range(n):
- index = arr[i] // exp
- count[index % 10] += 1
-
- for i in range(1, 10):
- count[i] += count[i - 1]
-
- i = n - 1
- while i >= 0:
- index = arr[i] // exp
- output[count[index % 10] - 1] = arr[i]
- count[index % 10] -= 1
- i -= 1
-
- for i in range(n):
- arr[i] = output[i]
-
- def radix_sort(arr):
- max_val = max(arr)
- exp = 1
- while max_val // exp > 0:
- counting_sort(arr, exp)
- exp *= 10
- return arr
-
- # Example usage:
- arr = [170, 45, 75, 90, 802, 24, 2, 66]
- radix_sort(arr)
- print(arr)
-```
-
-
-
-
-```cpp
-#include
-#include
-#include
-void countingSort(std::vector& arr, int exp) {
-int n = arr.size();
-std::vector output(n);
-int count[10] = {0};
-for (int i = 0; i < n; i++) {
- int index = (arr[i] / exp) % 10;
- count[index]++;
-}
-for (int i = 1; i < 10; i++) {
- count[i] += count[i - 1];
-}
-
-for (int i = n - 1; i >= 0; i--) {
- int index = (arr[i] / exp) % 10;
- output[count[index] - 1] = arr[i];
- count[index]--;
-}
-
-for (int i = 0; i < n; i++) {
- arr[i] = output[i];
-}
-}
-
-void radixSort(std::vector& arr) {
-int maxVal = *max_element(arr.begin(), arr.end());
-for (int exp = 1; maxVal / exp > 0; exp *= 10) {
-countingSort(arr, exp);
-}
-}
-
-int main() {
-std::vector arr = {170, 45, 75, 90, 802, 24, 2, 66};
-radixSort(arr);
-for (int num : arr) {
-std::cout << num << " ";
-}
-return 0;
-}
-```
-
-
-
-
-
-```java
-
- import java.util.Arrays;
-
- public class RadixSort {
- public static void countingSort(int[] arr, int exp) {
- int n = arr.length;
- int[] output = new int[n];
- int[] count = new int[10];
- Arrays.fill(count, 0);
-
- for (int i = 0; i < n; i++) {
- int index = (arr[i] / exp) % 10;
- count[index]++;
- }
-
- for (int i = 1; i < 10; i++) {
- count[i] += count[i - 1];
- }
-
- for (int i = n - 1; i >= 0; i--) {
- int index = (arr[i] / exp) % 10;
- output[count[index] - 1] = arr[i];
- count[index]--;
- }
-
- for (int i = 0; i < n; i++) {
- arr[i] = output[i];
- }
- }
-
- public static void radixSort(int[] arr) {
- int maxVal = Arrays.stream(arr).max().getAsInt();
- for (int exp = 1; maxVal / exp > 0; exp *= 10) {
- countingSort(arr, exp);
- }
- }
-
- public static void main(String[] args) {
- int[] arr = {170, 45, 75, 90, 802, 24, 2, 66};
- radixSort(arr);
- for (int num : arr) {
- System.out.print(num + " ");
- }
- }
-}
-
-```
-
-
-
-```javascript
- function countingSort(arr, exp) {
- let n = arr.length;
- let output = new Array(n).fill(0);
- let count = new Array(10).fill(0);
- for (let i = 0; i < n; i++) {
- let index = Math.floor(arr[i] / exp) % 10;
- count[index]++;
- }
-
- for (let i = 1; i < 10; i++) {
- count[i] += count[i - 1];
- }
-
- for (let i = n - 1; i >= 0; i--) {
- let index = Math.floor(arr[i] / exp) % 10;
- output[count[index] - 1] = arr[i];
- count[index]--;
- }
-
- for (let i = 0; i < n; i++) {
- arr[i] = output[i];
- }
-}
-
-function radixSort(arr) {
-let maxVal = Math.max(...arr);
-for (let exp = 1; Math.floor(maxVal / exp) > 0; exp *= 10) {
-countingSort(arr, exp);
-}
-return arr;
-}
-
-// Example usage:
-let arr = [170, 45, 75, 90, 802, 24, 2, 66];
-radixSort(arr);
-console.log(arr);
-```
-
-
-
-
-## 8. Complexity Analysis
-
-- **Time Complexity**:
-- Best case: $O(nk)$
-- Average case: $O(nk)$
-- Worst case: $O(nk)$
-- where n is the number of elements and k is the number of digits in the largest number.
-
-- **Space Complexity**: $O(n + k)$
-
-## 9. Advantages and Disadvantages
-
-**Advantages:**
-- Radix Sort is efficient for sorting large lists of numbers.
-- It is not comparison-based and can outperform comparison-based algorithms for large datasets with small keys.
-
-**Disadvantages:**
-- Radix Sort requires additional memory for sorting.
-- It is less flexible as it is designed specifically for integers and strings.
diff --git a/dsa-solutions/Sorting-Algorithms/Selection-Sort.md b/dsa-solutions/Sorting-Algorithms/Selection-Sort.md
deleted file mode 100644
index 3cc14f5c8..000000000
--- a/dsa-solutions/Sorting-Algorithms/Selection-Sort.md
+++ /dev/null
@@ -1,193 +0,0 @@
----
-id: Selection-Sort
-title: Selection Sort (Geeks for Geeks)
-sidebar_label: Selection Sort
-tags:
- - Beginner
- - Sorting Algorithms
- - Geeks for Geeks
- - CPP
- - Python
- - Java
- - JavaScript
- - DSA
-description: "This is a solution to the Selection Sort problem on Geeks for Geeks."
----
-
-## 1. What is Selection Sort?
-
-Selection Sort is a simple comparison-based sorting algorithm. It works by dividing the input list into two parts: a sorted sublist of items which is built up from left to right, and a sublist of the remaining unsorted items. The algorithm repeatedly selects the smallest (or largest) element from the unsorted sublist, swaps it with the leftmost unsorted element, and moves the sublist boundaries one element to the right.
-
-## 2. Algorithm for Selection Sort
-
-1. Start with the first element as the minimum.
-2. Traverse through the list to find the minimum element in the unsorted part.
-3. Swap the found minimum element with the first element.
-4. Move the boundary of the sorted part one element to the right.
-5. Repeat steps 2-4 for all elements in the list until the entire array is sorted.
-
-## 3. How does Selection Sort work?
-
-- Selection Sort works by repeatedly finding the minimum element from the unsorted part of the list and placing it at the beginning.
-- This process is repeated for each position in the list until it is completely sorted.
-
-## 4. Problem Description
-
-Given an array of integers, implement the Selection Sort algorithm to sort the array in ascending order.
-
-## 5. Examples
-
-**Example 1:**
-```
-Input: [64, 25, 12, 22, 11]
-Output: [11, 12, 22, 25, 64]
-```
-
-**Example 2:**
-```
-Input: [29, 10, 14, 37, 13]
-Output: [10, 13, 14, 29, 37]
-```
-
-**Explanation of Example 1:**
-- The initial array is [64, 25, 12, 22, 11].
-- First pass: [11, 25, 12, 22, 64].
-- Second pass: [11, 12, 25, 22, 64].
-- Third pass: [11, 12, 22, 25, 64].
-- Continue until the array is sorted: [11, 12, 22, 25, 64].
-
-## 6. Constraints
-
-- $The array can have any number of elements.$
-- $All elements in the array are integers.$
-
-## 7. Implementation
-
-
-
-
- ```python
- def selection_sort(arr):
- n = len(arr)
- for i in range(n):
- min_idx = i
- for j in range(i + 1, n):
- if arr[j] < arr[min_idx]:
- min_idx = j
- arr[i], arr[min_idx] = arr[min_idx], arr[i]
- return arr
-
- # Example usage:
- arr = [64, 25, 12, 22, 11]
- selection_sort(arr)
- print(arr)
- ```
-
-
-
-
- ```cpp
- #include
- #include
-
- void selectionSort(std::vector& arr) {
- int n = arr.size();
- for (int i = 0; i < n - 1; i++) {
- int min_idx = i;
- for (int j = i + 1; j < n; j++) {
- if (arr[j] < arr[min_idx]) {
- min_idx = j;
- }
- }
- std::swap(arr[min_idx], arr[i]);
- }
- }
-
- int main() {
- std::vector arr = {64, 25, 12, 22, 11};
- selectionSort(arr);
- for (int num : arr)
- std::cout << num << " ";
- return 0;
- }
- ```
-
-
-
-
- ```java
- public class SelectionSort {
- public static void selectionSort(int[] arr) {
- int n = arr.length;
- for (int i = 0; i < n - 1; i++) {
- int min_idx = i;
- for (int j = i + 1; j < n; j++) {
- if (arr[j] < arr[min_idx]) {
- min_idx = j;
- }
- }
- int temp = arr[min_idx];
- arr[min_idx] = arr[i];
- arr[i] = temp;
- }
- }
-
- public static void main(String[] args) {
- int[] arr = {64, 25, 12, 22, 11};
- selectionSort(arr);
- for (int num : arr)
- System.out.print(num + " ");
- }
- }
- ```
-
-
-
-
- ```javascript
- function selectionSort(arr) {
- let n = arr.length;
- for (let i = 0; i < n - 1; i++) {
- let min_idx = i;
- for (let j = i + 1; j < n; j++) {
- if (arr[j] < arr[min_idx]) {
- min_idx = j;
- }
- }
- [arr[i], arr[min_idx]] = [arr[min_idx], arr[i]];
- }
- return arr;
- }
-
- // Example usage:
- let arr = [64, 25, 12, 22, 11];
- selectionSort(arr);
- console.log(arr);
- ```
-
-
-
-## 8. Complexity Analysis
-
-- **Time Complexity**:
- - Best case: $O(n^2)$
- - Average case: $O(n^2)$
- - Worst case: $O(n^2)$
-
-- **Space Complexity**: $O(1)$ (in-place sorting)
-
-## 9. Advantages and Disadvantages
-
-**Advantages:**
-- Simple to understand and implement.
-- Performs well on small datasets.
-
-**Disadvantages:**
-- Inefficient for large datasets due to $O(n^2)$ time complexity.
-- Does not adapt to the existing order of elements.
-
-## 10. References
-
-- **GFG Problem:** [GFG Problem](https://www.geeksforgeeks.org/selection-sort/)
-- **HackerRank Problem:** [HackerRank](https://www.hackerrank.com/challenges/insertionsort1/problem)
-- **Author's Geeks for Geeks Profile:** [MuraliDharan](https://www.geeksforgeeks.org/user/ngmuraqrdd/)
\ No newline at end of file
diff --git a/dsa-solutions/Sorting-Algorithms/Shell-Sort.md b/dsa-solutions/Sorting-Algorithms/Shell-Sort.md
deleted file mode 100644
index a48c202aa..000000000
--- a/dsa-solutions/Sorting-Algorithms/Shell-Sort.md
+++ /dev/null
@@ -1,194 +0,0 @@
----
-id: Shell-Sort
-title: Shell Sort (Geeks for Geeks)
-sidebar_label: Shell Sort
-tags:
- - Beginner
- - Sorting Algorithms
- - Geeks for Geeks
- - CPP
- - Python
- - Java
- - JavaScript
- - DSA
-description: "This is a solution to the Shell Sort problem on Geeks for Geeks."
----
-
-## 1. What is Shell Sort?
-
-Shell Sort is an in-place comparison-based sorting algorithm. It can be seen as either a generalization of sorting by exchange (bubble sort) or sorting by insertion (insertion sort). The method starts by sorting pairs of elements far apart from each other, then progressively reducing the gap between elements to be compared.
-
-## 2. Algorithm for Shell Sort
-
-1. Start with a large gap between elements and reduce the gap until there is no gap.
-2. Perform a gapped insertion sort for each gap size. The algorithm uses insertion sort to sort elements that are a certain gap distance apart.
-3. Reduce the gap and repeat the process until the gap becomes zero.
-
-## 3. How does Shell Sort work?
-
-- Shell Sort works by comparing elements that are far apart, then progressively reducing the gap between elements.
-- This allows elements to move quickly towards their correct position.
-
-## 4. Problem Description
-
-Given an array of integers, implement the Shell Sort algorithm to sort the array in ascending order.
-
-## 5. Examples
-
-**Example 1:**
-```
-Input: [12, 34, 54, 2, 3]
-Output: [2, 3, 12, 34, 54]
-```
-
-**Example 2:**
-```
-Input: [37, 45, 29, 8, 12, 88, -3]
-Output: [-3, 8, 12, 29, 37, 45, 88]
-```
-
-**Explanation of Example 1:**
-- The initial array is [12, 34, 54, 2, 3].
-- With a gap of 2, the array becomes [12, 34, 2, 3, 54].
-- With a gap of 1, the array becomes [2, 3, 12, 34, 54].
-
-## 6. Constraints
-
-- $The array can have any number of elements.$
-- $All elements in the array are integers.$
-
-## 7. Implementation
-
-
-
-
- ```python
- def shell_sort(arr):
- n = len(arr)
- gap = n // 2
- while gap > 0:
- for i in range(gap, n):
- temp = arr[i]
- j = i
- while j >= gap and arr[j - gap] > temp:
- arr[j] = arr[j - gap]
- j -= gap
- arr[j] = temp
- gap //= 2
- return arr
-
- # Example usage:
- arr = [12, 34, 54, 2, 3]
- shell_sort(arr)
- print(arr)
- ```
-
-
-
-
- ```cpp
- #include
- #include
-
- void shellSort(std::vector& arr) {
- int n = arr.size();
- for (int gap = n / 2; gap > 0; gap /= 2) {
- for (int i = gap; i < n; i++) {
- int temp = arr[i];
- int j;
- for (j = i; j >= gap && arr[j - gap] > temp; j -= gap) {
- arr[j] = arr[j - gap];
- }
- arr[j] = temp;
- }
- }
- }
-
- int main() {
- std::vector arr = {12, 34, 54, 2, 3};
- shellSort(arr);
- for (int num : arr)
- std::cout << num << " ";
- return 0;
- }
- ```
-
-
-
-
- ```java
- public class ShellSort {
- public static void shellSort(int[] arr) {
- int n = arr.length;
- for (int gap = n / 2; gap > 0; gap /= 2) {
- for (int i = gap; i < n; i++) {
- int temp = arr[i];
- int j;
- for (j = i; j >= gap && arr[j - gap] > temp; j -= gap) {
- arr[j] = arr[j - gap];
- }
- arr[j] = temp;
- }
- }
- }
-
- public static void main(String[] args) {
- int[] arr = {12, 34, 54, 2, 3};
- shellSort(arr);
- for (int num : arr)
- System.out.print(num + " ");
- }
- }
- ```
-
-
-
-
- ```javascript
- function shellSort(arr) {
- let n = arr.length;
- for (let gap = Math.floor(n / 2); gap > 0; gap = Math.floor(gap / 2)) {
- for (let i = gap; i < n; i++) {
- let temp = arr[i];
- let j;
- for (j = i; j >= gap && arr[j - gap] > temp; j -= gap) {
- arr[j] = arr[j - gap];
- }
- arr[j] = temp;
- }
- }
- return arr;
- }
-
- // Example usage:
- let arr = [12, 34, 54, 2, 3];
- shellSort(arr);
- console.log(arr);
- ```
-
-
-
-## 8. Complexity Analysis
-
-- **Time Complexity**:
- - Best case: $O(n log n)$
- - Average case: $O(n^(3/2))$
- - Worst case: $O(n^2)$
-
-- **Space Complexity**: $O(1)$ (in-place sorting)
-
-## 9. Advantages and Disadvantages
-
-**Advantages:**
-- More efficient than bubble sort and insertion sort for large lists.
-- Simple to understand and implement.
-
-**Disadvantages:**
-- More complex than bubble sort and insertion sort.
-- The performance depends on the gap sequence used.
-
-## 10. References
-
-- **GFG Problem:** [GFG Problem](https://www.geeksforgeeks.org/shellsort/)
-- **HackerRank Problem:** [HackerRank](https://www.hackerrank.com/challenges/sorting/problem)
-- **Author's Geeks for Geeks Profile:** [MuraliDharan](https://www.geeksforgeeks.org/user/ngmuraqrdd/)
diff --git a/dsa-solutions/Sorting-Algorithms/Stooge-Sort.md b/dsa-solutions/Sorting-Algorithms/Stooge-Sort.md
deleted file mode 100644
index 8ccf61033..000000000
--- a/dsa-solutions/Sorting-Algorithms/Stooge-Sort.md
+++ /dev/null
@@ -1,124 +0,0 @@
----
-id: Stooge-Sort-Algorithm
-title: Stooge Sort Algorithm
-sidebar_label: Stooge Sort Algorithm
-tags:
- - Sorting Algorithms
- - Simple
- - CPP
- - Python
- - Java
- - JavaScript
- - DSA
-description: "This is a solution to the Stooge Sort Algorithm problem."
----
-
-## What is the Stooge Sort Algorithm?
-
-Stooge Sort is a simple and recursive sorting algorithm. It is known for its high time complexity and is mostly used for educational purposes to understand recursive sorting techniques.
-
-## Algorithm Steps
-
-1. **Base Case**:
- - If the array has only one element or the first element is less than or equal to the last element, return.
-
-2. **Swapping**:
- - If the first element is greater than the last element, swap them.
-
-3. **Recursive Sort**:
- - Recursively sort the first two-thirds of the array.
- - Recursively sort the last two-thirds of the array.
- - Recursively sort the first two-thirds of the array again.
-
-## Complexity Analysis
-
-- **Time Complexity**: $O(n^{\log_3 2})$ which is approximately $O(n^{2.7095})$.
-- **Space Complexity**: $O(n)$ due to the recursive call stack.
-
-## Example
-
-Given an unsorted array:
-
-```
-array = [4, 3, 2, 1]
-```
-
-
-Using the Stooge Sort Algorithm:
-
-- Sort the first two-thirds: `[4, 3, 2]` -> `[3, 4, 2]` -> `[3, 2, 4]` -> `[2, 3, 4]`
-- Sort the last two-thirds: `[3, 2, 1]` -> `[2, 1, 3]` -> `[1, 2, 3]`
-- Sort the first two-thirds again: `[4, 3, 2]` -> `[3, 4, 2]` -> `[3, 2, 4]` -> `[2, 3, 4]`
-- The array becomes `[1, 2, 3, 4]`.
-
-## Implementation
-
-
-
-
-```python
-def stooge_sort(arr, l, h):
- if l >= h:
- return
-
- # Swap if the first element is greater than the last element
- if arr[l] > arr[h]:
- arr[l], arr[h] = arr[h], arr[l]
-
- # Recursively sort the first two-thirds, last two-thirds, and first two-thirds again
- if h - l + 1 > 2:
- t = (h - l + 1) // 3
- stooge_sort(arr, l, h - t)
- stooge_sort(arr, l + t, h)
- stooge_sort(arr, l, h - t)
-
-# Example usage:
-array = [4, 3, 2, 1]
-stooge_sort(array, 0, len(array) - 1)
-print(array) # Output: [1, 2, 3, 4]
-```
-
-
-
-
-```cpp
-
-#include
-#include
-
-void stoogeSort(std::vector& arr, int l, int h) {
- if (l >= h)
- return;
-
- // Swap if the first element is greater than the last element
- if (arr[l] > arr[h]) {
- std::swap(arr[l], arr[h]);
- }
-
- // Recursively sort the first two-thirds, last two-thirds, and first two-thirds again
- if (h - l + 1 > 2) {
- int t = (h - l + 1) / 3;
- stoogeSort(arr, l, h - t);
- stoogeSort(arr, l + t, h);
- stoogeSort(arr, l, h - t);
- }
-}
-
-int main() {
- std::vector array = {4, 3, 2, 1};
- stoogeSort(array, 0, array.size() - 1);
-
- for (int num : array) {
- std::cout << num << " ";
- }
- std::cout << std::endl; // Output: 1 2 3 4
-
- return 0;
-}
-```
-
-
-
-
-## Conclusion
-Stooge Sort is a straightforward but inefficient sorting algorithm. It is not practical for large datasets due to its high time complexity but can be useful for educational purposes to understand recursive sorting techniques.
diff --git a/dsa-solutions/Sorting-Algorithms/Topological-sort.md b/dsa-solutions/Sorting-Algorithms/Topological-sort.md
deleted file mode 100644
index 69e51aae1..000000000
--- a/dsa-solutions/Sorting-Algorithms/Topological-sort.md
+++ /dev/null
@@ -1,264 +0,0 @@
----
-id: Topological-Sort
-title: Topological Sort (Geeks for Geeks)
-sidebar_label: Topological Sort
-tags:
- - Intermediate
- - Sorting Algorithms
- - Geeks for Geeks
- - CPP
- - Python
- - Java
- - JavaScript
- - DSA
-description: "This is a solution to the Topological Sort problem on Geeks for Geeks."
----
-
-## 1. What is Topological Sort?
-
-Topological Sort is a linear ordering of vertices in a Directed Acyclic Graph (DAG) such that for every directed edge `u -> v`, vertex `u` comes before `v` in the ordering.
-
-## 2. Algorithm for Topological Sort
-
-1. Identify vertices with no incoming edges (indegree 0).
-2. Remove these vertices and their outgoing edges from the graph.
-3. Repeat steps 1 and 2 until all vertices are removed.
-4. If the graph has a cycle, topological sort is not possible.
-
-## 3. How does Topological Sort work?
-
-- It repeatedly removes nodes with no incoming edges, adding them to the sorted list.
-- It ensures that each node is processed only after all its dependencies are processed.
-
-## 4. Problem Description
-
-Given a Directed Acyclic Graph (DAG), implement the Topological Sort algorithm to order the vertices.
-
-## 5. Examples
-
-**Example 1:**
-```
-Input: Graph with edges [(5, 2), (5, 0), (4, 0), (4, 1), (2, 3), (3, 1)]
-Output: [5, 4, 2, 3, 1, 0] or [4, 5, 2, 3, 1, 0]
-```
-
-
-**Example 2:**
-```
-Input: Graph with edges [(1, 2), (2, 3), (3, 4)]
-Output: [1, 2, 3, 4]
-```
-
-
-**Explanation of Example 1:**
-- The graph can be visualized as:
-```
-5 → 2 → 3 → 1
-5 → 0
-4 → 0
-4 → 1
-```
-- One valid topological ordering is [5, 4, 2, 3, 1, 0].
-
-## 6. Constraints
-
-- The graph must be a Directed Acyclic Graph (DAG).
-
-## 7. Implementation
-
-**Python**
-```python
-from collections import defaultdict, deque
-
-def topological_sort(vertices, edges):
- graph = defaultdict(list)
- indegree = {i: 0 for i in range(vertices)}
-
- for u, v in edges:
- graph[u].append(v)
- indegree[v] += 1
-
- queue = deque([v for v in range(vertices) if indegree[v] == 0])
- topo_order = []
-
- while queue:
- node = queue.popleft()
- topo_order.append(node)
- for neighbor in graph[node]:
- indegree[neighbor] -= 1
- if indegree[neighbor] == 0:
- queue.append(neighbor)
-
- if len(topo_order) == vertices:
- return topo_order
- else:
- return []
-```
-**C++**
-
-
- ```cpp
- #include
- #include
- #include
-
- void topologicalSort(int vertices, const std::vector>& edges) {
- std::vector indegree(vertices, 0);
- std::vector> graph(vertices);
-
- // Build the graph and compute indegrees of all vertices
- for (const auto& edge : edges) {
- graph[edge.first].push_back(edge.second);
- indegree[edge.second]++;
- }
-
- std::queue q;
- // Enqueue all vertices with indegree 0
- for (int i = 0; i < vertices; i++) {
- if (indegree[i] == 0) {
- q.push(i);
- }
- }
-
- std::vector topo_order;
- while (!q.empty()) {
- int node = q.front();
- q.pop();
- topo_order.push_back(node);
-
- // Reduce the indegree of the neighbors
- for (int neighbor : graph[node]) {
- indegree[neighbor]--;
- if (indegree[neighbor] == 0) {
- q.push(neighbor);
- }
- }
- }
-
- // Check if there was a cycle
- if (topo_order.size() == vertices) {
- for (int node : topo_order) {
- std::cout << node << " ";
- }
- } else {
- std::cout << "Cycle detected, topological sort not possible.";
- }
-}
-
-int main() {
- int vertices = 6;
- std::vector> edges = {{5, 2}, {5, 0}, {4, 0}, {4, 1}, {2, 3}, {3, 1}};
- topologicalSort(vertices, edges);
- return 0;
-}
-
-```
-
-**Java**
-
-```java
-import java.util.*;
-
-public class TopologicalSort {
- public static List topologicalSort(int vertices, int[][] edges) {
- List> graph = new ArrayList<>();
- int[] indegree = new int[vertices];
- for (int i = 0; i < vertices; i++) {
- graph.add(new ArrayList<>());
- }
-
- for (int[] edge : edges) {
- graph.get(edge[0]).add(edge[1]);
- indegree[edge[1]]++;
- }
-
- Queue queue = new LinkedList<>();
- for (int i = 0; i < vertices; i++) {
- if (indegree[i] == 0) {
- queue.add(i);
- }
- }
-
- List topo_order = new ArrayList<>();
- while (!queue.isEmpty()) {
- int node = queue.poll();
- topo_order.add(node);
- for (int neighbor : graph.get(node)) {
- indegree[neighbor]--;
- if (indegree[neighbor] == 0) {
- queue.add(neighbor);
- }
- }
- }
-
- if (topo_order.size() == vertices) {
- return topo_order;
- } else {
- return Collections.emptyList(); // Cycle detected
- }
- }
-```
-
-**JavaScript**
-
-```javascript
- function topologicalSort(vertices, edges) {
- let graph = Array.from({ length: vertices }, () => []);
- let indegree = Array(vertices).fill(0);
- for (let [u, v] of edges) {
- graph[u].push(v);
- indegree[v]++;
- }
-
- let queue = [];
- for (let i = 0; i < vertices; i++) {
- if (indegree[i] === 0) {
- queue.push(i);
- }
- }
-
- let topoOrder = [];
- while (queue.length > 0) {
- let node = queue.shift();
- topoOrder.push(node);
-
- for (let neighbor of graph[node]) {
- indegree[neighbor]--;
- if (indegree[neighbor] === 0) {
- queue.push(neighbor);
- }
- }
- }
-
- return topoOrder.length === vertices ? topoOrder : []; // Return empty array if cycle detected
-}
-
-```
-
-## 8. Complexity Analysis
-
-- **Time Complexity**:
-- Best case: $O(V + E)$
-- Average case: $O(V + E)$
-- Worst case: $O(V + E)$
-
-- **Space Complexity**: $O(V + E)$ (for the graph representation and auxiliary data structures)
-
-## 9. Advantages and Disadvantages
-
-**Advantages:**
-- Provides a linear ordering of vertices in a DAG.
-- Useful in scenarios such as task scheduling, resolving symbol dependencies in linkers, etc.
-
-**Disadvantages:**
-- Not applicable if the graph contains cycles.
-- Requires graph to be a DAG.
-
-## 10. References
-
-- **GFG Problem:** [GFG Problem](https://www.geeksforgeeks.org/topological-sorting/)
-- **HackerRank Problem:** [HackerRank](https://www.hackerrank.com/challenges/torque-and-development/problem)
-- **Author's Geeks for Geeks Profile:** [MuraliDharan](https://www.geeksforgeeks.org/user/ngmuraqrdd/)
-
-
-
diff --git a/dsa-solutions/Sorting-Algorithms/Tree-Sort.md b/dsa-solutions/Sorting-Algorithms/Tree-Sort.md
deleted file mode 100644
index b5ebf2330..000000000
--- a/dsa-solutions/Sorting-Algorithms/Tree-Sort.md
+++ /dev/null
@@ -1,177 +0,0 @@
---
-id: Tree-Sort
-title: Tree Sort (Geeks for Geeks)
-sidebar_label: Tree Sort
-tags:
- - Intermediate
- - Sorting Algorithms
- - Geeks for Geeks
- - CPP
- - Python
- - Java
- - JavaScript
- - DSA
-description: "This is a solution to the Tree Sort problem on Geeks for Geeks."
----
-
-## 1. What is Tree Sort?
-
-Tree Sort is a sorting algorithm that uses a Binary Search Tree (BST) to sort elements. The elements are inserted into a BST and then an in-order traversal is performed to retrieve them in sorted order.
-
-## 2. Algorithm for Tree Sort
-
-1. Create an empty Binary Search Tree (BST).
-2. Insert all elements from the array into the BST.
-3. Perform an in-order traversal of the BST to retrieve the elements in sorted order.
-
-## 3. How does Tree Sort work?
-
-- Each element from the array is inserted into a BST.
-- During the in-order traversal of the BST, elements are retrieved in ascending order because the left subtree is visited first, followed by the root, and then the right subtree.
-
-## 4. Problem Description
-
-Given an array of integers, implement the Tree Sort algorithm to sort the array.
-
-## 5. Examples
-
-**Example 1:**
-
-```
-Input: [10, 7, 8, 9, 1, 5]
-Output: [1, 5, 7, 8, 9, 10]
-```
-
-**Example 2:**
-```
-Input: [38, 27, 43, 3, 9, 82, 10]
-Output: [3, 9, 10, 27, 38, 43, 82]
-
-```
-
-## 6. Constraints
-
-- The array should contain at least one element.
-
-## 7. Implementation
-
-**Python**
-```python
-class TreeNode:
- def __init__(self, key):
- self.left = None
- self.right = None
- self.val = key
-
-def insert(root, key):
- if root is None:
- return TreeNode(key)
- else:
- if key < root.val:
- root.left = insert(root.left, key)
- else:
- root.right = insert(root.right, key)
- return root
-
-def inorder_traversal(root, res):
- if root:
- inorder_traversal(root.left, res)
- res.append(root.val)
- inorder_traversal(root.right, res)
-
-def tree_sort(arr):
- if not arr:
- return []
- root = TreeNode(arr[0])
- for key in arr[1:]:
- insert(root, key)
- sorted_array = []
- inorder_traversal(root, sorted_array)
- return sorted_array
-
-```
-```java
-import java.util.*;
-
-class TreeNode {
- int val;
- TreeNode left, right;
- TreeNode(int item) {
- val = item;
- left = right = null;
- }
-}
-
-public class TreeSort {
- TreeNode root;
-
- void insert(int key) {
- root = insertRec(root, key);
- }
-
- TreeNode insertRec(TreeNode root, int key) {
- if (root == null) {
- root = new TreeNode(key);
- return root;
- }
- if (key < root.val) {
- root.left = insertRec(root.left, key);
- } else if (key > root.val) {
- root.right = insertRec(root.right, key);
- }
- return root;
- }
-
- void inorderRec(TreeNode root, List res) {
- if (root != null) {
- inorderRec(root.left, res);
- res.add(root.val);
- inorderRec(root.right, res);
- }
- }
-
- public static List treeSort(int[] arr) {
- TreeSort tree = new TreeSort();
- for (int num : arr) {
- tree.insert(num);
- }
- List sortedArray = new ArrayList<>();
- tree.inorderRec(tree.root, sortedArray);
- return sortedArray;
- }
-
- public static void main(String[] args) {
- int[] arr = {5, 1, 4, 2, 8, 0, 2};
- List sortedArr = treeSort(arr);
- for (int num : sortedArr) {
- System.out.print(num + " ");
- }
- }
-}
-
-```
-
-## 8. Complexity Analysis
-
-- **Time Complexity**:
- -Best case: $O(n \log n)$ (balanced BST)
-Average case: $O(n \log n)$ (balanced BST)
-Worst case: $O(n^2)$ (unbalanced BST)
-
-- **Space Complexity**: $O(n)$ (for the BST and recursion stack)
-
-## 9. Advantages and Disadvantages
-
-**Advantages:**
-- Can achieve $O(n \log n)$ time complexity if the BST remains balanced.
-- Simple to understand and implement.
-
-**Disadvantages:**
-- In the worst case (unbalanced BST), the time complexity degrades to $O(n^2)$.
-- Requires additional memory for the tree structure, which is $O(n)$.
-- The bidirectional approach does not significantly improve performance for most input cases.
-
-## 10. References
-
-- **GFG Article on Tree Sort:** [Geeks for Geeks Counting Sort](https://www.geeksforgeeks.org/cartesian-tree-sorting/)
-- **Wikipedia Article on Tree Sort:** [Counting Sort - Wikipedia](https://en.wikipedia.org/wiki/Tree_sort)
diff --git a/dsa-solutions/gfg-solutions/0001-Matchstick-Game.md b/dsa-solutions/gfg-solutions/0001-Matchstick-Game.md
deleted file mode 100644
index a02469664..000000000
--- a/dsa-solutions/gfg-solutions/0001-Matchstick-Game.md
+++ /dev/null
@@ -1,181 +0,0 @@
----
-
-id: matchsticks-game
-title: Matchsticks Game
-sidebar_label: 0001-Matchsticks Game
-tags:
- - Game Theory
- - Mathematics
- - Strategy
- - Python
- - JavaScript
- - TypeScript
- - Java
- - C++
-description: "This is a solution to the problem of determining the number of matchsticks the first player should pick to guarantee a win in the matchsticks game."
-
----
-
-In this page, we will solve the problem of determining the number of matchsticks the first player should pick to guarantee a win in the matchsticks game using different approaches. We will provide the implementation of the solution in JavaScript, TypeScript, Python, Java, and C++.
-
-## Problem Description
-
-Two friends, A and B, are playing the game of matchsticks. In this game, a group of N matchsticks is placed on the table. The players can pick any number of matchsticks from 1 to 4 (both inclusive) during their chance. The player who takes the last matchstick wins the game. If A starts first, how many matchsticks should he pick on his first turn such that he is guaranteed to win the game, or determine if it's impossible for him to win. Return -1 if it's impossible for A to win the game, else return the number of matchsticks he should pick on his first turn to guarantee a win. Note: Consider both A and B play the game optimally.
-
-### Examples
-
-**Example 1:**
-
-```plaintext
-Input:
-N = 48
-Output:
-3
-Explanation:
-Player A is guaranteed a win if he picks 3 matchsticks first.
-```
-
-**Example 2:**
-
-```plaintext
-Input:
-N = 15
-Output:
--1
-Explanation:
-Player A is guaranteed a loss no matter how many matches he picks at first.
-```
-
-### Constraints
-
-- `1 <= N <= 10^18`
-
----
-
-## Solution for Matchsticks Game Problem
-
-### Intuition and Approach
-
-The problem can be solved using game theory and mathematical analysis. The key insight is to notice the pattern based on the modulo operation.
-
-When A starts the game, he needs to ensure that after his turn, the number of matchsticks left is such that B cannot force a win. This means A needs to leave B with a number of matchsticks that is a multiple of 5, because if $( N \% 5 = 0 )$, B will always have the advantage. Therefore, A's winning strategy is based on the remainder when $( N )$ is divided by 5.
-
-- If $( N \% 5 = 0 )$, then no matter how many matchsticks A picks (1 to 4), B can always pick a number of matchsticks to maintain the advantage and eventually win. Hence, it's impossible for A to guarantee a win, and the answer is -1.
-- If $( N \% 5 \neq 0 )$, A should pick $( N \% 5 )$ matchsticks to leave B with a multiple of 5 matchsticks, ensuring A's winning position.
-
-
-
-
-
-### Approach: Game Theory
-
-The key observation is that if the number of matchsticks \( N \) modulo 5 is 0, then player A will lose if both players play optimally. Otherwise, player A can always pick \( N \% 5 \) matchsticks to ensure a win.
-
-#### Implementation
-
-```jsx live
-function matchGame() {
- const N = 48;
-
- const matchGame = (N) => {
- return N % 5 === 0 ? -1 : N % 5;
- };
-
- const result = matchGame(N);
- return (
-
-
- Input: N = {N}
-
-
- Output: {result}
-
-
- );
-}
-```
-
-#### Codes in Different Languages
-
-
-
-
- ```javascript
- function matchGame(N) {
- return N % 5 === 0 ? -1 : N % 5;
- }
-
-
- ```
-
-
-
-
- ```typescript
- function matchGame(N: number): number {
- return N % 5 === 0 ? -1 : N % 5;
- }
-
-
- ```
-
-
-
-
- ```python
- def matchGame(N):
- return -1 if N % 5 == 0 else N % 5
-
- ```
-
-
-
-
- ```java
- public class Solution {
- public int matchGame(long N) {
- return N % 5 == 0 ? -1 : (int)(N % 5);
- }
-
-
- }
- ```
-
-
-
-
- ```cpp
- #include
-
- using namespace std;
-
- int matchGame(long long N) {
- return N % 5 == 0 ? -1 : N % 5;
- }
-
-
- ```
-
-
-
-
-#### Complexity Analysis
-
-- Time Complexity: $$O(1)$$
-- Space Complexity: $$O(1)$$
-
-
-
-
-:::tip
-The key insight is recognizing the modulo operation's role in determining the game's outcome.
-:::
-
-## References
-
-- **GeeksforGeeks Problem:** [GeeksforGeeks Problem](https://www.geeksforgeeks.org/problems/-matchsticks-game4906/0)
-- **GeeksforGeeks Problem:** [GeeksforGeeks solution](https://www.geeksforgeeks.org/problems/-matchsticks-game4906/0)
-- **Solution Author:** [Manish Kumar Gupta](https://www.geeksforgeeks.org/user/manishd5hla)
-
----
-
diff --git a/dsa-solutions/gfg-solutions/0001-value-equal-to-index-value.md b/dsa-solutions/gfg-solutions/0001-value-equal-to-index-value.md
deleted file mode 100644
index 3d35d9d97..000000000
--- a/dsa-solutions/gfg-solutions/0001-value-equal-to-index-value.md
+++ /dev/null
@@ -1,124 +0,0 @@
----
-id: value-equal-to-index-value
-title: Value Equal to Index Value Problem (Geeks for Geeks)
-sidebar_label: 0001 - Value Equal to Index Value
-tags:
- - Beginner
- - Index Values
- - Array
- - Geeks for Geeks
- - CPP
- - Python
- - DSA
-description: "This is a solution to the Value Equal to Index Value problem on Geeks for Geeks."
----
-
-## Problem Description
-
-Given an array Arr of N positive integers. Your task is to find the elements whose value is equal to that of its index value (Consider 1-based indexing).
-
-Note: There can be more than one element in the array which have the same value as its index. You need to include every such element's index. Follows 1-based indexing of the array.
-
-## Examples
-
-Example 1:
-
-```
-Input:
-N = 5
-Arr[] = {15, 2, 45, 12, 7}
-Output: 2
-Explanation: Only Arr[2] = 2 exists here.
-```
-
-Example 2:
-
-```
-Input:
-N = 1
-Arr[] = {1}
-Output: 1
-Explanation: Here Arr[1] = 1 exists.
-```
-
-## Your Task
-
-You don't need to read input or print anything. Your task is to complete the function valueEqualToIndex() which takes the array of integers arr[] and n as parameters and returns an array of indices where the given conditions are satisfied. When there is no such element exists then return an empty array of length 0. For C users, you need to modify the array(arr), in place such that the indices not in the final answer should be marked 0.
-
-## Constraints
-
-* `1 ≤ N ≤ 105`
-* `1 ≤ Arr[i] ≤ 106`
-
-## Problem Explanation
-
-The problem involves finding elements in an array whose values match their index positions, considering 1-based indexing. This means if an element's value matches its position in the array when counting from 1 (not 0), it should be included in the result.
-
-Example:
-
-* Given an array [15, 2, 45, 12, 7]:
- - At 1-based index 1, the value is 15 (not equal to 1)
- - At 1-based index 2, the value is 2 (equal to 2)
- - At 1-based index 3, the value is 45 (not equal to 3)
- - At 1-based index 4, the value is 12 (not equal to 4)
- - At 1-based index 5, the value is 7 (not equal to 5)
-
-The only element that matches its index is 2 at index 2.
-
-## Python Solution Code
-
-```py
-class Solution:
-
- def valueEqualToIndex(self, arr, n):
- result = []
- for i in range(n):
- if (arr[i] == i + 1):
- result.append(arr[i]);
- return result
-```
-
-## C++ Solution Code
-
-```cpp
-class Solution {
- public:
- vector valueEqualToIndex(int arr[], int n) {
- vector result;
- for(int i = 0; i < n; i++) {
- if(arr[i] == i + 1)
- result.push_back(arr[i]);
- } return result;
- }
-};
-```
-
-## Solution Logic
-
-1. Initialize an empty result list: This will store the elements that satisfy the condition.
-2. Iterate through the array: Use a loop to go through each element in the array.
-3. Check the condition: For each element, check if the element's value matches its 1-based index. Since array indexing typically starts at 0 in most programming languages, you adjust by adding 1 to the index.
-4. Store matching elements: If an element's value matches its 1-based index, add it to the result list.
-5. Return the result list: After checking all elements, return the list of elements that met the condition.
-
-## Example Walkthrough
-
-For the array `[15, 2, 45, 12, 7]` with length `n = 5`:
-
-* Initialize an empty list: `result = []`
-* Loop through the array with indices from 0 to 4:
- - Check element at index 0 (1-based index 1): 15 ≠ 1
- - Check element at index 1 (1-based index 2): 2 = 2 (add to result)
- - Check element at index 2 (1-based index 3): 45 ≠ 3
- - Check element at index 3 (1-based index 4): 12 ≠ 4
- - Check element at index 4 (1-based index 5): 7 ≠ 5
-
-Final `result` list: `[2]`
-
-## Time Complexity
-
-The time complexity of this solution is $O(N)$ where N is the number of elements in the array. This is because the solution involves a single pass through the array to check each element against its 1-based index.
-
-## Space Complexity
-
-The space complexity is $O(1)$ for the input space, and $O(K)$ for the output space, where K is the number of elements matching the condition. In the worst case, if all elements match, the space used by the result list will be $O(N)$.
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/0002-fascinating-number.md b/dsa-solutions/gfg-solutions/0002-fascinating-number.md
deleted file mode 100644
index 77c3646bd..000000000
--- a/dsa-solutions/gfg-solutions/0002-fascinating-number.md
+++ /dev/null
@@ -1,144 +0,0 @@
----
-id: fascinating-number
-title: Fascinating Number Problem (Geeks for Geeks)
-sidebar_label: 0002 - Fascinating Number
-tags:
- - Beginner
- - String
- - Find
- - Multiplication
- - Geeks for Geeks
- - CPP
- - Python
- - DSA
-description: "This is a solution to the Fascinating Number problem on Geeks for Geeks."
----
-
-This tutorial contains a complete walk-through of the Fascinating Number problem from the Geeks for Geeks website. It features the implementation of the solution code in two programming languages: Python and C++.
-
-## Problem Description
-
-Given a number N. Your task is to check whether it is fascinating or not.
-
-Fascinating Number: When a number(should contain 3 digits or more) is multiplied by 2 and 3, and when both these products are concatenated with the original number, then it results in all digits from 1 to 9 present exactly once.
-
-## Examples
-
-**Example 1:**
-
-```
-Input: N = 192
-Output: Fascinating
-Explanation: After multiplication with 2 and 3, and concatenating with original number, number will become 192384576 which contains all digits from 1 to 9.
-```
-
-**Example 2:**
-
-```
-Input: N = 853
-Output: Not Fascinating
-Explanation: It's not a fascinating number.
-```
-
-## Your Task
-
-You don't need to read input or print anything. Your task is to complete the function `fascinating()` which takes the integer n parameters and returns boolean (True or False) denoting the answer.
-
-Expected Time Complexity: $O(1)$
-Expected Auxiliary Space: $O(1)$
-
-## Constraints
-
-`100 <= N <= 2*10^9`
-
-## Problem Explanation
-
-The problem is to determine if a given number N is a fascinating number. A fascinating number is defined as follows:
-
-1. The number must have at least three digits.
-2. Multiply the number by 2 and 3 to get two products.
-3. Concatenate the original number, the product of the number and 2, and the product of the number and 3 into a single string.
-4. The concatenated string should contain all digits from 1 to 9 exactly once, with no other digits present (e.g., no zeros).
-
-## Code Implementation
-
-
-
-
- ```py
- class Solution:
-
- def fascinating(self, n):
- m2 = n * 2
- m3 = n * 3
- num = str(n) + str(m2) + str(m3)
- num = "".join(sorted(num))
- zero_count = num.count("0")
- if (num.find("123456789") == -1):
- return False
- elif (len(num) - zero_count > 9):
- return False
- else:
- return True
- ```
-
-
-
-
-
- ```cpp
- class Solution {
- public:
- bool fascinating(int n) {
- int m2 = n * 2;
- int m3 = n * 3;
- string num = to_string(n) + to_string(m2) + to_string(m3);
- sort(num.begin(), num.end());
- if (num.find("123456789") == string::npos)
- return false;
- else if (num.length() - num.find("123456789") > 9)
- return false;
- else return true;
- }
-};
-```
-
-
-
-
-
-## Example Walkthrough
-
-For N = 192:
-1. Original number: 192
-2. Multiply by 2: 192 × 2 = 384
-3. Multiply by 3: 192 × 3 = 576
-4. Concatenate: "192" + "384" + "576" = "192384576"
-5. Check if the concatenated string contains all digits from 1 to 9 exactly once: "192384576" contains each digit from 1 to 9 exactly once.
-
-Therefore, 192 is a fascinating number.
-
-## Solution Logic:
-
-1. Compute the Products: Multiply the number N by 2 and 3 to get two new numbers.
-2. Concatenate the Results: Convert the original number and the two products to strings and concatenate them.
-3. Sort and Check Digits: Sort the concatenated string and check if it contains the sequence "123456789" exactly once.
-4. Verify Length: Ensure there are no extra digits (like zero or repetitions). The total length of digits should be exactly 9, excluding any zeros.
-
-## Time Complexity
-
-The time complexity is $O(1)$ because the operations involve a fixed number of steps regardless of the size of N:
-
-* Multiplication and string concatenation are constant time operations.
-* Sorting a string of fixed length (at most 9 characters) is a constant time operation.
-* Checking for the sequence "123456789" in a fixed-length string is also a constant time operation.
-
-## Space Complexity
-
-The space complexity is $O(1)$ as well since the operations use a constant amount of extra space for storing the products and concatenated strings.
-
-## References
-
-- **Geeks for Geeks Problem:** [Geeks for Geeks Problem](https://www.geeksforgeeks.org/problems/fascinating-number3751/1?page=1&difficulty=School&sortBy=difficulty)
-- **Solution Link:** [Fascinating Number on Geeks for Geeks](https://www.geeksforgeeks.org/problems/fascinating-number3751/1?page=1&difficulty=School&sortBy=difficulty)
-- **Authors LeetCode Profile:** [Anoushka](https://www.geeksforgeeks.org/user/iamanolive/)
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/0003-Count-the-subarrays-having-product-less-than-k.md b/dsa-solutions/gfg-solutions/0003-Count-the-subarrays-having-product-less-than-k.md
deleted file mode 100644
index 4945a73d9..000000000
--- a/dsa-solutions/gfg-solutions/0003-Count-the-subarrays-having-product-less-than-k.md
+++ /dev/null
@@ -1,399 +0,0 @@
----
-
-id: count-subarrays-product-less-than-k
-title: Count Subarrays with Product Less Than K
-sidebar_label: 0003- Count Subarrays with Product Less Than K
-tags:
- - Array
- - Sliding Window
- - Two Pointers
- - Mathematics
- - Python
- - JavaScript
- - TypeScript
- - Java
- - C++
-description: "This is a solution to the problem of counting subarrays with product less than a given value K."
-
----
-
-In this page, we will solve the problem of counting subarrays with a product less than a given number K using different approaches. We will provide the implementation of the solution in JavaScript, TypeScript, Python, Java, and C++.
-
-## Problem Description
-
-Given an array of positive numbers, the task is to find the number of possible contiguous subarrays having a product less than a given number k.
-
-### Examples
-
-**Example 1:**
-
-```plaintext
-Input: n = 4, k = 10, a[] = {1, 2, 3, 4}
-Output: 7
-Explanation: The contiguous subarrays are {1}, {2}, {3}, {4}, {1, 2}, {1, 2, 3}, and {2, 3}, all of which have products less than 10. There are 7 such subarrays in total.
-```
-
-**Example 2:**
-
-```plaintext
-Input: n = 7, k = 100, a[] = {1, 9, 2, 8, 6, 4, 3}
-Output: 16
-Explanation: The contiguous subarrays are all subarrays of length 1, 2, and 3 with products less than 100. There are 16 such subarrays in total.
-```
-
-### Constraints
-
-- `1 <= n <= 10^6`
-- `1 <= k <= 10^15`
-- `1 <= a[i] <= 10^5`
-
----
-
-## Solution for Count Subarrays with Product Less Than K Problem
-
-### Intuition and Approach
-
-The problem can be solved using the sliding window (or two pointers) approach to efficiently find the number of subarrays whose product is less than k.
-
-
-
-
-### Approach: Brute Force
-
-This approach involves using binary search to find the right boundary for each left boundary, counting subarrays with a product less than k.
-
-#### Implementation
-
-```jsx live
-function countSubarraysWithProductLessThanK() {
- const n = 4;
- const k = 10;
- const a = [1, 2, 3, 4];
-
- const countSubArrayProductLessThanK = (a, n, k) => {
- if (k <= 1) return 0;
- let count = 0;
- for (let i = 0; i < n; i++) {
- let product = 1;
- for (let j = i; j < n; j++) {
- product *= a[j];
- if (product < k) count++;
- else break;
- }
- }
- return count;
- };
-
- const result = countSubArrayProductLessThanK(a, n, k);
- return (
-
-
- Input: n = {n}, k = {k}, a = [{a.join(", ")}]
-
-
-
-
- Output: {result}
-
-
- );
-}
-```
-
-#### Codes in Different Languages
-
-
-
-
- ```javascript
- function countSubArrayProductLessThanK(a, n, k) {
- if (k <= 1) return 0;
- let count = 0;
- for (let i = 0; i < n; i++) {
- let product = 1;
- for (let j = i; j < n; j++) {
- product *= a[j];
- if (product < k) count++;
- else break;
- }
- }
- return count;
- }
-
- ```
-
-
-
-
- ```typescript
- function countSubArrayProductLessThanK(a: number[], n: number, k: number): number {
- if (k <= 1) return 0;
- let count = 0;
- for (let i = 0; i < n; i++) {
- let product = 1;
- for (let j = i; j < n; j++) {
- product *= a[j];
- if (product < k) count++;
- else break;
- }
- }
- return count;
- }
-
-
- ```
-
-
-
-
- ```python
- def count_subarray_product_less_than_k(a, n, k):
- if k <= 1:
- return 0
- count = 0
- for i in range(n):
- product = 1
- for j in range(i, n):
- product *= a[j]
- if product < k:
- count += 1
- else:
- break
- return count
-
-
- ```
-
-
-
-
- ```java
- public class Solution {
- public int countSubArrayProductLessThanK(int[] a, int n, int k) {
- if (k <= 1) return 0;
- int count = 0;
-
- for (int i = 0; i < n; i++) {
- int product = 1;
- for (int j = i; j < n; j++) {
- product *= a[j];
- if (product < k) count++;
- else break;
- }
- }
- return count;
- }
-
-
- }
- ```
-
-
-
-
- ```cpp
- #include
- #include
-
- using namespace std;
-
- int countSubArrayProductLessThanK(vector& a, int n, int k) {
- if (k <= 1) return 0;
- int count = 0;
-
- for (int i = 0; i < n; i++) {
- int product = 1;
- for (int j = i; j < n; j++) {
- product *= a[j];
- if (product < k) count++;
- else break;
- }
- }
- return count;
- }
-
- ```
-
-
-
-
-#### Complexity Analysis
-
-- Time Complexity: $$O(n^2)$$
-- Space Complexity: $$O(1)$$
-
-
-
-
-
-
-### Approach: Sliding Window
-
-The sliding window approach involves maintaining a window of elements with a product less than k and expanding or shrinking the window as necessary.
-
-#### Implementation
-
-```jsx live
-function countSubarraysWithProductLessThanK() {
- const n = 4;
- const k = 10;
- const a = [1, 2, 3, 4];
-
- const countSubArrayProductLessThanK = (a, n, k) => {
- if (k <= 1) return 0;
- let count = 0, product = 1, left = 0;
-
- for (let right = 0; right < n; right++) {
- product *= a[right];
- while (product >= k) product /= a[left++];
- count += right - left + 1;
- }
-
- return count;
- };
-
- const result = countSubArrayProductLessThanK(a, n, k);
- return (
-
-
- Input: n = {n}, k = {k}, a = [{a.join(", ")}]
-
-
- Output: {result}
-
-
- );
-}
-```
-
-#### Codes in Different Languages
-
-
-
-
- ```javascript
- function countSubArrayProductLessThanK(a, n, k) {
- if (k <= 1) return 0;
- let count = 0, product = 1, left = 0;
-
- for (let right = 0; right < n; right++) {
- product *= a[right];
- while (product >= k) product /= a[left++];
- count += right - left + 1;
- }
-
- return count;
- }
-
- ```
-
-
-
-
- ```typescript
- function countSubArrayProductLessThanK(a: number[], n: number, k: number): number {
- if (k <= 1) return 0;
- let count = 0, product = 1, left = 0;
-
- for (let right = 0; right < n; right++) {
- product *= a[right];
- while (product >= k) product /= a[left++];
- count += right - left + 1;
- }
-
- return count;
- }
-
- ```
-
-
-
-
- ```python
- def count_subarray_product_less_than_k(a, n, k):
- if k <= 1:
- return 0
- count, product, left = 0, 1, 0
-
- for right in range(n):
- product *= a[right]
- while product >= k:
- product /= a[left]
- left += 1
- count += right - left + 1
-
- return count
-
-
- ```
-
-
-
-
- ```java
- public class Solution {
- public int countSubArrayProductLessThanK(int[] a, int n, int k) {
- if (k <= 1) return 0;
- int count = 0, product = 1, left = 0;
-
- for (int right = 0; right < n; right++) {
- product *= a[right];
- while (product >= k) product /= a[left++];
- count += right - left + 1;
- }
-
- return count;
- }
-
-
- }
- ```
-
-
-
-
- ```cpp
- #include
- #include
-
- using namespace std;
-
- int countSubArrayProductLessThanK(vector& a, int n, int k) {
- if (k <= 1) return 0;
- int count = 0, product = 1, left = 0;
-
- for (int right = 0; right < n; right++) {
- product *= a[right];
- while (product >= k) product /= a[left++];
- count += right - left + 1;
- }
-
- return count;
- }
-
-
- ```
-
-
-
-
-#### Complexity Analysis
-
-- Time Complexity: $$O(n)$$
-- Space Complexity: $$O(1)$$
-
-
-
-
-
-:::tip
-The sliding window approach efficiently counts subarrays with product less than k in linear time.
-:::
-
-## References
-
-- **GeeksforGeeks Problem:** [GeeksforGeeks Problem](https://www.geeksforgeeks.org/problems/count-the-subarrays-having-product-less-than-k1708/0)
-- **GeeksforGeeks Problem:** [GeeksforGeeks Solution](https://www.geeksforgeeks.org/problems/count-the-subarrays-having-product-less-than-k1708/0)
-- **Solution Author:** [Manish Kumar Gupta](https://www.geeksforgeeks.org/user/manishd5hla)
-
----
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/0003-at-least-two-greater-elements.md b/dsa-solutions/gfg-solutions/0003-at-least-two-greater-elements.md
deleted file mode 100644
index d0018ea45..000000000
--- a/dsa-solutions/gfg-solutions/0003-at-least-two-greater-elements.md
+++ /dev/null
@@ -1,141 +0,0 @@
----
-id: at-least-two-greater-elements
-title: At Least Two Greater Elements Problem (Geeks for Geeks)
-sidebar_label: 0003 - At Least Two Greater Elements
-tags:
- - Beginner
- - Array
- - Slicing
- - Sort
- - Geeks for Geeks
- - CPP
- - Python
- - DSA
-description: "This is a solution to the At Least Two Greater Elements problem on Geeks for Geeks."
----
-
-This tutorial contains a complete walk-through of the At Least Two Greater Elements problem from the Geeks for Geeks website. It features the implementation of the solution code in two programming languages: Python and C++.
-
-## Problem Description
-
-Given an array of N distinct elements, the task is to find all elements in array except two greatest elements in sorted order.
-
-## Examples
-
-**Example 1:**
-
-```
-Input : a[] = {2, 8, 7, 1, 5}
-Output : 1 2 5
-Explanation : The output three elements have two or more greater elements.
-```
-
-**Example 2:**
-
-```
-Input : a[] = {7, -2, 3, 4, 9, -1}
-Output : -2 -1 3 4
-
-```
-
-## Your Task
-
-You don't need to read input or print anything. Your task is to complete the function `findElements()` which takes the array `A[]` and its size N as inputs and return the vector sorted values denoting the elements in array which have at-least two greater elements than themselves.
-
-
-Expected Time Complexity: $O(N*Log(N)$
-Expected Auxiliary Space: $O(N)$
-
-## Constraints
-
-* `3 ≤ N ≤ 10^5`
-* `-10^6 ≤ Ai ≤ 10^6`
-
-## Problem Explanation
-
-The problem is to find all elements in an array except the two greatest elements and return them in sorted order. In simpler terms, you want to remove the two largest elements from the array and sort the remaining elements.
-
-## Code Implementation
-
-
-
-
- ```py
- class Solution:
- def findElements(self, a, n):
- a.sort(); return a[0 : -2]
- ```
-
-
-
-
-
- ```cpp
- class Solution {
- public:
- vector findElements(int a[], int n) {
- sort(a, a + n);
- vector result;
- for (int i = 0; i < n - 2; i++)
- result.push_back(a[i]);
- return result;
- }
-};
-```
-
-
-
- ```Java
- class Solution {
- public long[] findElements( long a[], long n)
- {
- // Your code goes here
- long[] ans=new long[a.length-2];
- Arrays.sort(a);
- for(int i=0;i
-
-
-
-## Example Walkthrough
-
-For the array `[2, 8, 7, 1, 5]`:
-
-1. The two greatest elements are 8 and 7.
-2. Removing these two, the remaining elements are `[2, 1, 5]`.
-3. Sorting these remaining elements gives `[1, 2, 5]`.
-
-For the array `[7, −2, 3, 4, 9, −1]`:
-1. The two greatest elements are 9 and 7
-2. Removing these two, the remaining elements are `[−2, 3, 4, −1]`.
-3. Sorting these remaining elements gives `[−2, −1, 3, 4]`.
-
-
-## Solution Logic:
-
-1. Sort the Array: First, sort the entire array.
-2. Remove the Last Two Elements: After sorting, the last two elements will be the greatest. Removing these will leave us with the elements that have at least two greater elements.
-3. Return the Result: The remaining sorted elements are the desired result.
-
-## Time Complexity
-
-* Sorting the Array: The primary operation is sorting the array, which has a time complexity of $O(N*Log(N)$, where N is the number of elements in the array.
-* Slicing the Array: Extracting the elements excluding the last two elements has a time complexity of $O(1)$.
-
-
-## Space Complexity
-
-Auxiliary Space: The auxiliary space complexity is $O(N)$ because the sorting algorithm typically requires additional space proportional to the size of the input array.
-
-
-## References
-
-- **Geeks for Geeks Problem:** [Geeks for Geeks Problem](https://www.geeksforgeeks.org/problems/at-least-two-greater-elements4625/1?page=1&difficulty=School&sortBy=difficulty)
-- **Solution Link:** [At Least Two Greater Elements on Geeks for Geeks](https://www.geeksforgeeks.org/problems/at-least-two-greater-elements4625/1?page=1&difficulty=School&sortBy=difficulty)
-- **Authors LeetCode Profile:** [Anoushka](https://www.geeksforgeeks.org/user/iamanolive/)
diff --git a/dsa-solutions/gfg-solutions/0003-kadane's-algorithm.md b/dsa-solutions/gfg-solutions/0003-kadane's-algorithm.md
deleted file mode 100644
index 12ee2ecc8..000000000
--- a/dsa-solutions/gfg-solutions/0003-kadane's-algorithm.md
+++ /dev/null
@@ -1,270 +0,0 @@
----
-id: kadane's-algorithm
-title: Kadane's Alogrithm (Geeks for Geeks)
-sidebar_label: 0003 - Kadane's Algorithm
-tags:
- - intermediate
- - Array
- - Dynamic Programming
- - Data Structure
- - Algorithms
-
-description: "This is a solution to the Kadane's Algorithm problem on Geeks for Geeks."
----
-
-This tutorial contains a complete walk-through of the Kadane's Algorithm problem from the Geeks for Geeks website. It features the implementation of the solution code in three programming languages: Python ,C++ ,java.
-
-## Problem Description
-
-Given an array Arr[] of N integers, find the contiguous sub-array (containing at least one number) which has the maximum sum and return its sum.
-
-## Examples
-
-**Example 1:**
-
-```
-Input:
-N = 5
-Arr[] = {1,2,3,-2,5}
-Output:
-9
-Explanation:
-Max subarray sum is 9
-of elements (1, 2, 3, -2, 5) which
-is a contiguous subarray.
-```
-
-**Example 2:**
-
-```
-Input:
-N = 4
-Arr[] = {-1,-2,-3,-4}
-Output:
--1
-Explanation:
-Max subarray sum is -1
-of element (-1)
-```
-
-## Your Task
-
-You don't need to read input or print anything. Your task is to complete the function `maxSubarraySum()` which takes Arr[] and N as input parameters and returns the sum of subarray with maximum sum.
-
-Expected Time Complexity: $O(N)$
-Expected Auxiliary Space: $O(1)$
-
-## Constraints
-
-1. $(1 \leq N \leq 10^6)$
-2. $(-10^7 \leq A[i] \leq 10^7)$
-
-## Solution Approach
-
-### Brute Force Approach
-
-#### Intuition:
-Try all possible subarrays by using nested loops and pick the subarray which has the maximum sum.
-
-#### Implementation:
-1. Keep an answer variable to store the maximum subarray sum.
-2. Run a loop(i).
-3. Run a nested loop from i till the end of the array.
-4. Generate all subarrays starting from the ith index and compare its sum with the answer and update the answer with the maximum one.
-5. Return the answer.
-
-#### Code (C++):
-
-```cpp
-class Solution{
- public:
- // arr: input array
- // n: size of array
- //Function to find the sum of contiguous subarray with maximum sum.
- long long maxSubarraySum(int arr[], int n){
-
- // Your code here
- long long ans=arr[0];
- for(int i=0;i
-
-
-### Approach 1: Iterative
-
-The iterative approach involves iterating through each number in the range and counting the occurrences of the digit `X`.
-
-#### Implementation
-
-```jsx live
-function countXs() {
- const L = 10;
- const R = 20;
- const X = 1;
-
- const countDigitOccurrences = (L, R, X) => {
- let count = 0;
- for (let i = L+1; i < R; i++) {
- let num = i;
- while (num > 0) {
- if (num % 10 === X) count++;
- num = Math.floor(num / 10);
- }
- }
- return count;
- };
-
- const result = countDigitOccurrences(L, R, X);
- return (
-
-
- Input: L = {L}, R = {R}, X = {X}
-
-
- Output: {result}
-
-
- );
-}
-```
-
-#### Codes in Different Languages
-
-
-
-
- ```javascript
- function countDigitOccurrences(L, R, X) {
- let count = 0;
- for (let i = L+1; i < R; i++) {
- let num = i;
- while (num > 0) {
- if (num % 10 === X) count++;
- num = Math.floor(num / 10);
- }
- }
- return count;
- }
- ```
-
-
-
-
- ```typescript
- function countDigitOccurrences(L: number, R: number, X: number): number {
- let count = 0;
- for (let i = L+1; i < R; i++) {
- let num = i;
- while (num > 0) {
- if (num % 10 === X) count++;
- num = Math.floor(num / 10);
- }
- }
- return count;
- }
- ```
-
-
-
-
- ```python
- def count_digit_occurrences(L, R, X):
- count = 0
- for i in range(L+1, R):
- num = i
- while num > 0:
- if num % 10 == X:
- count += 1
- num //= 10
- return count
- ```
-
-
-
-
- ```java
- class Solution {
- public int countDigitOccurrences(int L, int R, int X) {
- int count = 0;
- for (int i = L+1; i < R; i++) {
- int num = i;
- while (num > 0) {
- if (num % 10 == X) {
- count++;
- }
- num /= 10;
- }
- }
- return count;
- }
- }
- ```
-
-
-
-
- ```cpp
- #include
-
- using namespace std;
-
- int countDigitOccurrences(int L, int R, int X) {
- int count = 0;
- for (int i = L+1; i < R; i++) {
- int num = i;
- while (num > 0) {
- if (num % 10 == X) {
- count++;
- }
- num /= 10;
- }
- }
- return count;
- }
- ```
-
-
-
-
-#### Complexity Analysis
-
-- Time Complexity: $$O((R - L)*logR)$$
-- Space Complexity: $$O(1)$$
-
-
-
-
-### Approach 2: Mathematical
-
-The mathematical approach involves counting the occurrences of the digit `X` in the range without iterating through each number.
-
-#### Implementation
-
-```jsx live
-function countXs() {
- const L = 10;
- const R = 20;
- const X = 1;
-
- const countOccurrences = (num, X) => {
- let count = 0, factor = 1, nextNum = 0, currentNum = 0;
- while (num / factor > 0) {
- currentNum = Math.floor((num / factor) % 10);
- nextNum = Math.floor(num / (factor * 10));
- count += nextNum * factor;
- if (currentNum > X) count += factor;
- else if (currentNum === X) count += num % factor + 1;
- factor *= 10;
- }
- return count;
- };
-
- const countX = (L, R, X) => {
- return countOccurrences(R - 1, X) - countOccurrences(L, X);
- };
-
- const result = countX(L, R, X);
- return (
-
-
- Input: L = {L}, R = {R}, X = {X}
-
-
- Output: {result}
-
-
- );
-}
-
-```
-
-#### Code in Different Languages
-
-
-
-
- ```javascript
- function countDigitOccurrences(num, X) {
- let count = 0, factor = 1, nextNum = 0, currentNum = 0;
- while (num / factor > 0) {
- currentNum = Math.floor((num / factor) % 10);
- nextNum = Math.floor(num / (factor * 10));
- count += nextNum * factor;
- if (currentNum > X) count += factor;
- else if (currentNum === X) count += num % factor + 1;
- factor *= 10;
- }
- return count;
- }
-
- function countX(L, R, X) {
- return countDigitOccurrences(R - 1, X) - countDigitOccurrences(L, X);
- }
- ```
-
-
-
-
- ```typescript
- function countDigitOccurrences(num: number, X: number): number {
- let count = 0, factor = 1, nextNum = 0, currentNum = 0;
- while (num / factor > 0) {
- currentNum = Math.floor((num / factor) % 10);
- nextNum = Math.floor(num / (factor * 10));
- count += nextNum * factor;
- if (currentNum > X) count += factor;
- else if (currentNum === X) count += num % factor + 1;
- factor *= 10;
- }
- return count;
- }
-
- function countX(L: number, R: number, X: number): number {
- return countDigitOccurrences(R - 1, X) - countDigitOccurrences(L, X);
- }
- ```
-
-
-
-
- ```python
- def count_digit_occurrences(num, X):
- count = 0
- factor = 1
- while num // factor > 0:
- current_num = (num // factor) % 10
- next_num = num // (factor * 10)
- count
-
- += next_num * factor
- if current_num > X:
- count += factor
- elif current_num == X:
- count += num % factor + 1
- factor *= 10
- return count
-
- def count_X(L, R, X):
- return count_digit_occurrences(R - 1, X) - count_digit_occurrences(L , X)
- ```
-
-
-
-
- ```java
- class Solution {
- public int countDigitOccurrences(int num, int X) {
- int count = 0, factor = 1, nextNum = 0, currentNum = 0;
- while (num / factor > 0) {
- currentNum = (num / factor) % 10;
- nextNum = num / (factor * 10);
- count += nextNum * factor;
- if (currentNum > X) {
- count += factor;
- } else if (currentNum == X) {
- count += num % factor + 1;
- }
- factor *= 10;
- }
- return count;
- }
-
- public int countX(int L, int R, int X) {
- return countDigitOccurrences(R - 1, X) - countDigitOccurrences(L , X);
- }
- }
- ```
-
-
-
-
- ```cpp
- #include
-
- using namespace std;
-
- int countDigitOccurrences(int num, int X) {
- int count = 0, factor = 1, nextNum = 0, currentNum = 0;
- while (num / factor > 0) {
- currentNum = (num / factor) % 10;
- nextNum = num / (factor * 10);
- count += nextNum * factor;
- if (currentNum > X) {
- count += factor;
- } else if (currentNum == X) {
- count += num % factor + 1;
- }
- factor *= 10;
- }
- return count;
- }
-
- int countX(int L, int R, int X) {
- return countDigitOccurrences(R - 1, X) - countDigitOccurrences(L , X);
- }
- ```
-
-
-
-
-#### Complexity Analysis
-
-- Time Complexity: $$O(\log_{10}(R))$$
-- Space Complexity: $$O(1)$$
-
-
-
-
-:::tip
-The mathematical approach is more efficient for large ranges. Choose the method that best suits the given constraints.
-:::
-## References
-
-- **GeeksforGeeks Problem:** [GeeksforGeeks Problem](https://www.geeksforgeeks.org/problems/how-many-xs4514/0)
-- **Solution Link:** [How Many X's Solution on GeeksforGeeks](https://www.geeksforgeeks.org/problems/how-many-xs4514/0)
-- **Authors GeeksforGeeks Profile:** [Manish Kumar Gupta](https://www.geeksforgeeks.org/user/manishd5hla)
-
----
diff --git a/dsa-solutions/gfg-solutions/0004-fibbonacci-sum.md b/dsa-solutions/gfg-solutions/0004-fibbonacci-sum.md
deleted file mode 100644
index 873583341..000000000
--- a/dsa-solutions/gfg-solutions/0004-fibbonacci-sum.md
+++ /dev/null
@@ -1,267 +0,0 @@
----
-id: fibonacci-sum
-title: Fibonacci Sum (Geeks for Geeks)
-sidebar_label: 0004 - Fibonacci Sum
-tags:
- - intermediate
- - Fibonacci
- - Dynamic Programming
- - Mathematics
- - Algorithms
----
-
-This tutorial contains a complete walk-through of the Fibonacci Sum problem from the Geeks for Geeks website. It features the implementation of the solution code in three programming languages: Python, C++, and Java.
-
-## Problem Description
-
-Given a positive number N, find the value of $f0 + f1 + f2 + ... + fN$ where fi indicates the ith Fibonacci number. Note that $f0 = 0, f1 = 1, f2 = 1, f3 = 2, f4 = 3, f5 = 5,$ and so on. Since the answer can be very large, return the result modulo $1000000007$.
-
-## Examples
-
-**Example 1:**
-
-```
-Input:
-N = 3
-Output:
-4
-Explanation:
-0 + 1 + 1 + 2 = 4
-```
-
-**Example 2:**
-
-```
-Input:
-N = 4
-Output:
-7
-Explanation:
-0 + 1 + 1 + 2 + 3 = 7
-```
-
-## Your Task
-
-You don't need to read input or print anything. Your task is to complete the function `fibSum()` which takes an integer N as input parameter and returns the sum of all the Fibonacci numbers from f0 to fN.
-
-Expected Time Complexity: $O(LogN)$
-Expected Auxiliary Space: $O(1)$
-
-## Constraints
-
-- $(1 \leq N \leq 100000)$
-
-## Solution Approach
-
-### Brute Force Approach
-
-#### Intuition:
-
-We can compute the sum of Fibonacci numbers from f0 to fN using a simple iterative method by adding up all Fibonacci numbers up to N.
-
-#### Implementation:
-
-1. Initialize `sum` to 0.
-2. Use a loop to compute Fibonacci numbers up to N.
-3. Add each Fibonacci number to `sum`.
-4. Return the sum modulo $1000000007$.
-
-#### Code (C++):
-
-```cpp
-#include
-#define MOD 1000000007
-using namespace std;
-
-class Solution {
-public:
- int fibSum(int N) {
- if (N == 0) return 0;
- long long f0 = 0, f1 = 1, sum = 1;
- for (int i = 2; i <= N; ++i) {
- long long f2 = (f0 + f1) % MOD;
- sum = (sum + f2) % MOD;
- f0 = f1;
- f1 = f2;
- }
- return sum;
- }
-};
-```
-
-### Complexity
-
-- Time Complexity: $O(N)$, as we are iterating from 0 to N.
-- Space Complexity: $O(1)$, as we are using a constant amount of extra space.
-
-## Matrix Exponentiation Approach
-
-#### Intuition:
-
-To efficiently find the sum of the first N Fibonacci numbers, we use matrix exponentiation. By utilizing the transformation matrix and its properties, we can compute the required sum in logarithmic time.
-
-#### Implementation:
-
-1. Define a function to multiply two matrices.
-2. Define a function to compute the power of a matrix.
-3. Use the power function to compute the matrix exponentiation result.
-4. Extract the result from the matrix to get the sum of the first N Fibonacci numbers.
-
-#### Code (C++):
-
-```cpp
-#include
-using namespace std;
-
-class Solution {
-public:
- const int mod = 1e9 + 7;
-
- vector> multiply(vector>& a, vector>& b) {
- long long int n = a.size();
- vector> ans(n, vector(n, 0));
- for (int i = 0; i < n; i++) {
- for (int j = 0; j < n; j++) {
- for (int k = 0; k < n; k++) {
- ans[i][j] = (ans[i][j] + (a[i][k] * b[k][j]) % mod) % mod;
- }
- }
- }
- return ans;
- }
-
- vector> power(vector>& F, long long int n) {
- if (n == 0) {
- long long int s = F.size();
- vector> ans(s, vector(s, 0));
- for (int i = 0; i < s; i++) {
- ans[i][i] = 1;
- }
- return ans;
- }
- if (n == 1) {
- return F;
- }
- vector> temp = power(F, n / 2);
- vector> ans = multiply(temp, temp);
- if (n % 2 != 0) {
- ans = multiply(ans, F);
- }
- return ans;
- }
-
- long long int fibSum(long long int N) {
- vector> a = {{1, 1, 1}, {0, 1, 1}, {0, 1, 0}};
- vector> ans = power(a, N);
- return ans[0][2];
- }
-};
-```
-
-#### Code (Python):
-
-```python
-class Solution:
- MOD = int(1e9 + 7)
-
- def multiply(self, a, b):
- n = len(a)
- ans = [[0] * n for _ in range(n)]
- for i in range(n):
- for j in range(n):
- for k in range(n):
- ans[i][j] = (ans[i][j] + a[i][k] * b[k][j]) % self.MOD
- return ans
-
- def power(self, F, n):
- if n == 0:
- s = len(F)
- ans = [[0] * s for _ in range(s)]
- for i in range(s):
- ans[i][i] = 1
- return ans
- if n == 1:
- return F
- temp = self.power(F, n // 2)
- ans = self.multiply(temp, temp)
- if n % 2 != 0:
- ans = self.multiply(ans, F)
- return ans
-
- def fibSum(self, N):
- a = [[1, 1, 1], [0, 1, 1], [0, 1, 0]]
- ans = self.power(a, N)
- return ans[0][2]
-
-# Example usage:
-solution = Solution()
-print(solution.fibSum(5)) # Output the sum of the first 5 Fibonacci numbers
-```
-
-#### Code (Java):
-
-```java
-import java.util.Arrays;
-
-class Solution {
- private static final int MOD = 1000000007;
-
- private long[][] multiply(long[][] a, long[][] b) {
- int n = a.length;
- long[][] ans = new long[n][n];
- for (int i = 0; i < n; i++) {
- for (int j = 0; j < n; j++) {
- for (int k = 0; k < n; k++) {
- ans[i][j] = (ans[i][j] + a[i][k] * b[k][j]) % MOD;
- }
- }
- }
- return ans;
- }
-
- private long[][] power(long[][] F, long n) {
- int size = F.length;
- long[][] ans = new long[size][size];
- for (int i = 0; i < size; i++) {
- ans[i][i] = 1;
- }
- if (n == 0) return ans;
- if (n == 1) return F;
-
- long[][] temp = power(F, n / 2);
- ans = multiply(temp, temp);
- if (n % 2 != 0) {
- ans = multiply(ans, F);
- }
- return ans;
- }
-
- public long fibSum(long N) {
- long[][] a = {{1, 1, 1}, {0, 1, 1}, {0, 1, 0}};
- long[][] ans = power(a, N);
- return ans[0][2];
- }
-
- public static void main(String[] args) {
- Solution solution = new Solution();
- System.out.println(solution.fibSum(5)); // Output the sum of the first 5 Fibonacci numbers
- }
-}
-```
-
-#### Complexity:
-
-- Time Complexity: $O(logN)$, due to matrix exponentiation.
-- Space Complexity: $O(logN)$, for recursive stack
-
-## Conclusion
-
-The problem of finding the sum of the first N Fibonacci numbers can be efficiently solved using matrix exponentiation, reducing the time complexity to logarithmic time $O(\log N)$. This approach ensures that even for large values of N, the computation remains feasible and efficient. The provided implementations in C++, Java, and Python demonstrate the versatility of the matrix exponentiation technique across different programming languages.
-
-By leveraging the properties of Fibonacci numbers and matrix multiplication, we can achieve optimal performance for this problem, making it suitable for large input sizes as specified in the constraints.
-
-## References
-
-- **GeeksforGeeks Problem:** [Geeks for Geeks Problem](https://www.geeksforgeeks.org/problems/fibonacci-sum/0)
-- **Solution Link:** [Fibonacci Sum on Geeks for Geeks](https://www.geeksforgeeks.org/problems/fibonacci-sum/0)
-- **Authors GeeksforGeeks Profile:** [Vipul](https://www.geeksforgeeks.org/user/lakumvipwjge/)
diff --git a/dsa-solutions/gfg-solutions/0005-Pascal-Triangle.md b/dsa-solutions/gfg-solutions/0005-Pascal-Triangle.md
deleted file mode 100644
index f6bd80975..000000000
--- a/dsa-solutions/gfg-solutions/0005-Pascal-Triangle.md
+++ /dev/null
@@ -1,416 +0,0 @@
----
-
-id: pascal-triangle
-title: Pascal Triangle Solution
-sidebar_label: 0005 - Pascal Triangle
-tags:
- - Pascal Triangle
- - Dynamic Programming
- - Mathematics
- - Binomial Coefficient
- - JavaScript
- - TypeScript
- - Python
- - Java
- - C++
-description: "This is a solution to the Pascal Triangle Row problem."
-
----
-
-In this page, we will solve the Pascal Triangle Row problem using different approaches: dynamic programming and mathematical. We will provide the implementation of the solution in JavaScript, TypeScript, Python, Java, C++, and more.
-
-## Problem Description
-
-Given a positive integer N, return the Nth row of Pascal's triangle. Pascal's triangle is a triangular array of the binomial coefficients formed by summing up the elements of the previous row. The elements can be large so return it modulo $(10^9 + 7)$.
-
-### Examples
-
-**Example 1:**
-
-```plaintext
-Input: N = 4
-Output: 1 3 3 1
-Explanation: 4th row of Pascal's triangle is 1 3 3 1.
-```
-
-**Example 2:**
-
-```plaintext
-Input: N = 5
-Output: 1 4 6 4 1
-Explanation: 5th row of Pascal's triangle is 1 4 6 4 1.
-```
-
-### Constraints
-
-- `1 <= N <= 10^3`
-
----
-
-## Solution for Pascal Triangle Row Problem
-
-### Intuition and Approach
-
-The problem can be solved using dynamic programming or a mathematical approach. The dynamic programming approach is more intuitive and builds the entire triangle row by row. The mathematical approach leverages the properties of binomial coefficients.
-
-
-
-
-### Approach 1: Dynamic Programming
-
-The dynamic programming approach involves building the Pascal's triangle row by row until the desired row is reached.
-
-#### Implementation
-
-```jsx live
-function nthRowOfPascalTriangle() {
- const N = 4;
- const MOD = 1000000007;
-
- const generate = function(N) {
- const row = [1];
- for (let i = 1; i < N; i++) {
- row[i] = (row[i - 1] * (N - i) / i) % MOD;
- }
- return row;
- };
-
- const result = generate(N);
- return (
-
-
- Input: N = {N}
-
-
- Output: {JSON.stringify(result)}
-
-
- );
-}
-```
-
-#### Codes in Different Languages
-
-
-
-
- ```javascript
- function nthRowOfPascalTriangle(N) {
- const MOD = 1000000007;
- const row = [1];
- for (let i = 1; i < N; i++) {
- row[i] = (row[i - 1] * (N - i) / i) % MOD;
- }
- return row;
- }
- ```
-
-
-
-
- ```typescript
- function nthRowOfPascalTriangle(N: number): number[] {
- const MOD = 1000000007;
- const row: number[] = [1];
- for (let i = 1; i < N; i++) {
- row[i] = (row[i - 1] * (N - i) / i) % MOD;
- }
- return row;
- }
- ```
-
-
-
-
- ```python
- class Solution:
- def nthRowOfPascalTriangle(self, N: int) -> List[int]:
- MOD = 1000000007
- row = [1]
- for i in range(1, N):
- row.append((row[-1] * (N - i) // i) % MOD)
- return row
- ```
-
-
-
-
- ```java
- import java.util.ArrayList;
- import java.util.List;
-
- class Solution {
- public List nthRowOfPascalTriangle(int N) {
- final int MOD = 1000000007;
- List row = new ArrayList<>();
- row.add(1);
- for (int i = 1; i < N; i++) {
- row.add((int)((long)row.get(i - 1) * (N - i) / i % MOD));
- }
- return row;
- }
- }
- ```
-
-
-
-
- ```cpp
- #include
-
- using namespace std;
-
- class Solution {
- public:
- vector nthRowOfPascalTriangle(int N) {
- const int MOD = 1000000007;
- vector row(1, 1);
- for (int i = 1; i < N; i++) {
- row.push_back((long long)row[i - 1] * (N - i) / i % MOD);
- }
- return row;
- }
- };
- ```
-
-
-
-
-#### Complexity Analysis
-
-- Time Complexity: $$O(N^2)$$
-- Space Complexity: $$O(N)$$
-
-
-
-
-### Approach 2: Mathematical (Binomial Coefficient)
-
-The mathematical approach leverages the properties of binomial coefficients to directly compute each element in the Nth row of Pascal's triangle. The value of the element at the ith position is calculated using the formula:
-
-$[
-\text{Value} = \binom{i}{j} = \frac{i!}{j! \cdot (i - j)!}
-]$
-#### Implementation
-
-```jsx live
-function nthRowOfPascalTriangle() {
- const N = 5;
- const MOD = 1000000007;
-
- const generate = function(N) {
- const row = [];
- const factorial = (n) => {
- if (n === 0) return 1;
- let fact = 1;
- for (let i = 1; i <= n; i++) {
- fact = (fact * i) % MOD;
- }
- return fact;
- };
-
- const binomialCoeff = (n, k) => {
- return (factorial(n) / (factorial(k) * factorial(n - k))) % MOD;
- };
-
- for (let i = 0; i < N; i++) {
- row.push(binomialCoeff(N - 1, i));
- }
-
- return row;
- };
-
- const result = generate(N);
- return (
-
-
- Input: N = {N}
-
-
- Output: {JSON.stringify(result)}
-
-
- );
-}
-```
-
-#### Code in Different Languages
-
-
-
-
- ```javascript
- function nthRowOfPascalTriangle(N) {
- const MOD = 1000000007;
- const row = [];
- const factorial = (n) => {
- if (n === 0) return 1;
- let fact = 1;
- for (let i = 1; i <= n; i++) {
- fact = (fact * i) % MOD;
- }
- return fact;
- };
-
- const binomialCoeff = (n, k) => {
- return (factorial(n) / (factorial(k) * factorial(n - k))) % MOD;
- };
-
- for (let i = 0; i < N; i++) {
- row.push(binomialCoeff(N - 1, i));
- }
-
- return row;
- }
- ```
-
-
-
-
- ```typescript
- function nthRowOfPascalTriangle(N: number): number[] {
- const MOD = 1000000007;
- const row: number[] = [];
- const factorial = (n: number): number => {
- if (n === 0) return 1;
- let fact = 1;
- for (let i = 1; i <= n; i++) {
- fact = (fact * i) % MOD;
- }
- return fact;
- };
-
- const binomialCoeff = (n: number, k: number): number => {
- return (factorial(n) / (factorial(k) * factorial(n - k))) % MOD;
- };
-
- for (let i = 0; i < N; i++) {
- row.push(binomialCoeff(N - 1, i));
- }
-
- return row;
- }
- ```
-
-
-
-
- ```python
- import math
-
- class Solution:
- def nthRowOfPascalTriangle(self, N: int) -> List[int]:
- MOD = 1000000007
-
- def factorial(n):
- if n == 0:
- return 1
- fact = 1
- for i in range(1, n + 1):
- fact = (fact * i) % MOD
- return fact
-
- def binomialCoeff(n, k):
- return (factorial(n) // (factorial(k) * factorial(n - k))) % MOD
-
- row = []
- for i in range(N):
- row.append(binomialCoeff(N - 1, i))
-
- return row
- ```
-
-
-
-
- ```java
- import java.util.ArrayList;
- import java.util.List;
-
- class Solution {
- private static final int MOD = 1000000007;
-
- public List nthRowOfPascalTriangle(int N) {
- List row = new ArrayList<>();
- for (int i = 0; i < N; i++) {
- row.add(binomialCoeff(N - 1, i));
- }
- return row;
- }
-
- private int factorial(int n) {
- if (n == 0) return 1;
- long fact = 1;
- for (int i = 1; i <= n; i++) {
- fact = (fact * i) % MOD;
- }
- return (int) fact;
- }
-
- private int binomialCoeff(int n, int k) {
- return (int) ((factorial(n) / (factorial(k) * factorial(n - k))) % MOD);
- }
- }
- ```
-
-
-
-
- ```cpp
- #include
- #include
-
- using namespace std;
-
- class Solution {
- public:
- vector nthRowOfPascalTriangle(int N) {
- const int MOD = 1000000007;
- vector row;
- for (int i = 0; i < N; i++) {
- row.push_back(binomialCoeff(N - 1, i, MOD));
- }
- return row;
- }
-
- private:
- int factorial(int n, const int MOD) {
- if (n == 0) return 1;
- long long fact = 1;
- for (int i = 1; i <= n; i++) {
- fact = (fact * i) % MOD;
- }
- return fact;
- }
-
- int binomialCoeff(int n, int k, const int MOD) {
- return (factorial(n, MOD) / (factorial(k, MOD) * factorial(n - k, MOD))) % MOD;
- }
- };
- ```
-
-
-
-
-#### Complexity Analysis
-
-- Time Complexity: $$O(N^2)$$
-- Space Complexity: $$O(N^2)$$
-
-
-
-
----
-
-These are the two approaches to solve the Pascal's Triangle Row problem. Each approach has its own advantages and trade-offs in terms of time and space complexity. You can choose the one that best fits your requirements.
-
-
-## References
-
-- **GeeksforGeeks Problem:** [GeeksforGeeks Problem](https://www.geeksforgeeks.org/problems/pascal-triangle0652/0)
-- **Solution Link:** [Pascal's Triangle Solution on GeeksforGeeks](https://www.geeksforgeeks.org/problems/pascal-triangle0652/0)
-- **Authors GeeksforGeeks Profile:** [Manish Kumar Gupta](https://www.geeksforgeeks.org/user/manishd5hla/)
-
----
diff --git a/dsa-solutions/gfg-solutions/0006-next-happy-number.md b/dsa-solutions/gfg-solutions/0006-next-happy-number.md
deleted file mode 100644
index afd83100d..000000000
--- a/dsa-solutions/gfg-solutions/0006-next-happy-number.md
+++ /dev/null
@@ -1,259 +0,0 @@
----
-id: next-happy-number
-title: Next Happy Number (Geeks for Geeks)
-sidebar_label: 0004 - Next Happy Number
-tags:
- - intermediate
- - Fibonacci
- - Dynamic Programming
- - Mathematics
- - Algorithms
----
-
-This tutorial contains a complete walk-through of the Next Happy Number problem from the Geeks for Geeks website. It features the implementation of the solution code in three programming languages: Python, C++, and Java.
-
-## Problem Statement
-
-For a given non-negative integer N, find the next smallest Happy Number. A number is called Happy if it leads to 1 after a sequence of steps, where at each step the number is replaced by the sum of squares of its digits. If we start with a Happy Number and keep replacing it with the sum of squares of its digits, we eventually reach 1.
-
-## Examples
-
-**Example 1:**
-
-```
-input:
-N = 8
-
-Output:
-10
-```
-
-Explanation:
-Next happy number after 8 is 10 since
-$[ 1 * 1 + 0 * 0 = 1]$
-
-**Example 2**
-
-```
-Input:
-N = 10
-
-Output:
-13
-```
-
-Explanation:
-
-After 10, 13 is the smallest happy number because
-$[1 * 1 + 3 * 3 = 10]$, so we replace 13 by 10 and $[1 * 1 + 0 * 0 = 1]$.
-
-## Task
-
-You don't need to read input or print anything. Your task is to complete the function `nextHappy()` which takes an integer N as input parameters and returns an integer, the next Happy number after N.
-
-## Constraints
-
-- $(1 \leq N \leq 10^5)$
-
-
-## Solution Approach
-
-### Intuition
-
-To solve the problem, we need to:
-
-1. Identify the next number greater than N.
-2. Check if it is a Happy Number.
-3. Repeat the process until we find the next Happy Number.
-
-A number is identified as Happy if, by repeatedly replacing it with the sum of squares of its digits, we eventually reach 1.
-
-### Steps
-
-1. Implement a helper function to determine if a number is Happy.
-2. Start checking numbers greater than N, using the helper function to identify the next Happy Number.
-
-### Detailed Explanation
-
-The numbers that, when you repeatedly sum the squares of their digits, eventually result in 1 are known as "happy numbers."
-
-Here are examples of how to determine if numbers less than 10 are happy numbers:
-
-- **Number 1:**
-
- $[1 ^ 2 = 1]$
- Since we have already reached 1, the process stops here. 1 is a happy number.
-
-- **Number 2:**
-
- $[2^2 = 4]$
- $[4^2 = 16]$
- $[1^2 + 6^2 = 37]$
- $[3^2 + 7^2 = 58]$
- $[5^2 + 8^2 = 89]$
- $[8^2 + 9^2 = 145]$
- $[1^2 + 4^2 + 5^2 = 42]$
- $[4^2 + 2^2 = 20]$
- $[2^2 + 0^2 = 4]$
-
- Since we have reached 4 again, the process will continue in an infinite loop. 2 is not a happy number.
-
-- **Number 3:**
-
- Similar to the above steps, 3 will also enter a loop and is not a happy number.
-
-- **Number 4:**
-
- Similar to the above steps, 4 will also enter a loop and is not a happy number.
-
-- **Number 5:**
-
- Similar to the above steps, 5 will also enter a loop and is not a happy number.
-
-- **Number 6:**
-
- Similar to the above steps, 6 will also enter a loop and is not a happy number.
-
-- **Number 7:**
-
- $[7^2 = 49]$
- $[4^2 + 9^2 = 97]$
- $[9^2 + 7^2 = 130]$
- $[1^2 + 3^2 + 0^2 = 10]$
- $[1^2 + 0^2 = 1]$
-
- Since we have reached 1, the process stops here. 7 is a happy number.
-
-- **Number 8:**
-
- Similar to the above steps, 8 will also enter a loop and is not a happy number.
-
-- **Number 9:**
-
- Similar to the above steps, 9 will also enter a loop and is not a happy number.
-
-Based on this analysis, the numbers less than 10 that result in 1 when you repeatedly sum the squares of their digits are: 1 and 7.
-
-### Implementation
-
-#### Code (C++):
-
-```cpp
-#include
-
-class Solution {
-public:
- bool solve(int n) {
- if (n == 1 || n == 7) return true;
- if (n == 2 || n == 4 || n == 8 || n == 3 || n == 9 || n == 5 || n == 6) return false;
- int sq_sum = 0;
- while (n) {
- int x = n % 10;
- sq_sum += (x * x);
- n /= 10;
- }
- return solve(sq_sum);
- }
-
- int nextHappy(int n) {
- while (true) {
- n++;
- if (solve(n)) return n;
- }
- }
-};
-
-int main() {
- Solution sol;
- int N = 8;
- std::cout << "Next happy number after " << N << " is: " << sol.nextHappy(N) << std::endl;
- return 0;
-}
-
-```
-
-#### Code(Python)
-
-```python
-class Solution:
- def solve(self, n: int) -> bool:
- if n == 1 or n == 7:
- return True
- if n in {2, 4, 8, 3, 9, 5, 6}:
- return False
- sq_sum = 0
- while n > 0:
- x = n % 10
- sq_sum += (x * x)
- n //= 10
- return self.solve(sq_sum)
-
- def nextHappy(self, n: int) -> int:
- while True:
- n += 1
- if self.solve(n):
- return n
-
-# Example usage
-sol = Solution()
-N = 8
-print(f"Next happy number after {N} is: {sol.nextHappy(N)}")
-
-```
-
-#### Code (Java)
-
-```java
-public class Solution {
- public boolean solve(int n) {
- if (n == 1 || n == 7) return true;
- if (n == 2 || n == 4 || n == 8 || n == 3 || n == 9 || n == 5 || n == 6) return false;
- int sq_sum = 0;
- while (n > 0) {
- int x = n % 10;
- sq_sum += (x * x);
- n /= 10;
- }
- return solve(sq_sum);
- }
-
- public int nextHappy(int n) {
- while (true) {
- n++;
- if (solve(n)) return n;
- }
- }
-
- public static void main(String[] args) {
- Solution sol = new Solution();
- int N = 8;
- System.out.println("Next happy number after " + N + " is: " + sol.nextHappy(N));
- }
-}
-
-```
-
-### Complexity
-
-- **Time Complexity:** $O(klog_{10}N)$ due to the operations on digits of the numbers.
-
-#### Explanation :
-
-- We will be able to determine whether a number is happy or not after recursively calling the solve function and adding the square of its digits for a maximum of 15-20 times (you can check for any random value less than 10^5). Let's denote this value as x.
-- The time taken to add the square of the digits is log10(n). Furthermore, as we are checking until we find the happy number, let's denote the number of iterations as c = (happy number>n) -n
-- Let's denote x\*c=k;
- Therefore, TC: (klog10(n))
-- The value of k won't even reach 10^4 or 10^5. You can try this approach with any random value.
-
-- **Space Complexity:** $O(1)$ since we only use a fixed amount of extra space for the set to store seen numbers.
-
-## Conclusion
-
-To find the next Happy Number after a given integer N, we can implement a solution that iteratively checks each number greater than N until a Happy Number is found. This solution efficiently identifies Happy Numbers using a helper function to compute the sum of squares of digits and a set to track previously seen numbers to avoid infinite loops.
-
-## References
-
-- **GeeksforGeeks Problem:** [Geeks for Geeks Problem](https://www.geeksforgeeks.org/problems/fibonacci-sum/0)
-- **Solution Link:** [Fibonacci Sum on Geeks for Geeks](https://www.geeksforgeeks.org/problems/fibonacci-sum/0)
-- **Authors GeeksforGeeks Profile:** [Vipul](https://www.geeksforgeeks.org/user/lakumvipwjge/)
-
diff --git a/dsa-solutions/gfg-solutions/0009-Two-repeated-elements.md b/dsa-solutions/gfg-solutions/0009-Two-repeated-elements.md
deleted file mode 100644
index b44955750..000000000
--- a/dsa-solutions/gfg-solutions/0009-Two-repeated-elements.md
+++ /dev/null
@@ -1,752 +0,0 @@
----
-
-id: two-repeated-elements
-title: Two Repeated Elements Solution
-sidebar_label: 0009 - Two Repeated Elements
-tags:
- - Array
- - Hashing
- - Mathematics
- - Bit Manipulation
- - JavaScript
- - TypeScript
- - Python
- - Java
- - C++
-description: "This is a solution to the Two Repeated Elements problem."
-
----
-
-In this page, we will solve the Two Repeated Elements problem using different approaches: hashing, mathematical, and bit manipulation. We will provide the implementation of the solution in JavaScript, TypeScript, Python, Java, and C++.
-
-## Problem Description
-
-You are given an integer `n` and an integer array `arr` of size `n+2`. All elements of the array are in the range from `1` to `n`. Also, all elements occur once except two numbers which occur twice. Find the two repeating numbers.
-
-### Examples
-
-**Example 1:**
-
-```plaintext
-Input: n = 4, arr = [4, 2, 4, 5, 2, 3, 1]
-Output: [4, 2]
-Explanation: 4 and 2 occur twice.
-```
-
-**Example 2:**
-
-```plaintext
-Input: n = 2, arr = [1, 2, 1, 2]
-Output: [1, 2]
-Explanation: 1 and 2 occur twice.
-```
-
-### Constraints
-
-- `1 <= n <= 10^5`
-- The array `arr` has a length of `n + 2`.
-
----
-
-## Solution for Two Repeated Elements Problem
-
-### Intuition and Approach
-
-The problem can be solved using different approaches such as hashing, mathematical properties, and bit manipulation.
-
-
-
-
-### Approach 1: Hashing
-
-The hashing approach involves using a hash set to keep track of the elements that have been seen so far.
-
-#### Implementation
-
-```jsx live
-function findTwoRepeatedElements() {
- const n = 4;
- const arr = [4, 2, 4,2, 3, 1];
-
- const findRepeating = (n, arr) => {
- const seen = new Set();
- const result = [];
-
- for (let i = 0; i < arr.length; i++) {
- if (seen.has(arr[i])) {
- result.push(arr[i]);
- if (result.length === 2) break;
- } else {
- seen.add(arr[i]);
- }
- }
-
- return result;
- };
-
- const result = findRepeating(n, arr);
- return (
-
-
- Input: n = {n}, arr = [{arr.join(", ")}]
-
-
- Output: [{result.join(", ")}]
-
-
- );
-}
-
-```
-
-#### Codes in Different Languages
-
-
-
-
- ```javascript
- function findTwoRepeated(arr) {
- const n = arr.length - 2;
- const seen = new Set();
- const result = [];
-
- for (let i = 0; i < arr.length; i++) {
- if (seen.has(arr[i])) {
- result.push(arr[i]);
- if (result.length === 2) break;
- } else {
- seen.add(arr[i]);
- }
- }
-
- return result;
- }
- ```
-
-
-
-
- ```typescript
- function findTwoRepeated(arr: number[]): number[] {
- const n = arr.length - 2;
- const seen = new Set();
- const result: number[] = [];
-
- for (let i = 0; i < arr.length; i++) {
- if (seen.has(arr[i])) {
- result.push(arr[i]);
- if (result.length === 2) break;
- } else {
- seen.add(arr[i]);
- }
- }
-
- return result;
- }
- ```
-
-
-
-
- ```python
- def findTwoRepeated(arr):
- seen = set()
- result = []
-
- for num in arr:
- if num in seen:
- result.append(num)
- if len(result) == 2:
- break
- else:
- seen.add(num)
-
- return result
- ```
-
-
-
-
- ```java
- import java.util.*;
-
- class Solution {
- public int[] findTwoRepeated(int[] arr) {
- Set seen = new HashSet<>();
- int[] result = new int[2];
- int index = 0;
-
- for (int num : arr) {
- if (seen.contains(num)) {
- result[index++] = num;
- if (index == 2) break;
- } else {
- seen.add(num);
- }
- }
-
- return result;
- }
- }
- ```
-
-
-
-
- ```cpp
- #include
- #include
-
- using namespace std;
-
- class Solution {
- public:
- vector findTwoRepeated(vector& arr) {
- unordered_set seen;
- vector result;
-
- for (int num : arr) {
- if (seen.count(num)) {
- result.push_back(num);
- if (result.size() == 2) break;
- } else {
- seen.insert(num);
- }
- }
-
- return result;
- }
- };
- ```
-
-
-
-
-#### Complexity Analysis
-
-- Time Complexity: $$O(n)$$
-- Space Complexity: $$O(n)$$
-
-
-
-
-### Approach 2: Mathematical
-
-The mathematical approach involves using the sum and sum of squares formulas to find the repeating numbers.
-
-#### Implementation
-
-```jsx live
-function findTwoRepeatedElements() {
- const n = 4;
- const arr = [4, 2, 4, 2, 3, 1];
-
- const findRepeating = (n, arr) => {
- const totalSum = (n * (n + 1)) / 2;
- const totalSumSquare = (n * (n + 1) * (2 * n + 1)) / 6;
-
- let sum = 0;
- let sumSquare = 0;
-
- for (let i = 0; i < arr.length; i++) {
- sum += arr[i];
- sumSquare += arr[i] * arr[i];
- }
-
- const sumDiff = sum - totalSum; // x + y
- const sumSquareDiff = sumSquare - totalSumSquare; // x^2 + y^2
-
- const sumProduct = (sumDiff * sumDiff - sumSquareDiff) / 2; // xy
- const discriminant = Math.sqrt(sumDiff * sumDiff - 4 * sumProduct);
-
- const x = (sumDiff + discriminant) / 2;
- const y = (sumDiff - discriminant) / 2;
-
- return [x, y];
- };
-
- const result = findRepeating(n, arr);
- return (
-
-
- Input: n = {n}, arr = [{arr.join(", ")}]
-
-
- Output: [{result.join(", ")}]
-
-
- );
-}
-
-
-
-```
-
-#### Code in Different Languages
-
-
-
-
- ```javascript
- function findTwoRepeatedElements(n, arr) {
- const totalSum = (n * (n + 1)) / 2;
- const totalSumSquare = (n * (n + 1) * (2 * n + 1)) / 6;
-
- let sum = 0;
- let sumSquare = 0;
-
- for (let i = 0; i < arr.length; i++) {
- sum += arr[i];
- sumSquare += arr[i] * arr[i];
- }
-
- const sumDiff = sum - totalSum; // x + y
- const sumSquareDiff = sumSquare - totalSumSquare; // x^2 + y^2
-
- const sumProduct = (sumDiff * sumDiff - sumSquareDiff) / 2; // xy
- const discriminant = Math.sqrt(sumDiff * sumDiff - 4 * sumProduct);
-
- const x = (sumDiff + discriminant) / 2;
- const y = (sumDiff - discriminant) / 2;
-
- return [x, y];
-}
-```
-
-
-
-
- ```typescript
- function findTwoRepeatedElements(n: number, arr: number[]): number[] {
- const totalSum: number = (n * (n + 1)) / 2;
- const totalSumSquare: number = (n * (n + 1) * (2 * n + 1)) / 6;
-
- let sum: number = 0;
- let sumSquare: number = 0;
-
- for (let i = 0; i < arr.length; i++) {
- sum += arr[i];
- sumSquare += arr[i] * arr[i];
- }
-
- const sumDiff: number = sum - totalSum; // x + y
- const sumSquareDiff: number = sumSquare - totalSumSquare; // x^2 + y^2
-
- const sumProduct: number = (sumDiff * sumDiff - sumSquareDiff) / 2; // xy
- const discriminant: number = Math.sqrt(sumDiff * sumDiff - 4 * sumProduct);
-
- const x: number = (sumDiff + discriminant) / 2;
- const y: number = (sumDiff - discriminant) / 2;
-
- return [x, y];
-}
- ```
-
-
-
-
- ```python
- from math import sqrt
-
-def findTwoRepeatedElements(n, arr):
- totalSum = (n * (n + 1)) // 2
- totalSumSquare = (n * (n + 1) * (2 * n + 1)) // 6
-
- sumVal = 0
- sumSquare = 0
-
- for i in arr:
- sumVal += i
- sumSquare += i * i
-
- sumDiff = sumVal - totalSum # x + y
- sumSquareDiff = sumSquare - totalSumSquare # x^2 + y^2
-
- sumProduct = (sumDiff * sumDiff - sumSquareDiff) // 2 # xy
- discriminant = int(sqrt(sumDiff * sumDiff - 4 * sumProduct))
-
- x = (sumDiff + discriminant) // 2
- y = (sumDiff - discriminant) // 2
-
- return [x, y]
-
- ```
-
-
-
-
- ```java
- import java.util.*;
-
-class Main {
- public static List findTwoRepeatedElements(int n, int[] arr) {
- int totalSum = (n * (n + 1)) / 2;
- int totalSumSquare = (n * (n + 1) * (2 * n + 1)) / 6;
-
- int sum = 0;
- int sumSquare = 0;
-
- for (int i : arr) {
- sum += i;
- sumSquare += i * i;
- }
-
- int sumDiff = sum - totalSum; // x + y
- int sumSquareDiff = sumSquare - totalSumSquare; // x^2 + y^2
-
- int sumProduct = (sumDiff * sumDiff - sumSquareDiff) / 2; // xy
- int discriminant = (int) Math.sqrt(sumDiff * sumDiff - 4 * sumProduct);
-
- int x = (sumDiff + discriminant) / 2;
- int y = (sumDiff - discriminant) / 2;
-
- List result = new ArrayList<>();
- result.add(x);
- result.add(y);
- return result;
- }
-
-
-
- ```
-
-
-
-
- ```cpp
-#include
-#include
-#include
-
-using namespace std;
-
-vector findTwoRepeatedElements(int n, vector& arr) {
- const int totalSum = (n * (n + 1)) / 2;
- const int totalSumSquare = (n * (n + 1) * (2 * n + 1)) / 6;
-
- int sum = 0;
- int sumSquare = 0;
-
- for (int i = 0; i < arr.size(); i++) {
- sum += arr[i];
- sumSquare += arr[i] * arr[i];
- }
-
- const int sumDiff = sum - totalSum; // x + y
- const int sumSquareDiff = sumSquare - totalSumSquare; // x^2 + y^2
-
- const int sumProduct = (sumDiff * sumDiff - sumSquareDiff) / 2; // xy
- const int discriminant = sqrt(sumDiff * sumDiff - 4 * sumProduct);
-
- const int x = (sumDiff + discriminant) / 2;
- const int y = (sumDiff - discriminant) / 2;
-
- return {x, y};
-}
-
-
-
- ```
-
-
-
-
-#### Complexity Analysis
-
-- Time Complexity: $$O(n)$$
-- Space Complexity: $$O(1)$$
-
-
-
-
-### Approach 3: Bit Manipulation
-
-The bit manipulation approach uses XOR to find the two repeating numbers.
-
-#### Implementation
-
-```jsx live
-function findTwoRepeatedElements() {
- const n = 4;
- const arr = [4, 2, 4, 2, 3, 1];
-
- const findRepeating = (n, arr) => {
- let xor = 0;
- for (let i = 0; i < arr.length; i++) {
- xor ^= arr[i];
- }
- for (let i = 1; i <= n; i++) {
- xor ^= i;
- }
-
- const setBit = xor & ~(xor - 1);
- let x = 0, y = 0;
- for (let i = 0; i < arr.length; i++) {
- if (arr[i] & setBit) {
- x ^= arr[i];
- } else {
- y ^= arr[i];
- }
- }
- for (let i = 1; i <= n; i++) {
- if (i & setBit) {
- x ^= i;
- } else {
- y ^= i;
- }
- }
-
- let first = 0, second = 0;
- for (let i = 0; i < arr.length; i++) {
- if (arr[i] === x) {
- first = x;
- second = y;
- break;
- }
- if (arr[i] === y) {
- first = y;
- second = x;
- break;
- }
- }
-
- return [first, second];
- };
-
- const result = findRepeating(n, arr);
- return (
-
-
- Input: n = {n}, arr = [{arr.join(", ")}]
-
-
- Output: [{result.join(", ")}]
-
-
- );
-}
-
-```
-
-#### Code in Different Languages
-
-
-
-
- ```javascript
- function findTwoRepeated(arr) {
- const n = arr.length - 2;
- let xor = 0;
-
- for (let i = 0; i < arr.length; i++) {
- xor ^= arr[i];
- }
-
- for (let i = 1; i <= n; i++) {
- xor ^= i;
- }
-
- const setBit = xor & -xor;
- let x = 0, y = 0;
-
- for (let i = 0; i < arr.length; i++) {
- if (arr[i] & setBit) {
- x ^= arr[i];
- } else {
- y ^= arr[i];
- }
- }
-
- for (let i = 1; i <= n; i++) {
- if (i & setBit) {
- x ^= i;
- } else {
- y ^= i;
- }
- }
-
- return [x, y];
- }
- ```
-
-
-
-
- ```typescript
- function findTwoRepeated(arr: number[]): number[] {
- const n = arr.length - 2;
- let xor = 0;
-
- for (let i = 0; i < arr.length; i++) {
- xor ^= arr[i];
- }
-
- for (let i = 1; i <= n; i++) {
- xor ^= i;
- }
-
- const setBit = xor & -xor;
- let x = 0, y = 0;
-
- for (let i = 0; i < arr.length; i++) {
- if (arr[i] & setBit) {
- x ^= arr[i];
- } else {
- y ^= arr[i];
- }
- }
-
- for (let i = 1; i <= n; i++) {
- if (i & setBit) {
- x ^= i;
- } else {
- y ^= i;
- }
- }
-
- return [x, y];
- }
- ```
-
-
-
-
- ```python
- def findTwoRepeated(arr):
- n = len(arr) - 2
- xor = 0
-
- for num in arr:
- xor ^= num
-
- for i in range(1, n + 1):
- xor ^= i
-
- set_bit = xor & -xor
- x = y = 0
-
- for num in arr:
- if num & set_bit:
- x ^= num
- else:
- y ^= num
-
- for i in range(1, n + 1):
- if i & set_bit:
- x ^= i
- else:
- y ^= i
-
- return [x, y]
- ```
-
-
-
-
- ```java
- class Solution {
- public int[] findTwoRepeated(int[] arr) {
- int n = arr.length - 2;
- int xor = 0;
-
- for (int num : arr) {
- xor ^= num;
- }
-
- for (int i = 1; i <= n; i++) {
- xor ^= i;
- }
-
- int setBit = xor & -xor;
- int x = 0, y = 0;
-
- for (int num : arr) {
- if ((num & setBit) != 0) {
- x ^= num;
- } else {
- y ^= num;
- }
- }
-
- for (int i = 1; i <= n; i++) {
- if ((i & setBit) != 0) {
- x ^= i;
- } else {
- y ^= i;
- }
- }
-
- return new int[]{x, y};
- }
- }
- ```
-
-
-
-
- ```cpp
- #include
-
- using namespace std;
-
- class Solution {
- public:
- vector findTwoRepeated(vector& arr) {
- int n = arr.size() - 2;
- int xorAll = 0;
-
- for (int num : arr) {
- xorAll ^= num;
- }
-
- for (int i = 1; i <= n; i++) {
- xorAll ^= i;
- }
-
- int setBit = xorAll & -xorAll;
- int x = 0, y = 0;
-
- for (int num : arr) {
- if (num & setBit) {
- x ^= num;
- } else {
- y ^= num;
- }
- }
-
- for (int i = 1; i <= n; i++) {
- if (i & setBit) {
- x ^= i;
- } else {
- y ^= i;
- }
- }
-
- return {x, y};
- }
- };
- ```
-
-
-
-
-#### Complexity Analysis
-
-- Time Complexity: $$O(n)$$
-- Space Complexity: $$O(1)$$
-
-
-
-
-:::tip
-
-These are the three approaches to solve the Two Repeated Elements problem. Each approach has its own advantages and trade-offs in terms of time and space complexity. You can choose the one that best fits your requirements.
-
-:::
-## References
-
-- **GeeksforGeeks Problem:** [GeeksforGeeks Problem](https://www.geeksforgeeks.org/problems/two-repeated-elements-1587115621/0)
-- **Solution Link:** [Two Repeated Elements Solution on GeeksforGeeks](https://www.geeksforgeeks.org/problems/two-repeated-elements-1587115621/0)
-- **Authors GeeksforGeeks Profile:** [Manish Kumar Gupta](https://www.geeksforgeeks.org/user/manishd5hla)
-
----
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/0010-paths-to-reach-origin.md b/dsa-solutions/gfg-solutions/0010-paths-to-reach-origin.md
deleted file mode 100644
index c59214484..000000000
--- a/dsa-solutions/gfg-solutions/0010-paths-to-reach-origin.md
+++ /dev/null
@@ -1,608 +0,0 @@
----
-
-id: paths-to-reach-origin
-title: Paths to Reach Origin
-sidebar_label: 0010 Paths to Reach Origin
-tags:
-- Dynamic Programming
-- Backtracking
-- Recursion
-- Combinatorics
-- JavaScript
-- Python
-- Java
-- C++
-description: "This document explores finding the number of paths to reach the origin (0, 0) on a grid."
-
----
-
-## Problem Description
-
-Imagine you are standing on a grid at point (`x`, `y`). You can only move down (y decreases) or right (x increases). Your goal is to reach the origin (0, 0). This document discusses how to find the total number of unique paths you can take to reach the origin.
-
-### Example
-
-**Input:** x = 3, y = 2 (Starting at point (3, 2))
-
-**Output:** 3
-
-There are three unique paths to reach the origin:
-
-1. Down, Down, Right (D-D-R)
-2. Down, Right, Down (D-R-D)
-3. Right, Down, Down (R-D-D)
-
----
-
-## Solutions for Finding Paths
-
-There are multiple approaches to solve this problem. Here, we will explore four common techniques:
-
-
-
-
-### Approach 1: Recursive
-
-A recursive approach solves the problem by breaking down the larger problem into smaller subproblems.
-
-#### Implementation
-
-```javascript
-class Solution {
- ways(x, y) {
- return this.help(x, y);
- }
-
- help(i, j) {
- // Base case
- if (i === 0 && j === 0) return 1;
- if (i < 0 || j < 0) return 0;
-
- // Recursive calls
- const down = this.help(i - 1, j);
- const right = this.help(i, j - 1);
-
- return down + right;
- }
-}
-```
-
-#### Codes in Different Languages
-
-
-
-
- ```javascript
- class Solution {
- ways(x, y) {
- return this.help(x, y);
- }
-
- help(i, j) {
- // Base case
- if (i === 0 && j === 0) return 1;
- if (i < 0 || j < 0) return 0;
-
- // Recursive calls
- const down = this.help(i - 1, j);
- const right = this.help(i, j - 1);
-
- return down + right;
- }
- }
- ```
-
-
-
-
-
- ```python
- class Solution:
- def ways(self, x, y):
- return self.help(x, y)
-
- def help(self, i, j):
- # Base case
- if i == 0 and j == 0:
- return 1
- if i < 0 or j < 0:
- return 0
-
- # Recursive calls
- down = self.help(i - 1, j)
- right = self.help(i, j - 1)
-
- return down + right
- ```
-
-
-
- ```java
- class Solution {
- public int ways(int x, int y) {
- return help(x, y);
- }
-
- private int help(int i, int j) {
- // Base case
- if (i == 0 && j == 0) return 1;
- if (i < 0 || j < 0) return 0;
-
- // Recursive calls
- int down = help(i - 1, j);
- int right = help(i, j - 1);
-
- return down + right;
- }
- }
- ```
-
-
-
-
- ```cpp
- class Solution {
- public:
- int ways(int x, int y) {
- return help(x, y);
- }
-
- int help(int i, int j) {
- // Base case
- if (i == 0 && j == 0) return 1;
- if (i < 0 || j < 0) return 0;
-
- // Recursive calls
- int down = help(i - 1, j);
- int right = help(i, j - 1);
-
- return down + right;
- }
- };
- ```
-
-
-
-#### Complexity Analysis
-
-**Time Complexity:** $O(2^{x+y})$
-- In the worst case, each move (left or down) results in two recursive calls, leading to an exponential number of calls.
-
-**Space Complexity:** $O(x + y)$
-- The space complexity is due to the maximum depth of the recursion stack.
-
-
-
-
-### Approach 2: Memoization
-
-Memoization is an optimization technique where we store the results of expensive function calls and reuse them when the same inputs occur again.
-
-#### Implementation
-
-```javascript
-class Solution {
- constructor() {
- this.memo = {};
- }
-
- ways(x, y) {
- return this.help(x, y);
- }
-
- help(i, j) {
- // Base case
- if (i === 0 && j === 0) return 1;
- if (i < 0 || j < 0) return 0;
-
- const key = `${i},${j}`;
- if (this.memo[key] !== undefined) return this.memo[key];
-
- // Recursive calls
- const down = this.help(i - 1, j);
- const right = this.help(i, j - 1);
-
- this.memo[key] = down + right;
- return this.memo[key];
- }
-}
-```
-
-#### Codes in Different Languages
-
-
-
-
- ```javascript
- class Solution {
- constructor() {
- this.memo = {};
- }
-
- ways(x, y) {
- return this.help(x, y);
- }
-
- help(i, j) {
- // Base case
- if (i === 0 && j === 0) return 1;
- if (i < 0 || j < 0) return 0;
-
- const key = `${i},${j}`;
- if (this.memo[key] !== undefined) return this.memo[key];
-
- // Recursive calls
- const down = this.help(i - 1, j);
- const right = this.help(i, j - 1);
-
- this.memo[key] = down + right;
- return this.memo[key];
- }
- }
- ```
-
-
-
-
-
- ```python
- class Solution:
- def __init__(self):
- self.memo = {}
-
- def ways(self, x, y):
- return self.help(x, y)
-
- def help(self, i, j):
- # Base case
- if i == 0 and j == 0:
- return 1
- if i < 0 or j < 0:
- return 0
-
- key = (i, j)
- if key in self.memo:
- return self.memo[key]
-
- # Recursive calls
- down = self.help(i - 1, j)
- right = self.help(i, j - 1)
-
- self.memo[key] = down + right
- return self.memo[key]
- ```
-
-
-
-
- ```java
- import java.util.HashMap;
- import java.util.Map;
-
- class Solution {
- private Map memo = new HashMap<>();
-
- public int ways(int x, int y) {
- return help(x, y);
- }
-
- private int help(int i, int j) {
- // Base case
- if (i == 0 && j == 0) return 1;
- if (i < 0 || j < 0) return 0;
-
- String key = i + "," + j;
- if (memo.containsKey(key)) return memo.get(key);
-
- // Recursive calls
- int down = help(i - 1, j);
- int right = help(i, j - 1);
-
- memo.put(key, down + right);
- return memo.get(key);
- }
- }
- ```
-
-
-
- ```cpp
- #include
- #include
- using namespace std;
-
- class Solution {
- unordered_map memo;
-
- public:
- int ways(int x, int y) {
- return help(x, y);
- }
-
- int help(int i, int j) {
- // Base case
- if (i == 0 && j == 0) return 1;
- if (i < 0 || j < 0) return 0;
-
- string key = to_string(i) + "," + to_string(j);
- if (memo.find(key) != memo.end()) return memo[key];
-
- // Recursive calls
- int down = help(i - 1, j);
- int right = help(i, j - 1);
-
- memo[key] = down + right;
- return
-
- memo[key];
- }
- };
- ```
-
-
-
-#### Complexity Analisys
-
-**Time Complexity:** $O(x \cdot y)$
-- Each subproblem is solved once and stored in the memoization table.
-
-**Space Complexity:** $O(x \cdot y)$
-- Space is used for the memoization table.
-
-
-
-
-### Approach 3: Tabulation
-
-Tabulation is a bottom-up dynamic programming technique where we solve smaller subproblems first and use their results to build up solutions to larger subproblems.
-
-#### Implementation
-
-```javascript
-class Solution {
- ways(x, y) {
- const dp = Array.from({ length: x + 1 }, () => Array(y + 1).fill(0));
- dp[0][0] = 1;
-
- for (let i = 0; i <= x; i++) {
- for (let j = 0; j <= y; j++) {
- if (i > 0) dp[i][j] += dp[i - 1][j];
- if (j > 0) dp[i][j] += dp[i][j - 1];
- }
- }
-
- return dp[x][y];
- }
-}
-```
-
-#### Codes in Different Languages
-
-
-
-
- ```javascript
- class Solution {
- ways(x, y) {
- const dp = Array.from({ length: x + 1 }, () => Array(y + 1).fill(0));
- dp[0][0] = 1;
-
- for (let i = 0; i <= x; i++) {
- for (let j = 0; j <= y; j++) {
- if (i > 0) dp[i][j] += dp[i - 1][j];
- if (j > 0) dp[i][j] += dp[i][j - 1];
- }
- }
-
- return dp[x][y];
- }
- }
- ```
-
-
-
-
- ```python
- class Solution:
- def ways(self, x, y):
- dp = [[0] * (y + 1) for _ in range(x + 1)]
- dp[0][0] = 1
-
- for i in range(x + 1):
- for j in range(y + 1):
- if i > 0:
- dp[i][j] += dp[i - 1][j]
- if j > 0:
- dp[i][j] += dp[i][j - 1]
-
- return dp[x][y]
- ```
-
-
-
- ```java
- class Solution {
- public int ways(int x, int y) {
- int[][] dp = new int[x + 1][y + 1];
- dp[0][0] = 1;
-
- for (int i = 0; i <= x; i++) {
- for (int j = 0; j <= y; j++) {
- if (i > 0) dp[i][j] += dp[i - 1][j];
- if (j > 0) dp[i][j] += dp[i][j - 1];
- }
- }
-
- return dp[x][y];
- }
- }
- ```
-
-
-
- ```cpp
- #include
- using namespace std;
-
- class Solution {
- public:
- int ways(int x, int y) {
- vector> dp(x + 1, vector(y + 1, 0));
- dp[0][0] = 1;
-
- for (int i = 0; i <= x; i++) {
- for (int j = 0; j <= y; j++) {
- if (i > 0) dp[i][j] += dp[i - 1][j];
- if (j > 0) dp[i][j] += dp[i][j - 1];
- }
- }
-
- return dp[x][y];
- }
- };
- ```
-
-
-
-#### Complexity Analysis
-
-**Time Complexity:** $O(x \cdot y)$
-- Filling up the table involves computing values for $x \times y$ cells.
-
-**Space Complexity:** $O(x \cdot y)$
-- Space is used for the 2D table.
-
-
-
-
-### Approach 4: Space Optimization
-
-Space optimization improves the efficiency of the tabulation method by reducing the amount of space used.
-
-#### Implementation
-
-```javascript
-class Solution {
- ways(x, y) {
- const dp = Array(y + 1).fill(0);
- dp[0] = 1;
-
- for (let i = 0; i <= x; i++) {
- for (let j = 1; j <= y; j++) {
- dp[j] += dp[j - 1];
- }
- }
-
- return dp[y];
- }
-}
-```
-
-#### Codes in Different Languages
-
-
-
-
- ```javascript
- class Solution {
- ways(x, y) {
- const dp = Array(y + 1).fill(0);
- dp[0] = 1;
-
- for (let i = 0; i <= x; i++) {
- for (let j = 1; j <= y; j++) {
- dp[j] += dp[j - 1];
- }
- }
-
- return dp[y];
- }
- }
- ```
-
-
-
-
- ```python
- class Solution:
- def ways(self, x, y):
- dp = [0] * (y + 1)
- dp[0] = 1
-
- for i in range(x + 1):
- for j in range(1, y + 1):
- dp[j] += dp[j - 1]
-
- return dp[y]
- ```
-
-
-
- ```java
- class Solution {
- public int ways(int x, int y) {
- int[] dp = new int[y + 1];
- dp[0] = 1;
-
- for (int i = 0; i <= x; i++) {
- for (int j = 1; j <= y; j++) {
- dp[j] += dp[j - 1];
- }
- }
-
- return dp[y];
- }
- }
- ```
-
-
-
- ```cpp
- #include
- using namespace std;
-
- class Solution {
- public:
- int ways(int x, int y) {
- vector dp(y + 1, 0);
- dp[0] = 1;
-
- for (int i = 0; i <= x; i++) {
- for (int j = 1; j <= y; j++) {
- dp[j] += dp[j - 1];
- }
- }
-
- return dp[y];
- }
- };
- ```
-
-
-
-#### Complexity Analysis
-
-**Time Complexity:** $O(x \cdot y)$
-- The same number of computations as in tabulation.
-
-**Space Complexity:** $O(y)$
-- Only a single array of size $y + 1$ is used.
-
-
-
-
-:::tip
-
-When choosing an approach, consider both time and space complexities. For smaller inputs, simpler approaches like recursion might be sufficient, but for larger inputs, optimized solutions like memoization, tabulation, or space-optimized tabulation are more efficient and practical. Always analyze the constraints and requirements of your problem to select the most appropriate method.
-
-Would you like any additional information or another example?
-
-:::
-
----
-
-## References
-
-- **LeetCode Problem**: [Maximum Depth of Binary Tree](https://leetcode.com/problems/maximum-depth-of-binary-tree/)
-- **Solution Link**: [LeetCode Solution](https://leetcode.com/problems/maximum-depth-of-binary-tree/solution/)
-- **Authors GeeksforGeeks Profile:** [Vipul](https://www.geeksforgeeks.org/user/lakumvipwjge/)
diff --git a/dsa-solutions/gfg-solutions/0020-climbing-stairs.md b/dsa-solutions/gfg-solutions/0020-climbing-stairs.md
deleted file mode 100644
index 7031582ef..000000000
--- a/dsa-solutions/gfg-solutions/0020-climbing-stairs.md
+++ /dev/null
@@ -1,531 +0,0 @@
----
-id: climbing-stairs
-title: Climbing Stairs
-sidebar_label: 0020 Climbing Stairs
-tags:
-- Dynamic Programming
-- Recursion
-- Memoization
-- Tabulation
-- Space Optimization
-- JavaScript
-- TypeScript
-- Python
-- Java
-- C++
-description: "This document explores different approaches to solving the climbing stairs problem, including recursion, memoization, tabulation, and space optimization."
----
-## Problem
-
-You are climbing a staircase. It takes `n` steps to reach the top.
-
-Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?
-
-### Examples
-
-**Example 1:**
-
-Input: `n = 2`
-Output: `2`
-Explanation: There are two ways to climb to the top:
-1. 1 step + 1 step
-2. 2 steps
-
-**Example 2:**
-
-Input: `n = 3`
-Output: `3`
-Explanation: There are three ways to climb to the top:
-1. 1 step + 1 step + 1 step
-2. 1 step + 2 steps
-3. 2 steps + 1 step
-
-### Constraints
-
-- $ 1 \leq n \leq 45 $
-
-## Solution
-
-### Intuition
-
-To calculate the number of ways to climb the stairs, we can observe that when we are on the nth stair, we have two options:
-
-- Either we climbed one stair from the (n-1)th stair
-- Or we climbed two stairs from the (n-2)th stair
-
-By leveraging this observation, we can break down the problem into smaller subproblems and apply the concept of the Fibonacci series. The base cases are when we are on the 1st stair (only one way to reach it) and the 2nd stair (two ways to reach it). By summing up the number of ways to reach the (n-1)th and (n-2)th stairs, we can compute the total number of ways to climb the stairs. This allows us to solve the problem efficiently using various dynamic programming techniques such as recursion, memoization, tabulation, or space optimization.
-
-
-
-
-### Approach 1: Recursive
-
-A recursive approach solves the problem by breaking down the larger problem into smaller subproblems.
-
-#### Implementation
-
-```javascript
-class Solution {
- climbStairs(n) {
- if (n === 0 || n === 1) {
- return 1;
- }
- return this.climbStairs(n - 1) + this.climbStairs(n - 2);
- }
-}
-```
-
-#### Codes in Different Languages
-
-
-
-
- ```javascript
- class Solution {
- climbStairs(n) {
- if (n === 0 || n === 1) {
- return 1;
- }
- return this.climbStairs(n - 1) + this.climbStairs(n - 2);
- }
- }
- ```
-
-
-
-
-
- ```python
- class Solution:
- def climbStairs(self, n: int) -> int:
- if n == 0 or n == 1:
- return 1
- return self.climbStairs(n-1) + self.climbStairs(n-2)
- ```
-
-
-
- ```java
- class Solution {
- public int climbStairs(int n) {
- if (n == 0 || n == 1) {
- return 1;
- }
- return climbStairs(n-1) + climbStairs(n-2);
- }
- }
- ```
-
-
-
-
- ```cpp
- class Solution {
- public:
- int ways(int x, int y) {
- return help(x, y);
- }
-
- int help(int i, int j) {
- // Base case
- if (i == 0 && j == 0) return 1;
- if (i < 0 || j < 0) return 0;
-
- // Recursive calls
- int down = help(i - 1, j);
- int right = help(i, j - 1);
-
- return down + right;
- }
- };
- ```
-
-
-
-#### Complexity Analysis
-
-**Time Complexity:** $O(2^{x+y})$
-- In the worst case, each move (left or down) results in two recursive calls, leading to an exponential number of calls.
-
-**Space Complexity:** $O(x + y)$
-- The space complexity is due to the maximum depth of the recursion stack.
-
-
-
-
-### Approach 2: Memoization
-
-The memoization approach optimizes the recursive solution by caching previously computed results to avoid redundant calculations.
-
-#### Implementation
-
-```javascript
-class Solution {
- climbStairs(n, memo = new Map()) {
- if (n === 0 || n === 1) {
- return 1;
- }
-
- if (!memo.has(n)) {
- memo.set(n, this.climbStairs(n - 1, memo) + this.climbStairs(n - 2, memo));
- }
-
- return memo.get(n);
- }
-
- climbStairs(n) {
- const memo = new Map();
- return this.climbStairs(n, memo);
- }
-}
-```
-
-#### Codes in Different Languages
-
-
-
-
- ```javascript
- class Solution {
- climbStairs(n, memo = new Map()) {
- if (n === 0 || n === 1) {
- return 1;
- }
-
- if (!memo.has(n)) {
- memo.set(n, this.climbStairs(n - 1, memo) + this.climbStairs(n - 2, memo));
- }
-
- return memo.get(n);
- }
-
- climbStairs(n) {
- const memo = new Map();
- return this.climbStairs(n, memo);
- }
- }
- ```
-
-
-
-
-
- ```python
- class Solution:
- def climbStairs(self, n: int) -> int:
- memo = {}
- return self.helper(n, memo)
-
- def helper(self, n: int, memo: dict[int, int]) -> int:
- if n == 0 or n == 1:
- return 1
- if n not in memo:
- memo[n] = self.helper(n-1, memo) + self.helper(n-2, memo)
- return memo[n]
- ```
-
-
-
- ```java
- class Solution {
- public int climbStairs(int n) {
- Map memo = new HashMap<>();
- return climbStairs(n, memo);
- }
-
- private int climbStairs(int n, Map memo) {
- if (n == 0 || n == 1) {
- return 1;
- }
- if (!memo.containsKey(n)) {
- memo.put(n, climbStairs(n-1, memo) + climbStairs(n-2, memo));
- }
- return memo.get(n);
- }
- }
- ```
-
-
-
-
- ```cpp
- class Solution {
- public:
- int climbStairs(int n, unordered_map& memo) {
- if (n == 0 || n == 1) {
- return 1;
- }
- if (memo.find(n) == memo.end()) {
- memo[n] = climbStairs(n-1, memo) + climbStairs(n-2, memo);
- }
- return memo[n];
- }
-
- int climbStairs(int n) {
- unordered_map memo;
- return climbStairs(n, memo);
- }
- };
- ```
-
-
-
-#### Complexity Analysis
-
-**Time Complexity:** $O(x * y)$
-- The memoization approach reduces the time complexity to linear by caching previously computed results.
-
-**Space Complexity:** $O(x * y)$
-- The space complexity is determined by the size of the memoization table.
-
-Here is the content for the 'Tabulation' and 'Space Optimization' approaches in the 'climb-stair.md' file:
-
-
-
-### Approach 3: Tabulation
-
-The tabulation approach solves the problem iteratively using dynamic programming. It builds a DP table to store the number of ways to reach each step from the base cases (0 and 1 steps) up to the target step. By iterating through the table and filling in values based on the results of previous steps, we compute the total number of ways to climb the stairs.
-
-#### Implementation
-
-```javascript
-class Solution {
- climbStairs(n) {
- if (n === 0 || n === 1) {
- return 1;
- }
-
- const dp = new Array(n + 1).fill(0);
- dp[0] = dp[1] = 1;
-
- for (let i = 2; i <= n; i++) {
- dp[i] = dp[i - 1] + dp[i - 2];
- }
-
- return dp[n];
- }
-}
-```
-
-#### Codes in Different Languages
-
-
-
-
- ```javascript
- class Solution {
- climbStairs(n) {
- if (n === 0 || n === 1) {
- return 1;
- }
-
- const dp = new Array(n + 1).fill(0);
- dp[0] = dp[1] = 1;
-
- for (let i = 2; i <= n; i++) {
- dp[i] = dp[i - 1] + dp[i - 2];
- }
-
- return dp[n];
- }
- }
- ```
-
-
-
- ```python
- class Solution:
- def climbStairs(self, n: int) -> int:
- if n == 0 or n == 1:
- return 1
-
- dp = [0] * (n+1)
- dp[0] = dp[1] = 1
-
- for i in range(2, n+1):
- dp[i] = dp[i-1] + dp[i-2]
- return dp[n]
- ```
-
-
-
- ```java
- class Solution {
- public int climbStairs(int n) {
- if (n == 0 || n == 1) {
- return 1;
- }
-
- int[] dp = new int[n+1];
- dp[0] = dp[1] = 1;
-
- for (int i = 2; i <= n; i++) {
- dp[i] = dp[i-1] + dp[i-2];
- }
- return dp[n];
- }
- }
- ```
-
-
-
- ```cpp
- class Solution {
- public:
- int climbStairs(int n) {
- if (n == 0 || n == 1) {
- return 1;
- }
-
- vector dp(n+1);
- dp[0] = dp[1] = 1;
-
- for (int i = 2; i <= n; i++) {
- dp[i] = dp[i-1] + dp[i-2];
- }
- return dp[n];
- }
- };
- ```
-
-
-
-#### Complexity Analysis
-
-**Time Complexity:** $O(n)$
-- The tabulation approach iterates through the DP table once, filling in each cell with constant time operations, resulting in linear time complexity.
-
-**Space Complexity:** $O(n)$
-- The space complexity is determined by the size of the DP table, which stores values for each step up to the target step.
-
-
-
-
-### Approach 4: Space Optimization
-
-The space-optimized approach improves upon the tabulation method by reducing the space complexity. Instead of storing the entire DP table, we only keep track of the previous two values since they are sufficient to compute the current value. By updating these values in each iteration, we compute the total number of ways to climb the stairs with constant space usage.
-
-#### Implementation
-
-```javascript
-class Solution {
- climbStairs(n) {
- if (n === 0 || n === 1) {
- return 1;
- }
-
- let prev = 1, curr = 1;
- for (let i = 2; i <= n; i++) {
- let temp = curr;
- curr = prev + curr;
- prev = temp;
- }
-
- return curr;
- }
-}
-```
-
-#### Codes in Different Languages
-
-
-
-
- ```javascript
- class Solution {
- climbStairs(n) {
- if (n === 0 || n === 1) {
- return 1;
- }
-
- let prev = 1, curr = 1;
- for (let i = 2; i <= n; i++) {
- let temp = curr;
- curr = prev + curr;
- prev = temp;
- }
-
- return curr;
- }
-}
- ```
-
-
-
- ```python
- class Solution:
- def climbStairs(self, n: int) -> int:
- if n == 0 or n == 1:
- return 1
- prev, curr = 1, 1
- for i in range(2, n+1):
- temp = curr
- curr = prev + curr
- prev = temp
- return curr
- ```
-
-
-
- ```java
- class Solution {
- public int climbStairs(int n) {
- if (n == 0 || n == 1) {
- return 1;
- }
- int prev = 1, curr = 1;
- for (int i = 2; i <= n; i++) {
- int temp = curr;
- curr = prev + curr;
- prev = temp;
- }
- return curr;
- }
- }
- ```
-
-
-
- ```cpp
- class Solution {
- public:
- int climbStairs(int n) {
- if (n == 0 || n == 1) {
- return 1;
- }
- int prev = 1, curr = 1;
- for (int i = 2; i <= n; i++) {
- int temp = curr;
- curr = prev + curr;
- prev = temp;
- }
- return curr;
- }
- };
- ```
-
-
-
-#### Complexity Analysis
-
-**Time Complexity:** $O(n)$
-- The space-optimized approach iterates through the steps once, updating only two variables in constant time per iteration, resulting in linear time complexity.
-
-**Space Complexity:** $O(1)$
-- The space complexity is constant since we only use two variables to store the previous two values.
-
-
-
-:::tip
-
-When choosing an approach, consider both time and space complexities. For smaller inputs, simpler approaches like recursion might be sufficient, but for larger inputs, optimized solutions like memoization, tabulation, or space-optimized tabulation are more efficient and practical. Always analyze the constraints and requirements of your problem to select the most appropriate method.
-
-:::
-
----
-
-## References
-
-- **LeetCode Problem**: [Maximum Depth of Binary Tree](https://leetcode.com/problems/maximum-depth-of-binary-tree/)
-- **Solution Link**: [LeetCode Solution](https://leetcode.com/problems/maximum-depth-of-binary-tree/solution/)
-- **Authors GeeksforGeeks Profile:** [Vipul](https://www.geeksforgeeks.org/user/lakumvipwjge/)
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/0021-gray-to-binary-equivalent.md b/dsa-solutions/gfg-solutions/0021-gray-to-binary-equivalent.md
deleted file mode 100644
index 068a2d2a0..000000000
--- a/dsa-solutions/gfg-solutions/0021-gray-to-binary-equivalent.md
+++ /dev/null
@@ -1,848 +0,0 @@
----
-id: gray-to-binary-equivalent
-title: Gray to Binary Equivalent
-sidebar_label: 0021 Gray to Binary Equivalent
-tags:
- - Bit Manipulation
- - Brute Force
- - Optimization
- - Space Complexity
- - Time Complexity
- - JavaScript
- - TypeScript
- - Python
- - Java
- - C++
-description: "This document explores different approaches to solving the Gray to Binary Equivalent problem, including brute force, bit manipulation, and optimization techniques, in various programming languages."
----
-
-## Problem
-
-Given an integer number `n`, which is a decimal representation of Gray Code, find the binary equivalent of the Gray Code and return the decimal representation of the binary equivalent.
-
-
-
-### Example
-
-**Example 1:**
-
-```
-Input:
-n = 4
-
-Output:
-7
-
-Explanation:
-Given 4, its gray code = 110.
-Binary equivalent of the gray code 110 is 100.
-Return 7 representing gray code 100.
-```
-
-**Example 2:**
-
-```
-Input:
-n = 15
-
-Output:
-10
-Explanation:
-
-Given 15 representing gray code 1000.
-Binary equivalent of gray code 1000 is 1111.
-Return 10 representing gray code 1111 (binary 1010).
-```
-
-
-**Your Task:** You don't need to read input or print anything. Your task is to complete the function `grayToBinary()` which accepts an integer `n` as an input parameter and returns the decimal representation of the binary equivalent of the given gray code.
-
-- Expected Time Complexity: $ O(log (n)) $.
-- Expected Auxiliary Space: $O(1)$ .
-
-### Constraints:
-- $ 0 <= n <= 10^9$
-
-## Solutions
-
-
-
-
-### Brute Force
-
- This approach uses brute force by first converting the decimal number to binary and then applying Gray Code logic to find the decimal representation of the binary equivalent.
-
-#### Implementation
-- Convert decimal to binary.
-- Apply Gray Code logic to get binary equivalent.
-- Convert binary back to decimal.
-
-```jsx live
-function GrayToBinaryBruteForce() {
- const decimalInput = 15; // Sample input
-
- const grayToBinaryBruteForce = function (n) {
- let binary = [];
- while (n) {
- binary.push(n % 2);
- n = Math.floor(n / 2);
- }
- while (binary.length < 32) {
- binary.push(0);
- }
- binary.reverse();
-
- let grayCode = [];
- let j = 0;
- while (binary[j] === 0) {
- j++;
- }
- grayCode[j] = binary[j];
- for (let i = j + 1; i < 32; i++) {
- grayCode[i] = grayCode[i - 1] ^ binary[i];
- }
-
- let grayCodeNum = 0;
- for (let i = 31; i >= 0; i--) {
- if (grayCode[i]) {
- grayCodeNum += Math.pow(2, 31 - i);
- }
- }
-
- return grayCodeNum;
- };
-
- const result = grayToBinaryBruteForce(decimalInput);
-
- return (
-
-
- Input: n = {decimalInput}
-
-
- Output: {result}
-
-
- );
-}
-```
-
-#### Code Snippets
-
-
-
-
-
- ```javascript
-class Solution {
- decimalToBinary(binary, n) {
- while (n) {
- if (n % 2) binary.push(1);
- else binary.push(0);
- n = Math.floor(n / 2);
- }
-
- while (binary.length < 32) binary.push(0);
-
- binary.reverse();
- }
-
- help(binary) {
- const grayCode = new Array(32).fill(0);
-
- let j = 0;
- while (binary[j] === 0) j++;
-
- grayCode[j] = binary[j];
- for (let i = j + 1; i < 32; i++) {
- grayCode[i] = grayCode[i - 1] ^ binary[i];
- }
-
- let grayCodeNum = 0;
- for (let i = 31; i >= 0; i--) {
- if (grayCode[i]) grayCodeNum += 2 ** (31 - i);
- }
-
- return grayCodeNum;
- }
-
- grayToBinary(n) {
- const binary = [];
- this.decimalToBinary(binary, n);
- return this.help(binary);
- }
-}
-
- ```
-
-
-
-
- ```typescript
-class Solution {
- decimalToBinary(binary: number[], n: number): void {
- while (n) {
- if (n % 2) binary.push(1);
- else binary.push(0);
- n = Math.floor(n / 2);
- }
-
- while (binary.length < 32) binary.push(0);
-
- binary.reverse();
- }
-
- help(binary: number[]): number {
- const grayCode: number[] = new Array(32).fill(0);
-
- let j = 0;
- while (binary[j] === 0) j++;
-
- grayCode[j] = binary[j];
- for (let i = j + 1; i < 32; i++) {
- grayCode[i] = grayCode[i - 1] ^ binary[i];
- }
-
- let grayCodeNum = 0;
- for (let i = 31; i >= 0; i--) {
- if (grayCode[i]) grayCodeNum += 2 ** (31 - i);
- }
-
- return grayCodeNum;
- }
-
- grayToBinary(n: number): number {
- const binary: number[] = [];
- this.decimalToBinary(binary, n);
- return this.help(binary);
- }
-}
-
- ```
-
-
-
-
- ```cpp
-class Solution{
- public:
- void decimalToBinary(vector& binary,int n)
- {
- while(n)
- {
- if((n%2))
- binary.push_back(1);
- else
- binary.push_back(0);
-
- n/=2;
- }
-
- while(binary.size()<32)
- binary.push_back(0);
-
- reverse(binary.begin(),binary.end());
- }
- int help(vector& binary)
- {
- vector grayCode(32,0);
-
- int j=0;
- while(binary[j]==0)
- j++;
-
- grayCode[j]=binary[j];
- for(int i=j+1;i<32;i++)
- grayCode[i]=grayCode[i-1]^binary[i];
-
- int grayCodeNum=0;
- for(int i=31;i>=0;i--)
- {
- if(grayCode[i])
- grayCodeNum+=pow(2,31-i);
- }
- return grayCodeNum;
- }
- int grayToBinary(int n)
- {
- vector binary;
- decimalToBinary(binary,n);
- return help(binary);
- }
-};
- ```
-
-
-
-
- ```python
-class Solution:
- def decimalToBinary(self, binary, n):
- while n:
- if n % 2:
- binary.append(1)
- else:
- binary.append(0)
- n //= 2
-
- while len(binary) < 32:
- binary.append(0)
-
- binary.reverse()
-
- def help(self, binary):
- grayCode = [0] * 32
-
- j = 0
- while binary[j] == 0:
- j += 1
-
- grayCode[j] = binary[j]
- for i in range(j + 1, 32):
- grayCode[i] = grayCode[i - 1] ^ binary[i]
-
- grayCodeNum = 0
- for i in range(31, -1, -1):
- if grayCode[i]:
- grayCodeNum += 2 ** (31 - i)
-
- return grayCodeNum
-
- def grayToBinary(self, n):
- binary = []
- self.decimalToBinary(binary, n)
- return self.help(binary)
-
- ```
-
-
-
-
- ```java
-import java.util.*;
-
-class Solution {
- void decimalToBinary(ArrayList binary, int n) {
- while (n > 0) {
- if (n % 2 == 1) binary.add(1);
- else binary.add(0);
- n /= 2;
- }
-
- while (binary.size() < 32) binary.add(0);
-
- Collections.reverse(binary);
- }
-
- int help(ArrayList binary) {
- int[] grayCode = new int[32];
-
- int j = 0;
- while (binary.get(j) == 0) j++;
-
- grayCode[j] = binary.get(j);
- for (int i = j + 1; i < 32; i++) {
- grayCode[i] = grayCode[i - 1] ^ binary.get(i);
- }
-
- int grayCodeNum = 0;
- for (int i = 31; i >= 0; i--) {
- if (grayCode[i] == 1) grayCodeNum += Math.pow(2, 31 - i);
- }
-
- return grayCodeNum;
- }
-
- int grayToBinary(int n) {
- ArrayList binary = new ArrayList<>();
- decimalToBinary(binary, n);
- return help(binary);
- }
-}
- ```
-
-
-
-
-#### Complexity Analysis
-- Time complexity: O(logN)
-- Space complexity: O(32) (constant)
-
-
-
-
-
-### Bit Manipulation
-
- This approach utilizes bit manipulation to directly compute the Gray Code's binary equivalent without converting to binary first.
-
-#### Implementation
-
-- Use bit manipulation to apply Gray Code logic directly.
-
-```jsx live
-function GrayToBinaryBitManipulation() {
- const decimalInput = 15; // Sample input
-
- const grayToBinaryBitManipulation = function (n) {
- let grayCodeDecimal = 0;
- let mask = 0;
- let i = 0;
- while (n > 0) {
- if (i % 2 === 0) {
- grayCodeDecimal ^= n;
- } else {
- mask ^= n;
- }
- n >>= 1;
- i++;
- }
- grayCodeDecimal ^= mask;
- return grayCodeDecimal;
- };
-
- const result = grayToBinaryBitManipulation(decimalInput);
-
- return (
-
-
- Input: n = {decimalInput}
-
-
- Output: {result}
-
-
- );
-}
-```
-
-#### Code Snippets
-
-
-
-
- ```javascript
-class Solution {
- help(n) {
- const grayCode = new Array(32).fill(0);
-
- let j = 0;
- while (j <= 31 && (n & (1 << (31 - j))) === 0) {
- j++;
- }
-
- grayCode[j] = !!(n & (1 << (31 - j)));
- for (let i = j + 1; i < 32; i++) {
- const bin = !!(n & (1 << (31 - i)));
- const gray = grayCode[i - 1];
- grayCode[i] = bin ^ gray;
- }
-
- let grayCodeDecimal = 0;
- for (let i = 31; i >= 0; i--) {
- if (grayCode[i]) {
- grayCodeDecimal |= (1 << (31 - i));
- }
- }
-
- return grayCodeDecimal;
- }
-
- grayToBinary(n) {
- return this.help(n);
- }
-}
- ```
-
-
-
-
- ```typescript
-class Solution {
- help(n: number): number {
- const grayCode: number[] = new Array(32).fill(0);
-
- let j = 0;
- while (j <= 31 && (n & (1 << (31 - j))) === 0) {
- j++;
- }
-
- grayCode[j] = !!(n & (1 << (31 - j)));
- for (let i = j + 1; i < 32; i++) {
- const bin = !!(n & (1 << (31 - i)));
- const gray = grayCode[i - 1];
- grayCode[i] = bin ^ gray;
- }
-
- let grayCodeDecimal = 0;
- for (let i = 31; i >= 0; i--) {
- if (grayCode[i]) {
- grayCodeDecimal |= (1 << (31 - i));
- }
- }
-
- return grayCodeDecimal;
- }
-
- grayToBinary(n: number): number {
- return this.help(n);
- }
-}
- ```
-
-
-
-
- ```cpp
-class Solution{
- public:
- int help(int n)
- {
- vector grayCode(32,0);
-
- int j=0;
- while(j<=31 and (n&(1<<(31-j)))==0)
- j++;
-
- grayCode[j]=bool(n&(1<<(31-j)));
- for(int i=j+1;i<32;i++)
- {
- int bin=bool(n&(1<<(31-i)));
- int gray=grayCode[i-1];
- grayCode[i]=bin^gray;
- }
-
- int grayCodeDecimal=0;
- for(int i=31;i>=0;i--)
- {
- if(grayCode[i])
- grayCodeDecimal|=(1<<31-i);
- }
-
- return grayCodeDecimal;
- }
- int grayToBinary(int n)
- {
- return help(n);
- }
-};
- ```
-
-
-
-
- ```python
-class Solution:
- def help(self, n):
- grayCode = [0] * 32
-
- j = 0
- while j <= 31 and (n & (1 << (31 - j))) == 0:
- j += 1
-
- grayCode[j] = bool(n & (1 << (31 - j)))
- for i in range(j + 1, 32):
- bin_val = bool(n & (1 << (31 - i)))
- gray_val = grayCode[i - 1]
- grayCode[i] = bin_val ^ gray_val
-
- grayCodeDecimal = 0
- for i in range(31, -1, -1):
- if grayCode[i]:
- grayCodeDecimal |= (1 << (31 - i))
-
- return grayCodeDecimal
-
- def grayToBinary(self, n):
- return self.help(n)
- ```
-
-
-
-
- ```java
- import java.util.*;
-
-class Solution {
- int help(int n) {
- int[] grayCode = new int[32];
-
- int j = 0;
- while (j <= 31 && (n & (1 << (31 - j))) == 0) {
- j++;
- }
-
- grayCode[j] = (n & (1 << (31 - j))) == 0 ? 0 : 1;
- for (int i = j + 1; i < 32; i++) {
- int bin = (n & (1 << (31 - i))) == 0 ? 0 : 1;
- int gray = grayCode[i - 1];
- grayCode[i] = bin ^ gray;
- }
-
- int grayCodeDecimal = 0;
- for (int i = 31; i >= 0; i--) {
- if (grayCode[i] == 1) {
- grayCodeDecimal |= (1 << (31 - i));
- }
- }
-
- return grayCodeDecimal;
- }
-
- int grayToBinary(int n) {
- return help(n);
- }
-}
- ```
-
-
-
-
-#### Complexity Analysis:
-- Time complexity: O(32) (constant)
-- Space complexity: O(32) (constant)
-
-
-
-
-
-### Optimized
-
- This approach optimizes the bit manipulation approach by directly calculating the Gray Code's binary equivalent without using extra storage.
-
-#### Implementation
-
-- Use bit manipulation without extra storage.
-
-```jsx live
-function GrayToBinaryOptimized() {
- const decimalInput = 15; // Sample input
-
- const grayToBinaryOptimized = function (n) {
- let ans = 0;
- while (n > 0) {
- ans ^= n;
- n >>= 1;
- }
- return ans;
- };
-
- const result = grayToBinaryOptimized(decimalInput);
-
- return (
-
-
- Input: n = {decimalInput}
-
-
- Output: {result}
-
-
- );
-}
-```
-
-
-#### Code Snippets
-
-
-
-
- ```javascript
-class Solution {
- help(n) {
- const grayCode = new Array(32).fill(0);
-
- let j = 0;
- while (j <= 31 && (n & (1 << (31 - j))) === 0) {
- j++;
- }
-
- grayCode[j] = !!(n & (1 << (31 - j)));
- for (let i = j + 1; i < 32; i++) {
- const bin = !!(n & (1 << (31 - i)));
- const gray = grayCode[i - 1];
- grayCode[i] = bin ^ gray;
- }
-
- let grayCodeDecimal = 0;
- for (let i = 31; i >= 0; i--) {
- if (grayCode[i]) {
- grayCodeDecimal |= (1 << (31 - i));
- }
- }
-
- return grayCodeDecimal;
- }
-
- grayToBinary(n) {
- return this.help(n);
- }
-}
- ```
-
-
-
-
- ```typescript
-class Solution {
- help(n: number): number {
- const grayCode: number[] = new Array(32).fill(0);
-
- let j = 0;
- while (j <= 31 && (n & (1 << (31 - j))) === 0) {
- j++;
- }
-
- grayCode[j] = !!(n & (1 << (31 - j)));
- for (let i = j + 1; i < 32; i++) {
- const bin = !!(n & (1 << (31 - i)));
- const gray = grayCode[i - 1];
- grayCode[i] = bin ^ gray;
- }
-
- let grayCodeDecimal = 0;
- for (let i = 31; i >= 0; i--) {
- if (grayCode[i]) {
- grayCodeDecimal |= (1 << (31 - i));
- }
- }
-
- return grayCodeDecimal;
- }
-
- grayToBinary(n: number): number {
- return this.help(n);
- }
-}
- ```
-
-
-
-
- ```cpp
-class Solution{
- public:
- int help(int n)
- {
- vector grayCode(32,0);
-
- int j=0;
- while(j<=31 and (n&(1<<(31-j)))==0)
- j++;
-
- grayCode[j]=bool(n&(1<<(31-j)));
- for(int i=j+1;i<32;i++)
- {
- int bin=bool(n&(1<<(31-i)));
- int gray=grayCode[i-1];
- grayCode[i]=bin^gray;
- }
-
- int grayCodeDecimal=0;
- for(int i=31;i>=0;i--)
- {
- if(grayCode[i])
- grayCodeDecimal|=(1<<31-i);
- }
-
- return grayCodeDecimal;
- }
- int grayToBinary(int n)
- {
- return help(n);
- }
-};
- ```
-
-
-
-
- ```python
- class Solution:
- def help(self, n):
- grayCode = [0] * 32
-
- j = 0
- while j <= 31 and (n & (1 << (31 - j))) == 0:
- j += 1
-
- grayCode[j] = bool(n & (1 << (31 - j)))
- for i in range(j + 1, 32):
- bin_val = bool(n & (1 << (31 - i)))
- gray_val = grayCode[i - 1]
- grayCode[i] = bin_val ^ gray_val
-
- grayCodeDecimal = 0
- for i in range(31, -1, -1):
- if grayCode[i]:
- grayCodeDecimal |= (1 << (31 - i))
-
- return grayCodeDecimal
-
- def grayToBinary(self, n):
- return self.help(n)
- ```
-
-
-
-
- ```java
-import java.util.*;
-
-class Solution {
- int help(int n) {
- int[] grayCode = new int[32];
-
- int j = 0;
- while (j <= 31 && (n & (1 << (31 - j))) == 0) {
- j++;
- }
-
- grayCode[j] = (n & (1 << (31 - j))) == 0 ? 0 : 1;
- for (int i = j + 1; i < 32; i++) {
- int bin = (n & (1 << (31 - i))) == 0 ? 0 : 1;
- int gray = grayCode[i - 1];
- grayCode[i] = bin ^ gray;
- }
-
- int grayCodeDecimal = 0;
- for (int i = 31; i >= 0; i--) {
- if (grayCode[i] == 1) {
- grayCodeDecimal |= (1 << (31 - i));
- }
- }
-
- return grayCodeDecimal;
- }
-
- int grayToBinary(int n) {
- return help(n);
- }
-}
- ```
-
-
-
-
-#### Complexity Analysis
-
-- Time complexity: O(32) (constant)
-- Space complexity: O(1) (constant)
-
-
-
-
-:::tip Note
-
-To convert Gray code to binary efficiently, consider using bit manipulation techniques. Bitwise operations such as XOR (^) can be particularly useful in simplifying the conversion process, leading to optimized solutions with constant time complexity.
-
-:::
-
----
-
-## References
-
-- **LeetCode Problem:** [Best Time to Buy and Sell Stock](https://leetcode.com/problems/best-time-to-buy-and-sell-stock/)
-- **Solution Link:** [Best Time to Buy and Sell Stock Solution on LeetCode](https://leetcode.com/problems/best-time-to-buy-and-sell-stock/solutions/)
-- **Authors GeeksforGeeks Profile:** [Vipul lakum](https://www.geeksforgeeks.org/user/lakumvipwjge/)
diff --git a/dsa-solutions/gfg-solutions/0022-lemonade-change.md b/dsa-solutions/gfg-solutions/0022-lemonade-change.md
deleted file mode 100644
index 2bd5a1485..000000000
--- a/dsa-solutions/gfg-solutions/0022-lemonade-change.md
+++ /dev/null
@@ -1,254 +0,0 @@
----
-id: lemonade-change
-title: Lemonade Change
-sidebar_label: 0022 Lemonade Change
-tags:
-- Greedy Algorithm
-- JavaScript
-- TypeScript
-- Python
-- Java
-- C++
-description: "This document explores different approaches to solving the lemonade change problem, including an easy C++ solution with a greedy algorithm approach."
----
-
-## Problem
-
-You are an owner of lemonade island, each lemonade costs \$5. Customers are standing in a queue to buy from you and order one at a time (in the order specified by given array `bills[]`). Each customer will only buy one lemonade and pay with either a \$5, \$10, or \$20 bill. You must provide the correct change to each customer so that the net transaction is that the customer pays \$5.
-
-**Note:** At first, you do not have any bill to provide changes with. You can provide changes from the bills that you get from the previous customers.
-
-Given an integer array bills of size N where bills[i] is the bill the ith customer pays, return true if you can provide every customer with the correct change, or false otherwise.
-
-### Examples
-
-**Example 1:**
-
-```
-Input:
-N = 5
-bills[] = {5, 5, 5, 10, 20}
-
-Output:
-True
-```
-
-**Explanation:**
-From the first 3 customers, we collect three \$5 bills in order.
-From the fourth customer, we collect a \$10 bill and give back a \$5.
-From the fifth customer, we give a \$10 bill and a \$5 bill.
-Since all customers got correct change we return true.
-
-**Example 2:**
-
-```
-Input:
-N = 5
-bills[] = {5, 5, 10, 10, 20}
-
-Output:
-False
-```
-
-**Explanation:**
-From the first two customers in order, we collect two \$5 bills.
-For the next two customers in order, we collect a \$10 bill and give back a \$5 bill.
-For the last customer, we can not give the change of \$15 back because we only have two \$10 bills.
-Since not every customer received the correct change, the answer is false.
-
-### Your Task
-You don't need to read input or print anything. Your task is to complete the function `lemonadeChange()` which takes the integer `N` and integer array `bills[]` as parameters and returns true if it is possible to provide change to every customer otherwise false.
-
-**Expected Time Complexity:** $O(N)$
-**Expected Auxiliary Space:** $O(1)$
-
-### Constraints
-- $1 ≤ N ≤ 10^5$
-- $bills[i]$ contains only {5, 10, 20}
-
-## Solution
-
-### Approach
-
-We can solve this problem using a greedy algorithm. Here's a step-by-step approach:
-
-1. Initialize two variables `five` and `ten` to keep count of the number of \$5 and \$10 bills available.
-2. Iterate through the bills array using a for loop.
-3. For each bill:
- - If the customer pays \$20, we need to return \$15. We first check if we have 1 * \$10 + 1 * \$5. If not, we check for 3 * \$5. If neither combination is available, we return false.
- - If the customer pays \$10, we need to return \$5. We check if we have any \$5 bills. If not, we return false.
- - If the customer pays \$5, we simply increase the count of \$5 bills.
-4. Finally, return true if we can provide the correct change for all customers.
-
-### Implementation
-
-
-
-
-```cpp
-class Solution {
-public:
- bool lemonadeChange(int n, vector &bills) {
- int five = 0, ten = 0;
- for (int i = 0; i < n; i++) {
- if (bills[i] == 20) {
- if (ten && five) {
- ten--;
- five--;
- } else if (five >= 3) {
- five -= 3;
- } else {
- return false;
- }
- } else if (bills[i] == 10) {
- ten++;
- if (five) {
- five--;
- } else {
- return false;
- }
- } else {
- five++;
- }
- }
- return true;
- }
-};
-```
-
-
-
-
-```javascript
-function lemonadeChange(bills) {
- let five = 0, ten = 0;
- for (let bill of bills) {
- if (bill === 20) {
- if (ten > 0 && five > 0) {
- ten--;
- five--;
- } else if (five >= 3) {
- five -= 3;
- } else {
- return false;
- }
- } else if (bill === 10) {
- ten++;
- if (five > 0) {
- five--;
- } else {
- return false;
- }
- } else {
- five++;
- }
- }
- return true;
-}
-```
-
-
-
-
-```typescript
-function lemonadeChange(bills: number[]): boolean {
- let five = 0, ten = 0;
- for (let bill of bills) {
- if (bill === 20) {
- if (ten > 0 && five > 0) {
- ten--;
- five--;
- } else if (five >= 3) {
- five -= 3;
- } else {
- return false;
- }
- } else if (bill === 10) {
- ten++;
- if (five > 0) {
- five--;
- } else {
- return false;
- }
- } else {
- five++;
- }
- }
- return true;
-}
-```
-
-
-
-
-```python
-class Solution:
- def lemonadeChange(self, bills: List[int]) -> bool:
- five, ten = 0, 0
- for bill in bills:
- if bill == 20:
- if ten > 0 and five > 0:
- ten -= 1
- five -= 1
- elif five >= 3:
- five -= 3
- else:
- return False
- elif bill == 10:
- ten += 1
- if five > 0:
- five -= 1
- else:
- return False
- else:
- five += 1
- return True
-```
-
-
-
-
-```java
-class Solution {
- public boolean lemonadeChange(int[] bills) {
- int five = 0, ten = 0;
- for (int bill : bills) {
- if (bill == 20) {
- if (ten > 0 && five > 0) {
- ten--;
- five--;
- } else if (five >= 3) {
- five -= 3;
- } else {
- return false;
- }
- } else if (bill == 10) {
- ten++;
- if (five > 0) {
- five--;
- } else {
- return false;
- }
- } else {
- five++;
- }
- }
- return true;
- }
-}
-```
-
-
-
-
-### Complexity Analysis
-
-- **Time Complexity:** $O(N)$, where N is the length of the bills array. We iterate through the array once.
-- **Space Complexity:** $O(1)$, as we only use a constant amount of extra space for variables `five` and `ten`.
-
----
-
-## References
-
-- **LeetCode Problem:** [Lemonade Change](https://www.geeksforgeeks.org/problems/lemonade-change/0)
-- **Authors GeeksforGeeks Profile:** [Vipul lakum](https://www.geeksforgeeks.org/user/lakumvipwjge/)
diff --git a/dsa-solutions/gfg-solutions/0022-minimum-number-of-jumps.md b/dsa-solutions/gfg-solutions/0022-minimum-number-of-jumps.md
deleted file mode 100644
index 03b70703f..000000000
--- a/dsa-solutions/gfg-solutions/0022-minimum-number-of-jumps.md
+++ /dev/null
@@ -1,349 +0,0 @@
----
-id: minimum-number-of-jumps
-title: Minimum number of jumps
-sidebar_label: 0022 Minimum number of jumps
-tags:
-- Arrays
-- greedy
-- Data Structure
-- Algorithms
-description: "find the minimum number of jumps required to reach the end of an array, given that each element represents the maximum length of the jump that can be made from that position."
-
----
-## Problem Description
-
-The problem is to find the minimum number of jumps required to reach the end of an array. Each element in the array represents the maximum length of the jump that can be made from that element. If an element is 0, it means no movement can be made through that element. The task is to return the minimum number of jumps to reach the end of the array starting from the first element. If reaching the end is not possible, the function should return -1.
-
-## Example
-
-Consider an array of 9 elements starting from 1 to 9 .
-The minimum number of jumps required would be 3:
-1. Jump from the 1st element to the 2nd element (value 3).
-2. From the 2nd element, jump to the 5th element (value 9).
-3. Finally, jump to the last element.
-
-## Expected Complexity
-
-- Time Complexity: $(O(N))$
-- Space Complexity: $(O(1))$
-
-## Solutions
-
-### Brute Force Approach
-
-#### Intuition
-
-The brute force approach involves recursively checking all possible jumps from each element, calculating the minimum number of jumps needed to reach the end from reachable elements.
-
-#### Implementation
-
-The implementation recursively checks all possible jumps from each element, updating the minimum number of jumps needed.
-
-```cpp
-class Solution {
-public:
- int minimumJumps(int arr[], int n) {
- if (n == 1)
- return 0;
-
- int ans = INT_MAX;
- for (int i = n - 2; i >= 0; i--) {
- if (i + arr[i] >= n - 1) {
- int sub_ans = minimumJumps(arr, i + 1);
- if (sub_ans != INT_MAX)
- ans = min(ans, sub_ans + 1);
- }
- }
- return (ans==INT_MAX ? -1 : ans);
- }
-};
-```
-
-### Brute Optimized Approach
-
-#### Intuition
-
-In this approach, we use dynamic programming to store the minimum number of jumps required to reach each index from the start.
-
-#### Implementation
-
-The code initializes an array to store the minimum jumps required and iterates through the array to calculate the minimum jumps.
-
-```cpp
-class Solution {
-public:
- int minimumJumps(int arr[], int n) {
- int jumps[n];
- if (arr[0] == 0)
- return -1;
-
- jumps[0] = 0;
- for (int i = 1; i < n; i++) {
- jumps[i] = INT_MAX;
- for (int j = 0; j < i; j++) {
- if (i <= j + arr[j] && jumps[j] != INT_MAX) {
- jumps[i] = min(jumps[i], jumps[j] + 1);
- break;
- }
- }
- }
- return (jumps[n - 1] == INT_MAX ? -1 : jumps[n-1]);
- }
-};
-```
-
-#### Python Implementation
-
-```python
-class Solution:
- def minJumps(self, arr, n):
- if len(arr) <= 1 :
- return 0
-
- # Return -1 if not possible to jump
- if arr[0] == 0 :
- return -1
-
- # initialization
- maxReach = arr[0];
- step = arr[0];
- jump = 1;
-
-
- # Start traversing array
- for i in range(1,len(arr)):
-
- # Check if we have reached the end of the array
- if i == len(arr) - 1 :
- return jump
-
- # updating maxReach
- maxReach = max(maxReach, i+arr[i])
-
- # we use a step to get to the current index
- step-=1;
-
- # If no further steps left
- if step == 0 :
- # we must have used a jump
- jump+=1
-
- #Check if the current index/position or lesser index
- #is the maximum reach point from the previous indexes
- if i>=maxReach :
- return -1
-
- #re-initialize the steps to the amount
- #of steps to reach maxReach from position i.
- step = maxReach - i
-
- return -1
-```
-
-#### Java Implementation
-
-```java
-class Solution {
- static int minJumps(int arr[])
- {
- if (arr.length <= 1)
- return 0;
-
- // Return -1 if not possible to jump
- if (arr[0] == 0)
- return -1;
-
- // initialization
- int maxReach = arr[0];
- int step = arr[0];
- int jump = 1;
-
-
- // Start traversing array
- for (int i = 1; i < arr.length; i++)
- {
- // Check if we have reached the end of the array
- if (i == arr.length - 1)
- return jump;
-
- // updating maxReach
- maxReach = Math.max(maxReach, i+arr[i]);
-
- // we use a step to get to the current index
- step--;
-
- // If no further steps left
- if (step == 0)
- {
- // we must have used a jump
- jump++;
-
- //Check if the current index/position or lesser index
- // is the maximum reach point from the previous indexes
- if(i>=maxReach)
- return -1;
-
- // re-initialize the steps to the amount
- // of steps to reach maxReach from position i.
- step = maxReach - i;
- }
- }
-
- return -1;
- }
-}
-```
-
-### Expected Approach
-
-#### Intuition
-
-This approach involves maintaining the maximum reachable index from the current index and the number of steps we can jump if we jump from the current index. By iterating through the array, we update these values accordingly.
-
-#### Implementation
-
-The implementation traverses the array, updating the maximum reachable index and the number of steps at each iteration.
-
-```cpp
-class Solution {
-public:
- int minJumps(int arr[], int n) {
- if (n <= 1)
- return 0;
- if (arr[0] == 0)
- return -1;
-
- int maxReach = arr[0];
- int step = arr[0];
- int jump = 1;
-
- for (int i = 1; i < n; i++) {
- if (i == n - 1)
- return jump;
- maxReach = max(maxReach, i+arr[i]);
- step--;
- if (step ==0) {
- jump++;
- if (i >= maxReach)
- return -1;
- step = maxReach - i;
- }
- }
- return -1;
- }
-};
-```
-
-#### Python Implementation
-
-```python
-class Solution:
- def minJumps(self, arr, n):
- if len(arr) <= 1 :
- return 0
-
- # Return -1 if not possible to jump
- if arr[0] == 0 :
- return -1
-
- # initialization
- maxReach = arr[0];
- step = arr[0];
- jump = 1;
-
-
- # Start traversing array
- for i in range(1,len(arr)):
-
- # Check if we have reached the end of the array
- if i == len(arr) - 1 :
- return jump
-
- # updating maxReach
- maxReach = max(maxReach, i+arr[i])
-
- # we use a step to get to the current index
- step-=1;
-
- # If no further steps left
- if step == 0 :
- # we must have used a jump
- jump+=1
-
- #Check if the current index/position or lesser index
- #is the maximum reach point from the previous indexes
- if i>=maxReach :
- return -1
-
- #re-initialize the steps to the amount
- #of steps to reach maxReach from position i.
- step = maxReach - i
-
- return -1
-```
-
-#### Java Implementation
-
-```java
-class Solution {
- static int minJumps(int arr[])
- {
- if (arr.length <= 1)
- return 0;
-
- // Return -1 if not possible to jump
- if (arr[0] == 0)
- return -1;
-
- // initialization
- int maxReach = arr[0];
- int step = arr[0];
- int jump = 1;
-
-
- // Start traversing array
- for (int i = 1; i < arr.length; i++)
- {
- // Check if we have reached the end of the array
- if (i == arr.length - 1)
- return jump;
-
- // updating maxReach
- maxReach = Math.max(maxReach, i+arr[i]);
-
- // we use a step to get to the current index
- step--;
-
- // If no further steps left
- if (step == 0)
- {
- // we must have used a jump
- jump++;
-
- //Check if the current index/position or lesser index
- // is the maximum reach point from the previous indexes
- if(i>=maxReach)
- return -1;
-
- // re-initialize the steps to the amount
- // of steps to reach maxReach from position i.
- step = maxReach - i;
- }
- }
-
- return -1;
- }
-}
-```
-
-## Conclusion
-
-In conclusion, the problem of finding the minimum number of jumps to reach the end of an array can be efficiently solved using dynamic programming or an optimized approach that tracks the maximum reachable index and the number of steps available. The expected approach offers the best time complexity of $(O(N))$ and space complexity of $(O(1))$, making it the most efficient solution for large input sizes.
-
-By implementing these solutions, we can effectively solve the problem with minimal time and space complexity, providing a scalable solution for real-world applications.
-
-## References
-
-- **GeeksforGeeks Problem:** [Geeks for Geeks Problem](https://www.geeksforgeeks.org/problems/minimum-number-of-jumps-1587115620/1)
-- **Solution Link:** [Minimum Number of jumps on Geeks for Geeks](https://www.geeksforgeeks.org/problems/minimum-number-of-jumps-1587115620/1)
-- **Authors GeeksforGeeks Profile:** [Yash](https://www.geeksforgeeks.org/user/gabaniyxn26/)
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/0023-Find-triplet-with-zero-sum.md b/dsa-solutions/gfg-solutions/0023-Find-triplet-with-zero-sum.md
deleted file mode 100644
index 6f4d0d97e..000000000
--- a/dsa-solutions/gfg-solutions/0023-Find-triplet-with-zero-sum.md
+++ /dev/null
@@ -1,196 +0,0 @@
----
-id: Find-triplet-with-zero-sum
-title: Find Triplet with Zero Sum
-sidebar_label: 0023 Find Triplet with Zero Sum
-tags:
-- Array
-- Sorting
-- Two Pointers
-- JavaScript
-- TypeScript
-- Python
-- Java
-- C++
-description: "This document explores different approaches to solving the problem of finding a triplet in an array that sums up to zero, including solutions in JavaScript, TypeScript, Python, Java, and C++."
----
-
-## Problem Statement
-
-Given an array `arr[]` of distinct integers of size N, the task is to find if there are any three elements in `arr[]` whose sum is equal to zero.
-
-### Examples
-
-**Example 1:**
-
-```
-Input:
-N = 5
-arr[] = {-1, 0, 1, 2, -1, -4}
-
-Output:
-True
-
-Explanation:
-The triplets {-1, 0, 1} and {-1, -1, 2} both have a sum of zero.
-```
-
-**Example 2:**
-
-```
-Input:
-N = 3
-arr[] = {1, 2, 3}
-
-Output:
-False
-
-Explanation:
-No triplet has a sum of zero.
-```
-
-### Your Task
-You don't need to read input or print anything. Your task is to complete the function `findTriplet()` which takes the integer `N` and integer array `arr[]` as parameters and returns true if there is a triplet with a sum of zero, otherwise false.
-
-**Expected Time Complexity:** $O(N^2)$
-**Expected Auxiliary Space:** $O(1)$
-
-### Constraints
-
-
-- $1 ≤ N ≤ 10^5$
-- $-10^3 ≤ arr[i] ≤ 10^3$
-
-## Solution
-
-### Approach
-
-We can solve this problem using sorting and the two-pointer technique. Here's a step-by-step approach:
-
-1. Sort the array.
-2. Iterate through the array using a for loop, fixing one element at a time.
-3. Use two pointers to find the other two elements that sum up to zero with the fixed element:
- - One pointer starts from the next element after the fixed element.
- - The other pointer starts from the end of the array.
-4. Adjust the pointers based on the sum of the three elements:
- - If the sum is zero, return true.
- - If the sum is less than zero, move the left pointer to the right.
- - If the sum is greater than zero, move the right pointer to the left.
-5. If no triplet is found, return false.
-
-### Implementation
-
-
-
-
-```cpp
-class Solution {
-public:
- bool findTriplet(int arr[], int n) {
- sort(arr, arr + n);
- for (int i = 0; i < n - 2; i++) {
- int left = i + 1, right = n - 1;
- while (left < right) {
- int sum = arr[i] + arr[left] + arr[right];
- if (sum == 0) return true;
- if (sum < 0) left++;
- else right--;
- }
- }
- return false;
- }
-};
-```
-
-
-
-
-```javascript
-function findTriplet(arr) {
- arr.sort((a, b) => a - b);
- for (let i = 0; i < arr.length - 2; i++) {
- let left = i + 1, right = arr.length - 1;
- while (left < right) {
- const sum = arr[i] + arr[left] + arr[right];
- if (sum === 0) return true;
- if (sum < 0) left++;
- else right--;
- }
- }
- return false;
-}
-```
-
-
-
-
-```typescript
-function findTriplet(arr: number[]): boolean {
- arr.sort((a, b) => a - b);
- for (let i = 0; i < arr.length - 2; i++) {
- let left = i + 1, right = arr.length - 1;
- while (left < right) {
- const sum = arr[i] + arr[left] + arr[right];
- if (sum === 0) return true;
- if (sum < 0) left++;
- else right--;
- }
- }
- return false;
-}
-```
-
-
-
-
-```python
-class Solution:
- def findTriplet(self, arr: List[int], n: int) -> bool:
- arr.sort()
- for i in range(n - 2):
- left, right = i + 1, n - 1
- while left < right:
- total = arr[i] + arr[left] + arr[right]
- if total == 0:
- return True
- if total < 0:
- left += 1
- else:
- right -= 1
- return False
-```
-
-
-
-
-```java
-class Solution {
- public boolean findTriplet(int[] arr, int n) {
- Arrays.sort(arr);
- for (int i = 0; i < n - 2; i++) {
- int left = i + 1, right = n - 1;
- while (left < right) {
- int sum = arr[i] + arr[left] + arr[right];
- if (sum == 0) return true;
- if (sum < 0) left++;
- else right--;
- }
- }
- return false;
- }
-}
-```
-
-
-
-
-### Complexity Analysis
-
-- **Time Complexity:** $O(N^2)$, where N is the length of the array. We iterate through the array and for each element, we use the two-pointer technique which takes linear time.
-- **Space Complexity:** $O(1)$, as we only use a constant amount of extra space for variables.
-
----
-
-## References
-
-- **GeeksforGeeks Problem:** [Find Triplet with Zero Sum](https://www.geeksforgeeks.org/find-triplet-sum-zero/)
-- **Authors GeeksforGeeks Profile:** [Vipul lakum](https://www.geeksforgeeks.org/user/lakumvipwjge/)
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/0024-minimum-indexed-character.md b/dsa-solutions/gfg-solutions/0024-minimum-indexed-character.md
deleted file mode 100644
index 2d1b5ac8d..000000000
--- a/dsa-solutions/gfg-solutions/0024-minimum-indexed-character.md
+++ /dev/null
@@ -1,181 +0,0 @@
----
-id: minimum-indexed-character
-title: Minimum Indexed Character
-sidebar_label: 0024 Minimum Indexed Character
-tags:
-- String
-- Hashing
-- JavaScript
-- TypeScript
-- Python
-- Java
-- C++
-description: "This document explores different approaches to solving the problem of finding the minimum index of a character in a string that is also present in another string, including solutions in JavaScript, TypeScript, Python, Java, and C++."
----
-
-## Problem
-
-Given a string `str` and another string `patt`, find the minimum index of the character in `str` that is also present in `patt`.
-
-### Examples
-
-**Example 1:**
-
-```
-Input:
-str = "geeksforgeeks"
-patt = "set"
-
-Output:
-1
-
-Explanation:
-'e' is the character which is present in the given string "geeksforgeeks" and is also present in "set". The minimum index of 'e' is 1.
-```
-
-**Example 2:**
-
-```
-Input:
-str = "adcffaet"
-patt = "onkl"
-
-Output:
--1
-
-Explanation:
-There are no characters that are common in "patt" and "str".
-```
-
-### Your Task
-You only need to complete the function `minIndexChar()` that returns the index of the answer in `str` or returns `-1` if no character of `patt` is present in `str`.
-
-**Expected Time Complexity:** $O(N)$
-**Expected Auxiliary Space:** $O(Number of distinct characters)$
-
-### Constraints
-
-- $1 ≤ |str|,|patt| ≤ 10^5$
-- $'a' ≤ str[i], patt[i] ≤ 'z'$
-
-## Solution
-
-### Approach
-
-To solve this problem, we can follow these steps:
-
-1. Iterate through the characters in the `patt` string.
-2. For each character in `patt`, find its index in the `str` string using the `find` method.
-3. Store the indices in a vector.
-4. Iterate through the vector to find the minimum index that is not `-1` (indicating the character is found in `str`).
-5. If no valid index is found, return `-1`; otherwise, return the minimum index.
-
-### Implementation
-
-
-
-
-```cpp
-class Solution
-{
- public:
- int minIndexChar(string str, string patt)
- {
- int res = INT_MAX;
- vector v1;
- for (int i = 0; i < patt.length(); i++)
- {
- int p = str.find(patt[i]);
- v1.push_back(p);
- }
- int min = INT_MAX;
- for (int i = 0; i < v1.size(); i++)
- {
- if (min > v1[i] && v1[i] != -1)
- min = v1[i];
- }
- if (min == INT_MAX)
- return -1;
- return min;
- }
-};
-```
-
-
-
-
-```javascript
-function minIndexChar(str, patt) {
- let minIndex = Infinity;
- for (let char of patt) {
- let index = str.indexOf(char);
- if (index !== -1 && index < minIndex) {
- minIndex = index;
- }
- }
- return minIndex === Infinity ? -1 : minIndex;
-}
-```
-
-
-
-
-```typescript
-function minIndexChar(str: string, patt: string): number {
- let minIndex = Infinity;
- for (let char of patt) {
- let index = str.indexOf(char);
- if (index !== -1 && index < minIndex) {
- minIndex = index;
- }
- }
- return minIndex === Infinity ? -1 : minIndex;
-}
-```
-
-
-
-
-```python
-class Solution:
- def minIndexChar(self, str: str, patt: str) -> int:
- min_index = float('inf')
- for char in patt:
- index = str.find(char)
- if index != -1 and index < min_index:
- min_index = index
- return -1 if min_index == float('inf') else min_index
-```
-
-
-
-
-```java
-class Solution {
- public int minIndexChar(String str, String patt) {
- int minIndex = Integer.MAX_VALUE;
- for (char ch : patt.toCharArray()) {
- int index = str.indexOf(ch);
- if (index != -1 && index < minIndex) {
- minIndex = index;
- }
- }
- return minIndex == Integer.MAX_VALUE ? -1 : minIndex;
- }
-}
-```
-
-
-
-
-### Complexity Analysis
-
-- **Time Complexity:** $O(N)$, where N is the length of the string `str`. We iterate through each character in `patt` and use the `find` or `indexOf` method, which runs in $O(N)$ time.
-- **Space Complexity:** $O(1)$, as we only use a constant amount of extra space for variables.
-
----
-
-## References
-
-- **GeeksforGeeks Problem:** [Minimum Indexed Character](https://www.geeksforgeeks.org/minimum-indexed-character/)
-- **Authors GeeksforGeeks Profile:** [Vipul lakum](https://www.geeksforgeeks.org/user/lakumvipwjge/)
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/0025-K-Nearest Neighbor.md b/dsa-solutions/gfg-solutions/0025-K-Nearest Neighbor.md
deleted file mode 100644
index 6f4438dd5..000000000
--- a/dsa-solutions/gfg-solutions/0025-K-Nearest Neighbor.md
+++ /dev/null
@@ -1,230 +0,0 @@
----
-id: K-Nearest-Neighbor
-title: K-Nearest Neighbor (Geeks for Geeks)
-sidebar_label: 0025 K-Nearest Neighbor
-tags:
- - Intermediate
- - Machine Learning
- - Geeks for Geeks
- - CPP
- - Python
- - DSA
-description: "This is a solution to the K-Nearest Neighbor problem on Geeks for Geeks."
----
-
-
-## What is the K-Nearest Neighbors Algorithm?
-
-KNN is one of the most basic yet essential classification algorithms in machine learning. It belongs to the supervised learning domain and finds intense application in pattern recognition, data mining, and intrusion detection.
-
-It is widely disposable in real-life scenarios since it is non-parametric, meaning it does not make any underlying assumptions about the distribution of data (as opposed to other algorithms such as GMM, which assume a Gaussian distribution of the given data). We are given some prior data (also called training data), which classifies coordinates into groups identified by an attribute.
-
-
-
-## Intuition Behind KNN Algorithm
-
-If we plot these points on a graph, we may be able to locate some clusters or groups. Now, given an unclassified point, we can assign it to a group by observing what group its nearest neighbors belong to. This means a point close to a cluster of points classified as ‘Red’ has a higher probability of getting classified as ‘Red’.
-
-Intuitively, we can see that the first point (2.5, 7) should be classified as ‘Green’, and the second point (5.5, 4.5) should be classified as ‘Red’.
-
-## How to select the value of K in the K-NN Algorithm?
-
-The value of K is critical in the K-NN algorithm. A small K can make the model sensitive to noise, while a large K can smooth out the predictions too much. Typically, K is chosen by experimenting with different values and using cross-validation to evaluate the performance. A common approach is to start with K = sqrt(n), where n is the number of data points, and adjust based on the model’s performance.
-
-
-### How does K-NN work?
-
-K-Nearest Neighbor (K-NN) is a simple, supervised machine learning algorithm used for classification and regression tasks. It works by finding the K closest data points (neighbors) to the query point and using them to make predictions. For classification, it assigns the class most common among the neighbors. For regression, it averages the values of the neighbors.
-
-
-
-
-## Problem Description
-
-Given a dataset and a query point, implement the K-Nearest Neighbor (KNN) algorithm to find the k points in the dataset that are closest to the query point.
-
-## Examples
-
-**Example 1:**
-```
-Input:
-dataset = [(2, 4), (4, 4), (4, 2), (2, 2)]
-query_point = (3, 3)
-k = 2
-Output: [(2, 4), (4, 4)]
-```
-
-**Example 2:**
-```
-Input:
-dataset = [(1, 2), (2, 3), (3, 4), (4, 5)]
-query_point = (2, 2)
-k = 3
-Output: [(1, 2), (2, 3), (3, 4)]
-```
-
-## Your Task
-
-Implement the function $knn()$ that takes in a dataset, a query point, and an integer k. The function should return the k points in the dataset that are closest to the query point based on Euclidean distance.
-
-Expected Time Complexity: $O(n log n)$ for sorting the dataset.
-
-Expected Auxiliary Space: $O(n)$ for storing the distances.
-
-## Constraints
-
-- $1 <= len(dataset) <= 10^4$
-- $1 <= k <= len(dataset)$
-- Each point in the dataset is a tuple of integers $(x, y)$.
-- The query point is a tuple of integers $(x, y)$.
-
-## Problem Explanation
-
-Here's the step-by-step breakdown of the K-Nearest Neighbor algorithm:
-
-1. **Calculate Distances**: Compute the Euclidean distance between the query point and each point in the dataset.
-2. **Sort Distances**: Sort the points based on their distances from the query point.
-3. **Select Neighbors**: Select the first k points from the sorted list as the nearest neighbors.
-
-### Code Implementation
-
-
-
-
- ```python
- import math
-
- def euclidean_distance(point1, point2):
- return math.sqrt((point1[0] - point2[0]) ** 2 + (point1[1] - point2[1]) ** 2)
-
- def knn(dataset, query_point, k):
- distances = []
- for point in dataset:
- distance = euclidean_distance(point, query_point)
- distances.append((point, distance))
- distances.sort(key=lambda x: x[1])
- nearest_neighbors = [distances[i][0] for i in range(k)]
- return nearest_neighbors
- ```
-
-
-
-
- ```cpp
- #include
- #include
- #include
- #include
-
- using namespace std;
-
- double euclidean_distance(pair point1, pair point2) {
- return sqrt(pow(point1.first - point2.first, 2) + pow(point1.second - point2.second, 2));
- }
-
- vector> knn(vector> dataset, pair query_point, int k) {
- vector, double>> distances;
- for (auto point : dataset) {
- double distance = euclidean_distance(point, query_point);
- distances.push_back(make_pair(point, distance));
- }
- sort(distances.begin(), distances.end(), [](auto &left, auto &right) {
- return left.second < right.second;
- });
- vector> nearest_neighbors;
- for (int i = 0; i < k; i++) {
- nearest_neighbors.push_back(distances[i].first);
- }
- return nearest_neighbors;
- }
- ```
-
-
-
-
- ```java
- import java.util.*;
-
- public class KNN {
- public static double euclideanDistance(int[] point1, int[] point2) {
- return Math.sqrt(Math.pow(point1[0] - point2[0], 2) + Math.pow(point1[1] - point2[1], 2));
- }
-
- public static List knn(List dataset, int[] queryPoint, int k) {
- List result = new ArrayList<>();
- PriorityQueue maxHeap = new PriorityQueue<>((a, b) ->
- Double.compare(euclideanDistance(b, queryPoint), euclideanDistance(a, queryPoint))
- );
-
- for (int[] point : dataset) {
- maxHeap.offer(point);
- if (maxHeap.size() > k) {
- maxHeap.poll();
- }
- }
-
- while (!maxHeap.isEmpty()) {
- result.add(maxHeap.poll());
- }
-
- return result;
- }
- }
- ```
-
-
-
-
- ```javascript
- function euclideanDistance(point1, point2) {
- return Math.sqrt(Math.pow(point1[0] - point2[0], 2) + Math.pow(point1[1] - point2[1], 2));
- }
-
- function knn(dataset, queryPoint, k) {
- let distances = dataset.map(point => {
- return { point: point, distance: euclideanDistance(point, queryPoint) };
- });
-
- distances.sort((a, b) => a.distance - b.distance);
-
- return distances.slice(0, k).map(d => d.point);
- }
- ```
-
-
-
-## Solution Logic
-
-1. **Calculate Distances**: Iterate through each point in the dataset and compute the Euclidean distance to the query point.
-2. **Sort Distances**: Use the sorting algorithm to sort the points by their distance.
-3. **Select Neighbors**: Extract the k closest points from the sorted list.
-
-## Time Complexity
-
-$O(n log n)$, where n is the number of points in the dataset. This is due to the sorting step.
-
-## Space Complexity
-
-$O(n)$, for storing the distances of all points in the dataset.
-
-## Resources
-
-- **GFG Problem:** [GFG Problem](https://www.geeksforgeeks.org/k-nearest-neighbors/)
-- **HackerRank Problem:** [HackerRank](https://www.hackerrank.com/challenges/k-nearest-neighbors/problem)
-- **FreeCodeCamp Article:** [Freecodecamp](https://www.freecodecamp.org/news/k-nearest-neighbors-algorithm-classifiers-and-model-example/)
-- **GFG Article** [GFG Article](https://www.geeksforgeeks.org/k-nearest-neighbours/)
-- **Authors Geeks for Geeks Profile:** [MuraliDharan](https://www.geeksforgeeks.org/user/ngmuraqrdd/)
-
-## Additional Topics
-
-### Advantages and Disadvantages
-
-**Advantages:**
-- Simple to understand and implement.
-- No training phase, making it fast for small datasets.
-- Effective with a well-distributed dataset.
-
-**Disadvantages:**
-- Computationally intensive for large datasets as it requires calculating the distance of each data point.
-- Performance degrades with high-dimensional data due to the curse of dimensionality.
-- Sensitive to irrelevant or redundant features, requiring feature scaling and selection.
diff --git a/dsa-solutions/gfg-solutions/Basic/0001.md b/dsa-solutions/gfg-solutions/Basic/0001.md
deleted file mode 100644
index b8fc5bb5a..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0001.md
+++ /dev/null
@@ -1,192 +0,0 @@
----
-id: binary-search
-title: Binary Search
-sidebar_label: 0001 Binary Search
-tags:
-- Array
-- C
-- Python
-- Java
-- C++
-description: "This document provides solutions to the problem of performing Binary Search in a sorted array."
----
-
-## Problem
-
-Given a sorted array of size N and an integer K, find the position(0-based indexing) at which K is present in the array using binary search.
-
-### Examples
-**Example 1:**
-```
-Input:
-N = 5
-arr[] = {1 2 3 4 5}
-K = 4
-Output: 3
-Explanation: 4 appears at index 3.
-```
-
-**Example 2:**
-```
-Input:
-N = 5
-arr[] = {11 22 33 44 55}
-K = 445
-Output: -1
-Explanation: 445 is not present.
-```
-
-### Your Task:
-You dont need to read input or print anything. Complete the function **binarysearch()** which takes **arr[]**, **N** and **K** as input parameters and returns the index of **K** in the array. If **K** is not present in the array, return -1.
-
-- **Expected Time Complexity:** $O(LogN)$
-- **Expected Auxiliary Space:** $O(LogN)$ if solving recursively and $O(1)$ otherwise.
-
-### Constraints:
-
-- $1 <= N <= 10^5$
-- $1 <= arr[i] <= 10^6$
-- $1 <= K <= 10^6$
-
-## Solution:
-### Iterative Approach:
-
-**Python**
-```python
-def binarysearch(self, arr, n, k):
- low = 0
- high = n-1
- while low<=high:
- mid = low + (high-low)//2
- if arr[mid]==k:
- return mid
- elif arr[mid]= arr[1]) :
- return 0
- if (arr[n - 1] >= arr[n - 2]) :
- return n - 1
- for i in range(1, n - 1) :
- if (arr[i] >= arr[i - 1] and arr[i] >= arr[i + 1]) :
- return i
-```
-
-**Java**
-```java
-public int peakElement(int[] arr,int n) {
- if (n == 1)
- return 0;
- if (arr[0] >= arr[1])
- return 0;
- if (arr[n - 1] >= arr[n - 2])
- return n - 1;
- for (int i = 1; i < n - 1; i++) {
- if (arr[i] >= arr[i - 1] && arr[i] >= arr[i + 1])
- return i;
- }
- return 0;
-}
-```
-
-**C++**
-```cpp
-public:
-int peakElement(int arr[], int n) {
- if (n == 1)
- return 0;
- if (arr[0] >= arr[1])
- return 0;
- if (arr[n - 1] >= arr[n - 2])
- return n - 1;
- for (int i = 1; i < n - 1; i++) {
- if (arr[i] >= arr[i - 1] && arr[i] >= arr[i + 1])
- return i;
- }
-}
-```
-
-**C**
-```c
-int peakElement(int arr[], int n) {
- if (n == 1)
- return 0;
- if (arr[0] >= arr[1])
- return 0;
- if (arr[n - 1] >= arr[n - 2])
- return n - 1;
- for (int i = 1; i < n - 1; i++) {
- if (arr[i] >= arr[i - 1] && arr[i] >= arr[i + 1])
- return i;
- }
-}
-```
-
-- **Time complexity:** $O(n)$
-- **Space complexity:**: $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0003.md b/dsa-solutions/gfg-solutions/Basic/0003.md
deleted file mode 100644
index 3642bc1ab..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0003.md
+++ /dev/null
@@ -1,101 +0,0 @@
----
-id: power-of-2
-title: Power Of 2
-sidebar_label: 0003 Power Of 2
-tags:
-- C
-- Python
-- Java
-- C++
-description: "This document provides solutions to the problem of checking whether a non-negative number is a power of 2."
----
-
-## Problem
-
-Given a non-negative integer n. The task is to check if it is a power of 2.
-
-### Examples:
-**Example 1:**
-```
-Input: n = 8
-Output: true
-Explanation: 8 is equal to 2 raised to 3 (2^3 = 8).
-```
-
-**Example 2:**
-```
-Input: n = 98
-Output: false
-Explanation: 98 cannot be obtained by any power of 2.
-```
-
-**Example 3:**
-```
-Input: n = 1
-Output: true
-Explanation: (2^0 = 1).
-```
-
-- **Expected Time Complexity:** $O(log n)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-$0 ≤ n < 10^{20}$
-
-## Solution
-**Python**
-```python
-def isPowerofTwo(self,n : int ) -> bool:
- if (n == 0):
- return False
- while (n != 1):
- if (n % 2 != 0):
- return False
- n = n // 2
- return True
-```
-
-**Java**
-```java
-public static boolean isPowerofTwo(long n) {
- if (n == 0)
- return false;
- while (n != 1) {
- if (n % 2 != 0)
- return false;
- n = n / 2;
- }
- return true;
-}
-```
-
-**C**
-```c
-bool isPowerofTwo(long long n) {
- if (n == 0)
- return 0;
- while (n != 1) {
- if (n % 2 != 0)
- return 0;
- n = n / 2;
- }
- return 1;
-}
-```
-
-**C++**
-```cpp
-bool isPowerofTwo(long long n) {
- if (n == 0)
- return 0;
- while (n != 1) {
- if (n % 2 != 0)
- return 0;
- n = n / 2;
- }
- return 1;
-}
-```
-
-- **Time Complexity:** $O(log n)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0004.md b/dsa-solutions/gfg-solutions/Basic/0004.md
deleted file mode 100644
index f9873f261..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0004.md
+++ /dev/null
@@ -1,133 +0,0 @@
----
-id: union-of-two-arrays
-title: Union Of Two Arrays
-sidebar_label: 0004 Union Of Two Arrays
-tags:
-- Array
-- Set
-- C
-- Python
-- Java
-- C++
-description: "This document provides solutions to the problem of finding the number of elements in the union between two arrays."
----
-
-## Problem
-
-Given two arrays **a[]** and **b[]** of size **n** and **m** respectively. The task is to find the number of elements in the union between these two arrays.
-
-Union of the two arrays can be defined as the set containing distinct elements from both the arrays. If there are repetitions, then only one occurrence of element should be printed in the union.
-
-**Note:** Elements are not necessarily distinct.
-
-### Examples:
-**Example 1:**
-```
-Input:
-5 3
-1 2 3 4 5
-1 2 3
-Output:
-5
-Explanation:
-1, 2, 3, 4 and 5 are the
-elements which comes in the union set
-of both arrays. So count is 5.
-```
-
-**Example 2:**
-```
-Input:
-6 2
-85 25 1 32 54 6
-85 2
-Output:
-7
-Explanation:
-85, 25, 1, 32, 54, 6, and
-2 are the elements which comes in the
-union set of both arrays. So count is 7.
-```
-
-### Your Task:
-
-Complete **doUnion** function that takes **a, n, b, m as parameters and returns** the count of union elements of the two arrays. The **printing** is done by the **driver** code.
-
-- **Expected Time Complexity:** $O(n+m)$
-- **Expected Auxilliary Space:** $O(n+m)$
-
-
-### Constraints:
-
-- $1 ≤ n, m ≤ 10^5$
-- $0 ≤ a[i], b[i] < 10^5$
-
-## Solution
-
-### Python
-```python
-def doUnion(self,a,n,b,m):
- set1 = set(a)
- set2 = set(b)
- result = list(set1.union(set2))
- return len(result)
-```
-
-### Java
-```java
-public static int doUnion(int a[], int n, int b[], int m) {
- TreeSet set = new TreeSet<>();
- for (int i : a)
- set.add(i);
- for (int i : b)
- set.add(i);
- ArrayList list = new ArrayList<>();
- for (int i : set)
- list.add(i);
- return list.size();
-}
-```
-
-### C++
-```cpp
-int doUnion(int a[], int n, int b[], int m) {
- set s;
- for (int i = 0; i < n; i++) {
- s.insert(a[i]);
- }
- for (int i = 0; i < m; i++) {
- s.insert(b[i]);
- }
- vector vec(s.begin(), s.end());
- return vec.size();
-}
-```
-
-### C
-```c
-int doUnion(int a[], int n, int b[], int m) {
- int *unionSet = (int *)malloc((n + m) * sizeof(int));
- int i, j;
- int unionSize = 0;
- for (i = 0; i < n; i++) {
- unionSet[unionSize++] = a[i];
- }
- for (i = 0; i < m; i++) {
- int found = 0;
- for (j = 0; j < unionSize; j++) {
- if (b[i] == unionSet[j]) {
- found = 1;
- break;
- }
- }
- if (!found) {
- unionSet[unionSize++] = b[i];
- }
- }
- free(unionSet);
- return unionSize;
-}
-```
-
-- **Time Complexity:** $O(m*log(m) + n*log(n))$
-- **Auxiliary Space:** $O(m + n)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0005.md b/dsa-solutions/gfg-solutions/Basic/0005.md
deleted file mode 100644
index 3657ccad1..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0005.md
+++ /dev/null
@@ -1,97 +0,0 @@
----
-id: reverse-a-string
-title: Reverse a String
-sidebar_label: 0005 Reverse a String
-tags:
-- Array
-- C
-- Python
-- Java
-- C++
-description: "This document provides solutions to the problem of reversing a string."
----
-
-## Problem
-
-You are given a string s. You need to reverse the string.
-
-### Examples:
-**Example 1:**
-```
-Input:
-s = Geeks
-Output: skeeG
-```
-
-**Example 2:**
-```
-Input:
-s = for
-Output: rof
-```
-
-### Your Task:
-
-You only need to complete the function **reverseWord()** that takes s as parameter and returns the reversed string.
-
-- **Expected Time Complexity:** $O(|S|)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-$1 <= |s| <= 10000$
-
-## Solution
-### Python
-```python
-def reverseWord(self, str: str) -> str:
- str = str[::-1]
- return str
-```
-
-### Java
-```java
-public static String reverseWord(String str) {
- char ch;
- String nstr = "";
- for (int i=0; i map = new HashMap<>();
- for (int i = 0; i < N; i++) {
- long key = A[i];
- map.put(key, map.getOrDefault(key, 0) + 1);
- }
- for (int i = 0; i < N; i++) {
- long key = B[i];
- if (!map.containsKey(key))
- return false;
- if (map.get(key) == 0)
- return false;
- int count = map.get(key);
- map.put(key, count - 1);
- }
- return true;
-}
-```
-
-### C++
-```cpp
-bool check(vector A, vector B, int N) {
- if (A.size() != static_cast(N) || B.size() != static_cast(N))
- return false;
- unordered_map map;
- for (int i = 0; i < N; ++i) {
- ll key = A[i];
- map[key]++;
- }
- for (int i = 0; i < N; ++i) {
- ll key = B[i];
- if (map.find(key) == map.end())
- return false;
- if (map[key] == 0)
- return false;
- map[key]--;
- }
- return true;
-}
-```
-
-### C
-```c
-bool check(long long A[], long long B[], int N) {
- long long *map = (long long *)calloc(1000001, sizeof(long long));
- for (int i = 0; i < N; ++i) {
- long long key = A[i];
- map[key]++;
- }
- for (int i = 0; i < N; ++i) {
- long long key = B[i];
- if (map[key] == 0)
- return false;
- map[key]--;
- }
- free(map);
- return true;
-}
-```
-
-- **Time Complexity:** $O(N)$
-- **Auxilliary Space:** $O(N)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0008.md b/dsa-solutions/gfg-solutions/Basic/0008.md
deleted file mode 100644
index 80093fe97..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0008.md
+++ /dev/null
@@ -1,151 +0,0 @@
----
-id: array-subset-of-another-array
-title: Array Subset of another array
-sidebar_label: 0008 Array Subset of another array
-tags:
-- Array
-- C
-- Python
-- Java
-- C++
-description: "This document provides solutions to whether an array is the subset of another."
----
-
-## Problem
-
-Given two arrays: **a1[0..n-1]** of size **n** and **a2[0..m-1]** of size **m**, where both arrays may contain duplicate elements. The task is to determine whether array a2 is a subset of array a1. It's important to note that both arrays can be sorted or unsorted. Additionally, each occurrence of a duplicate element within an array is considered as a separate element of the set.
-
-
-### Examples
-**Example 1:**
-```
-Input:
-a1[] = {11, 7, 1, 13, 21, 3, 7, 3}
-a2[] = {11, 3, 7, 1, 7}
-Output:
-Yes
-Explanation:
-a2[] is a subset of a1[]
-```
-
-**Example 2:**
-```
-Input:
-a1[] = {1, 2, 3, 4, 4, 5, 6}
-a2[] = {1, 2, 4}
-Output:
-Yes
-Explanation:
-a2[] is a subset of a1[]
-```
-
-**Example 3:**
-```
-Input:
-a1[] = {10, 5, 2, 23, 19}
-a2[] = {19, 5, 3}
-Output:
-No
-Explanation:
-a2[] is not a subset of a1[]
-```
-
-### Your Task:
-
-You don't need to read input or print anything. Your task is to complete the function **isSubset()** which takes the array **a1[]**, **a2[]**, its size **n** and **m** as inputs and return "Yes" if arr2 is subset of arr1 else return "No" if arr2 is not subset of arr1.
-
-
-
-- **Expected Time Complexity:** $O(max(n,m))$
-- **Expected Auxiliary Space:** $O(n)$
-
-### Constraints:
-
-- $1 <= n,m <= 10^5$
-- $1 <= a1[i], a2[j] <= 10^6$
-
-## Solution
-
-### Python
-```python
-def isSubset(a1, a2, n, m):
- count_a1 = {}
- count_a2 = {}
- for num in a1:
- count_a1[num] = count_a1.get(num, 0) + 1
- for num in a2:
- count_a2[num] = count_a2.get(num, 0) + 1
- for num in count_a2:
- if num not in count_a1 or count_a1[num] < count_a2[num]:
- return "No"
- return "Yes"
-```
-
-### Java
-```java
-public String isSubset( long a1[], long a2[], long n, long m) {
- Map count_a1 = new HashMap<>();
- Map count_a2 = new HashMap<>();
- for (long num : a1) {
- count_a1.put(num, count_a1.getOrDefault(num, 0) + 1);
- }
- for (long num : a2) {
- count_a2.put(num, count_a2.getOrDefault(num, 0) + 1);
- }
- for (long num : count_a2.keySet()) {
- if (!count_a1.containsKey(num) || count_a1.get(num) < count_a2.get(num)) {
- return "No";
- }
- }
- return "Yes";
-}
-```
-
-### C++
-```cpp
-string isSubset(int a1[], int a2[], int n, int m) {
- unordered_map count_a1;
- unordered_map count_a2;
- for (int i = 0; i < n; ++i) {
- count_a1[a1[i]]++;
- }
- for (int i = 0; i < m; ++i) {
- count_a2[a2[i]]++;
- }
- for (const auto& pair : count_a2) {
- int num = pair.first;
- int count_in_a2 = pair.second;
- if (count_a1.find(num) == count_a1.end() || count_a1[num] < count_in_a2) {
- return "No";
- }
- }
- return "Yes";
-}
-```
-
-### C
-```c
-char* isSubset(int a1[], int a2[], int n, int m) {
- int *count_a1 = (int *)calloc(1001, sizeof(int));
- int *count_a2 = (int *)calloc(1001, sizeof(int));
- for (int i = 0; i < n; ++i) {
- count_a1[a1[i]]++;
- }
- for (int i = 0; i < m; ++i) {
- count_a2[a2[i]]++;
- }
- for (int i = 0; i < 1001; ++i) {
- if (count_a2[i] > 0 && count_a1[i] < count_a2[i]) {
- free(count_a1);
- free(count_a2);
- return "No";
- }
- }
- free(count_a1);
- free(count_a2);
- return "Yes";
-}
-```
-
-- **Time Complexity:** $O(n+m)$
-- **Auxiliary Space:** $O(n+m)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0009.md b/dsa-solutions/gfg-solutions/Basic/0009.md
deleted file mode 100644
index 8e48c1872..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0009.md
+++ /dev/null
@@ -1,117 +0,0 @@
----
-id: reverse-array-in-groups
-title: Reverse array in groups
-sidebar_label: 0009 Reverse array in groups
-tags:
-- Array
-- C
-- Python
-- Java
-- C++
-description: "This document provides solutions to reverse an array in groups."
----
-
-## Problem
-
-Given an array arr[] of positive integers of size N. Reverse every sub-array group of size K.
-
-**Note:** If at any instance, there are no more subarrays of size greater than or equal to K, then reverse the last subarray (irrespective of its size). You shouldn't return any array, modify the given array in-place.
-
-### Examples:
-**Example 1:**
-```
-Input:
-N = 5, K = 3
-arr[] = {1,2,3,4,5}
-Output: 3 2 1 5 4
-Explanation: First group consists of elements 1, 2, 3. Second group consists of 4,5.
-```
-
-**Example 2:**
-```
-Input:
-N = 4, K = 3
-arr[] = {5,6,8,9}
-Output: 8 6 5 9
-```
-
-### Your Task:
-
-You don't need to read input or print anything. The task is to complete the function **reverseInGroups()** which takes the array, N and K as input parameters and modifies the array in-place.
-
-- **Expected Time Complexity:** $O(N)$
-- **Expected Auxiliary Space:** $O(1)$
-
- ### Constraints:
-
-- $1 ≤ N, K ≤ 10^7$
-- $1 ≤ A[i] ≤ 10^{18}$
-
-## Solution
-
-### Python
-```python
-def reverseInGroups(self, arr, N, K):
- i = 0
- while(i arr, int n, int k) {
- for (int i = 0; i < n; i += k) {
- int left = i;
- int right = Math.min(i + k - 1, n - 1);
- while (left < right) {
- int temp = arr.get(left);
- arr.set(left, arr.get(right));
- arr.set(right, temp);
- left++;
- right--;
- }
- }
-}
-```
-
-### C++
-```cpp
-void reverseInGroups(vector& arr, int n, int k){
- for (int i = 0; i < n; i += k) {
- int left = i;
- int right = min(i + k - 1, n - 1);
- while (left < right)
- swap(arr[left++], arr[right--]);
- }
-}
-```
-
-### C
-```c
-void reverse(int arr[], int n, int k) {
- for (int i = 0; i < n; i += k) {
- int left = i;
- int right;
- if(i+k-1 0; i--)
- arr[i] = arr[i - 1];
- arr[0] = last_el;
-}
-```
-
-### C++
-```cpp
-void rotate(int arr[], int n) {
- int last_el = arr[n - 1];
- for (int i = n - 1; i > 0; i--) {
- arr[i] = arr[i - 1];
- }
- arr[0] = last_el;
-}
-```
-
-### C
-```c
-void rotate(int arr[], int n) {
- int last_el = arr[n - 1];
- for (int i = n - 1; i > 0; i--)
- arr[i] = arr[i - 1];
- arr[0] = last_el;
-}
-```
-
-- **Time Complexity:** $O(N)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0011.md b/dsa-solutions/gfg-solutions/Basic/0011.md
deleted file mode 100644
index 7d56f7143..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0011.md
+++ /dev/null
@@ -1,140 +0,0 @@
----
-id: find-minimum-and-maximum-element-in-an-array
-title: Find minimum and maximum element in an array
-sidebar_label: 0011 Find minimum and maximum element in an array
-tags:
-- Array
-- C
-- Python
-- Java
-- C++
-description: "This document provides solutions to finding the minimum and maximum element in an array."
----
-
-## Problem
-
-Given an array **A** of size **N** of integers. Your task is to find the **minimum and maximum** elements in the array.
-
-Note: Return an array that contains 2 elements the first one will be a minimum element and the second will be a maximum of an array.
-
-### Examples:
-**Example 1:**
-```
-Input:
-N = 6
-A[] = {3, 2, 1, 56, 10000, 167}
-Output: 1 10000
-Explanation: minimum and maximum elements of array are 1 and 10000.
-```
-
-**Example 2:**
-```
-Input:
-N = 5
-A[] = {1, 345, 234, 21, 56789}
-Output: 1 56789
-Explanation: minimum and maximum element of array are 1 and 56789.
-```
-
-### Your task:
-
-You don't need to read input or print anything. Your task is to complete the function **getMinMax()** which takes the array **A[]** and its size **N** as inputs and returns the **minimum and maximum** element of the array.
-
-- **Expected Time Complexity:** $O(N)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1 <= N <= 10^5$
-- $1 <= A_i <=10^{12}$
-
-## Solution
-### Python
-```python
-def getMinMax( a, n):
- if n == 0:
- return None
- min_value = float('inf')
- max_value = float('-inf')
- for num in a:
- if num < min_value:
- min_value = num
- if num > max_value:
- max_value = num
- minmax = [min_value, max_value]
- return minmax
-```
-
-### Java
-```java
-static Pair getMinMax(long a[], long n) {
- if (n == 0) {
- return null;
- }
- long min_value = Long.MAX_VALUE;
- long max_value = Long.MIN_VALUE;
- for (long num : a) {
- if (num < min_value) {
- min_value = num;
- }
- if (num > max_value) {
- max_value = num;
- }
- }
- return new Pair(min_value, max_value);
-}
-```
-
-### C++
-```cpp
-public:
- pair getMinMax(long long a[], int n) {
- if (n == 0) {
- return {0, 0};
- }
- long long min_value = LLONG_MAX;
- long long max_value = LLONG_MIN;
- for (int i = 0; i < n; ++i) {
- if (a[i] < min_value) {
- min_value = a[i];
- }
- if (a[i] > max_value) {
- max_value = a[i];
- }
- }
- return {min_value, max_value};
- }
-};
-```
-
-### C
-```c
-struct pair getMinMax(long long int arr[], long long int n) {
- struct pair minmax;
- int i;
- if (n == 1) {
- minmax.max = arr[0];
- minmax.min = arr[0];
- return minmax;
- }
- if (arr[0] > arr[1]) {
- minmax.max = arr[0];
- minmax.min = arr[1];
- }
- else {
- minmax.max = arr[1];
- minmax.min = arr[0];
- }
-
- for (i = 2; i minmax.max)
- minmax.max = arr[i];
- else if (arr[i] < minmax.min)
- minmax.min = arr[i];
- }
- return minmax;
-}
-```
-
-- **Time Complexity:** $O(N)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0012.md b/dsa-solutions/gfg-solutions/Basic/0012.md
deleted file mode 100644
index 21d44678b..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0012.md
+++ /dev/null
@@ -1,106 +0,0 @@
----
-id: prime-number
-title: Prime Number
-sidebar_label: 0012 Prime Number
-tags:
-- C
-- Python
-- Java
-- C++
-description: "This document provides solutions to checking whether a number is prime or not."
----
-
-## Problem
-
-For a given number **N** check if it is prime or not. A prime number is a number which is only **divisible by 1 and itself**.
-
-### Examples:
-**Example 1:**
-```
-Input:
-N = 5
-Output:
-1
-Explanation:
-5 has 2 factors 1 and 5 only.
-```
-
-**Example 2:**
-```
-Input:
-N = 25
-Output:
-0
-Explanation:
-25 has 3 factors 1, 5, 25
-```
-
-### Your task:
-
-You don't need to read input or print anything. Your task is to complete the function **isPrime()** which takes an integer **N** as input parameters and returns an integer, 1 if N is a prime number or 0 otherwise.
-
-- **Expected Time Complexity:** $O(sqrt(N))$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1<=N<=10^9$
-
-## Solution
-### Python
-```python
-def isPrime (self, N):
- if (N <= 1):
- return 0
- for i in range(2, int(math.sqrt(N))+1):
- if (N % i == 0):
- return 0
- return 1
-```
-
-### Java
-```java
-static int isPrime(int N){
- if (N <= 1)
- return 0;
- else if (N == 2)
- return 1;
- else if (N % 2 == 0)
- return 0;
- for (int i = 3; i <= Math.sqrt(N); i += 2) {
- if (N % i == 0)
- return 0;
- }
- return 1;
-}
-```
-
-### C++
-```cpp
-public:
- int isPrime(int N){
- if (N <= 1)
- return 0;
- for (int i = 2; i <= sqrt(N); i++)
- if (N % i == 0)
- return 0;
- return 1;
- }
-};
-```
-
-### C
-```c
-int isPrime(int N) {
- if (N <= 1)
- return 0;
- for (int i = 2; i <= sqrt(N); i++) {
- if (N % i == 0)
- return 0;
- }
- return 1;
-}
-```
-
-- **Time Complexity:** $O(sqrt(N))$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0013.md b/dsa-solutions/gfg-solutions/Basic/0013.md
deleted file mode 100644
index f62bc3810..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0013.md
+++ /dev/null
@@ -1,110 +0,0 @@
----
-id: largest-element-in-array
-title: Largest Element in Array
-sidebar_label: 0013 Largest Element in Array
-tags:
-- Array
-- C
-- Python
-- Java
-- C++
-description: "This document provides solutions to find the largest element in an array."
----
-
-## Problem
-
-Given an array **A[]** of size **n**. The task is to find the largest element in it.
-
-### Examples:
-**Example 1:**
-```
-Input:
-n = 5
-A[] = {1, 8, 7, 56, 90}
-Output:
-90
-Explanation:
-The largest element of given array is 90.
-```
-
-**Example 2:**
-```
-Input:
-n = 7
-A[] = {1, 2, 0, 3, 2, 4, 5}
-Output:
-5
-Explanation:
-The largest element of given array is 5.
-```
-
-### Your task:
-
-You don't need to read input or print anything. Your task is to complete the function **largest()** which takes the array **A[]** and its size **n** as inputs and returns the maximum element in the array
-
-- **Expected Time Complexity:** $O(N)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1<=n<=10^3$
-- $0<=A[i]<=10^3$
-
-Array may contain duplicate elements.
-
-
-
-## Solution
-### Python
-```python
-def largest( arr, n):
- mx = arr[0]
- for i in range(1, n):
- if arr[i] > mx:
- mx = arr[i]
- return mx
-```
-
-### Java
-```java
-public int largest(int arr[], int n) {
- int mx = arr[0];
- for (int i = 1; i < n; i++) {
- if (arr[i] > mx) {
- mx = arr[i];
- }
- }
- return mx;
-}
-```
-
-### C++
-```cpp
-public:
- int largest(vector &arr, int n) {
- int mx = arr[0];
- for (int i = 1; i < n; i++) {
- if (arr[i] > mx) {
- mx = arr[i];
- }
- }
- return mx;
- }
-};
-```
-
-### C
-```c
-int largest(int arr[], int n) {
- int mx = arr[0];
- for (int i = 1; i < n; i++) {
- if (arr[i] > mx) {
- mx = arr[i];
- }
- }
- return mx;
-}
-```
-
-- **Time Complexity:** $O(N)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0014.md b/dsa-solutions/gfg-solutions/Basic/0014.md
deleted file mode 100644
index 2b07a9695..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0014.md
+++ /dev/null
@@ -1,126 +0,0 @@
----
-id: print-first-n-fibonacci-numbers
-title: Print first n Fibonacci Numbers
-sidebar_label: 0014 Print first n Fibonacci Numbers
-tags:
-- C
-- Python
-- Java
-- C++
-description: "This document provides solutions to printing first N Fibonacci number."
----
-
-## Problem
-
-Given a number **N**, find the first N Fibonacci numbers. The first two number of the series are 1 and 1.
-
-### Examples:
-**Example 1:**
-```
-Input:
-N = 5
-Output: 1 1 2 3 5
-```
-
-**Example 2:**
-```
-Input:
-N = 7
-Output: 1 1 2 3 5 8 13
-```
-
-### Your task:
-
-Your task is to complete **printFibb()** which takes single argument N and returns a list of first N Fibonacci numbers.
-
-- **Expected Time Complexity:** $O(N)$
-- **Expected Auxiliary Space:** $O(N)$
-
-Note: This space is used to store and return the answer for printing purpose.
-
-### Constraints:
-
-- $1<=N<=84$
-
-## Solution
-### Python
-```python
-def printFibb(self,n):
- fib_list = []
- f1, f2 = 1, 1
- if n < 1:
- return fib_list
- fib_list.append(f1)
- for _ in range(1, n):
- fib_list.append(f2)
- next_fib = f1 + f2
- f1 = f2
- f2 = next_fib
- return fib_list
-```
-
-### Java
-```java
-public static long[] printFibb(int n) {
- long[] fibArray = new long[n];
- if (n < 1) {
- return fibArray;
- }
- fibArray[0] = 1;
- if (n > 1) {
- fibArray[1] = 1;
- }
- for (int i = 2; i < n; i++) {
- fibArray[i] = fibArray[i - 1] + fibArray[i - 2];
- }
- return fibArray;
-}
-```
-
-### C++
-```cpp
-public:
-vector printFibb(int n) {
- vector fibVector(n);
- if (n < 1) {
- return fibVector;
- }
- fibVector[0] = 1;
- if (n > 1) {
- fibVector[1] = 1;
- }
- for (int i = 2; i < n; i++) {
- fibVector[i] = fibVector[i - 1] + fibVector[i - 2];
- }
- return fibVector;
-}
-```
-
-### C
-```c
-int* printFibb(int n) {
- if (n < 1) {
- return NULL;
- }
- int* fibArray = (int*) malloc(n * sizeof(int));
- if (fibArray == NULL) {
- fprintf(stderr, "Memory allocation failed\n");
- exit(1);
- }
- int f1 = 0, f2 = 1;
- fibArray[0] = f1;
- if (n > 1) {
- fibArray[1] = f2;
- }
- for (int i = 2; i < n; i++) {
- int next_fib = f1 + f2;
- fibArray[i] = next_fib;
- f1 = f2;
- f2 = next_fib;
- }
- return fibArray;
-}
-```
-
-- **Time Complexity:** $O(N)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0015.md b/dsa-solutions/gfg-solutions/Basic/0015.md
deleted file mode 100644
index ac48f1b20..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0015.md
+++ /dev/null
@@ -1,131 +0,0 @@
----
-id: searching-an-element-in-a-sorted-array
-title: Searching an element in a sorted array
-sidebar_label: 0015 Searching an element in a sorted array
-tags:
-- Array
-- C
-- Python
-- Java
-- C++
-description: "This document provides solutions for searching an element in a sorted array."
----
-
-## Problem
-
-Given an array **arr[]** sorted in ascending order of size **N** and an integer **K**. Check if K is present in the array or not.
-
-### Examples:
-**Example 1:**
-```
-Input:
-N = 5, K = 6
-arr[] = {1,2,3,4,6}
-Output: 1
-Exlpanation: Since, 6 is present in the array at index 4(0-based indexing), output is 1.
-```
-
-**Example 2:**
-```
-Input:
-N = 5, K = 2
-arr[] = {1,3,4,5,6}
-Output: -1
-Exlpanation: Since, 2 is not present in the array, output is -1.
-```
-
-### Your task:
-
-You don't need to read input or print anything. Complete the function **searchInSorted()** which takes the sorted array arr[], its size N and the element K as input parameters and returns 1 if K is present in the array, else it returns -1.
-
-- **Expected Time Complexity:** $O(log N)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1<=N<=10^6$
-- $1<=K<=10^6$
-- $1<=arr[i]<=10^6$
-
-## Solution
-### Python
-```python
-def searchInSorted(self,arr, N, K):
- low = 0
- high = N-1
- while low <= high:
- mid = low + (high - low) // 2
- if arr[mid] == K:
- return 1
- elif arr[mid] < K:
- low = mid + 1
- else:
- high = mid - 1
- return -1
-```
-
-### Java
-```java
-static int searchInSorted(int arr[], int N, int K) {
- int low = 0;
- int high = N - 1;
- while (low <= high) {
- int mid = low + (high - low) / 2;
- if (arr[mid] == K) {
- return 1;
- }
- else if (arr[mid] < K) {
- low = mid + 1;
- }
- else {
- high = mid - 1;
- }
- }
- return -1;
-}
-```
-
-### C++
-```cpp
-int searchInSorted(int arr[], int N, int K) {
- int low = 0;
- int high = N - 1;
- while (low <= high) {
- int mid = low + (high - low) / 2;
- if (arr[mid] == K) {
- return 1;
- }
- else if (arr[mid] < K) {
- low = mid + 1;
- }
- else {
- high = mid - 1;
- }
- }
- return -1;
- }
-```
-
-### C
-```c
-int searchInSorted(int arr[], int N, int K) {
-int low = 0;
-int high = N - 1;
-while (low <= high) {
- int mid = low + (high - low) / 2;
- if (arr[mid] == K) {
- return 1;
- }
- else if (arr[mid] < K) {
- low = mid + 1;
- }
- else {
- high = mid - 1;
- }
-}
-return -1;
-}
-```
-
-- **Time Complexity:** $O(log N)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0016.md b/dsa-solutions/gfg-solutions/Basic/0016.md
deleted file mode 100644
index f557904b9..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0016.md
+++ /dev/null
@@ -1,172 +0,0 @@
----
-id: linked-list-insertion
-title: Linked List Insertion
-sidebar_label: 0016 Linked List Insertion
-tags:
-- Linked List
-- C
-- Python
-- Java
-- C++
-description: "This document provides solutions to inserting an element in the linked list."
----
-
-## Problem
-
-Create a link list of size N according to the given input literals. Each integer input is accompanied by an indicator which can either be 0 or 1. If it is 0, insert the integer in the beginning of the link list. If it is 1, insert the integer at the end of the link list.
-
-**Hint:** When inserting at the end, make sure that you handle NULL explicitly.
-
-### Examples:
-**Example 1:**
-```
-Input:
-LinkedList: 9->0->5->1->6->1->2->0->5->0
-Output: 5 2 9 5 6
-Explanation:
-Length of Link List = N = 5
-9 0 indicated that 9 should be
-inserted in the beginning. Modified
-Link List = 9.
-5 1 indicated that 5 should be
-inserted in the end. Modified Link
-List = 9,5.
-6 1 indicated that 6 should be
-inserted in the end. Modified Link
-List = 9,5,6.
-2 0 indicated that 2 should be
-inserted in the beginning. Modified
-Link List = 2,9,5,6.
-5 0 indicated that 5 should be
-inserted in the beginning. Modified
-Link List = 5,2,9,5,6.
-Final linked list = 5, 2, 9, 5, 6.
-```
-
-**Example 2:**
-```
-Input:
-LinkedList: 5->1->6->1->9->1
-Output: 5 6 9
-```
-
-### Your task:
-
-You only need to complete the functions **insertAtBeginning()** and **insertAtEnd()** that takes the head of link list and integer value of the data to be inserted as inputs and returns the head of the modified link list.
-
-- **Expected Time Complexity:** $O(1)$ for **insertAtBeginning()** and $O(N)$ for **insertAtEnd()**
-- **Expected Auxiliary Space:** $O(1)$ for both
-
-### Constraints:
-
-- $1<=N<=10^4$
-
-## Solution
-### Python
-```python
-def insertAtBegining(self,head,x):
- new_node = Node(x)
- new_node.next = head
- head = new_node
- return head
-
-def insertAtEnd(self,head,x):
- new_node = Node(x)
- if head is None:
- head = new_node
- else:
- temp = head
- while temp.next is not None:
- temp = temp.next
- temp.next = new_node
- return head
-```
-
-### Java
-```java
-Node insertAtBeginning(Node head, int x) {
- Node new_node = new Node(x);
- new_node.next = head;
- head = new_node;
- return head;
-}
-
-Node insertAtEnd(Node head, int x) {
- Node new_node = new Node(x);
- if (head == null) {
- head = new_node;
- }
- else {
- Node temp = head;
- while (temp.next != null) {
- temp = temp.next;
- }
- temp.next = new_node;
- }
- return head;
-}
-```
-
-### C++
-```cpp
-Node *insertAtBegining(Node *head, int x) {
- Node *new_node = new Node(x);
- new_node->next = head;
- head = new_node;
- return head;
-}
-
-Node *insertAtEnd(Node *head, int x) {
- Node *new_node = new Node(x);
- if (head == nullptr) {
- head = new_node;
- }
- else {
- Node *temp = head;
- while (temp->next != nullptr) {
- temp = temp->next;
- }
- temp->next = new_node;
- }
- return head;
-}
-```
-
-### C
-```c
-struct Node *insertAtBegining(struct Node *head, int x) {
- struct Node *new_node = (struct Node*) malloc(sizeof(struct Node));
- if (new_node == NULL) {
- printf("Memory allocation failed.\n");
- return head;
- }
- new_node->data = x;
- new_node->next = head;
- head = new_node;
- return head;
-}
-
-struct Node *insertAtEnd(struct Node *head, int x) {
- struct Node *new_node = (struct Node*) malloc(sizeof(struct Node));
- if (new_node == NULL) {
- printf("Memory allocation failed.\n");
- return head;
- }
- new_node->data = x;
- new_node->next = NULL;
- if (head == NULL) {
- head = new_node;
- }
- else {
- struct Node *temp = head;
- while (temp->next != NULL) {
- temp = temp->next;
- }
- temp->next = new_node;
- }
- return head;
-}
-```
-
-- **Time Complexity:** $O(1)$ for **insertAtBeginning()** and $O(N)$ for **insertAtEnd()**
-- **Auxiliary Space:** $O(1)$ for both
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0017.md b/dsa-solutions/gfg-solutions/Basic/0017.md
deleted file mode 100644
index a924c3f24..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0017.md
+++ /dev/null
@@ -1,99 +0,0 @@
----
-id: minimum-element-in-bst
-title: Minimum element in BST
-sidebar_label: 0017 Minimum element in BST
-tags:
-- Binary Search Tree
-- Linked List
-- C
-- Python
-- Java
-- C++
-description: "This document provides solutions to finding the minimum element in a binary search tree."
----
-
-## Problem
-
-Given the root of a **Binary Search Tree**. The task is to find the minimum valued element in this given BST.
-
-### Examples:
-**Example 1:**
-```
-Input:
- 5
- / \
- 4 6
- / \
- 3 7
- /
- 1
-Output: 1
-```
-
-**Example 2:**
-```
-Input:
- 9
- \
- 10
- \
- 11
-Output: 9
-```
-
-### Your task:
-
-The task is to complete the function **minValue()** which takes root as the argument and returns the minimum element of BST. If the tree is empty, there is no minimum element, so return **-1** in that case.
-
-- **Expected Time Complexity:** $O$(Height of the BST)
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $0<=n<=10^4$
-
-## Solution
-### Python
-```python
-def minValue(self, root):
- current = root
- while(current.left is not None):
- current = current.left
- return current.data
-```
-
-### Java
-```java
-int minValue(Node root) {
- Node current = root;
- while (current.left != null) {
- current = current.left;
- }
- return current.data;
-}
-```
-
-### C++
-```cpp
-int minValue(Node* root) {
- Node* current = root;
- while (current->left != nullptr) {
- current = current->left;
- }
- return current->data;
-}
-```
-
-### C
-```c
-int minValue(struct Node *root) {
- struct Node* current = root;
- while (current->left != NULL) {
- current = current->left;
- }
- return current->data;
-}
-```
-
-- **Time Complexity:** $O$(Height of the BST)
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0018.md b/dsa-solutions/gfg-solutions/Basic/0018.md
deleted file mode 100644
index 2576102ac..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0018.md
+++ /dev/null
@@ -1,106 +0,0 @@
----
-id: immediate-smaller-element
-title: Immediate Smaller Element
-sidebar_label: 0018 Immediate Smaller Element
-tags:
-- Array
-- C
-- Python
-- Java
-- C++
-description: "This document provides solutions to finding the intermediate smaller element in an array."
----
-
-## Problem
-
-Given an integer array **Arr** of size **N**. For each element in the array, check whether the right adjacent element (on the next immediate position) of the array is smaller. If next element is smaller, update the current index to that element. If not, then **-1**.
-
-### Examples:
-**Example 1:**
-```
-Input:
-N = 5
-Arr[] = {4, 2, 1, 5, 3}
-Output:
-2 1 -1 3 -1
-Explanation: Array elements are 4, 2, 1, 5, 3. Next to 4 is 2 which is smaller, so we print 2. Next of 2 is 1 which is smaller, so we print 1. Next of 1 is 5 which is greater, so we print -1. Next of 5 is 3 which is smaller, so we print 3. Note that for last element, output is always going to be -1 because there is no element on right.
-```
-
-**Example 2:**
-```
-Input:
-N = 6
-Arr[] = {5, 6, 2, 3, 1, 7}
-Output:
--1 2 -1 1 -1 -1
-Explanation: Next to 5 is 6 which is greater, so we print -1. Next of 6 is 2 which is smaller, so we print 2. Next of 2 is 3 which is greater, so we print -1. Next of 3 is 1 which is smaller, so we print 1. Next of 1 is 7 which is greater, so we print -1. Note that for last element, output is always going to be -1 because there is no element on right.
-```
-
-### Your task:
-
-You don't need to read input or print anything. Your task is to complete the function **immediateSmaller()** which takes the array of integers **arr** and **n** as parameters. You need to change the array itself.
-
-- **Expected Time Complexity:** $O(N)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1<=N<=10^7$
-- $1<=Arr[i]<=10^5$
-
-## Solution
-### Python
-```python
-def immediateSmaller(self,arr,n):
- for i in range(n - 1) :
- if (arr[i] > arr[i + 1]) :
- arr[i] = arr[i + 1]
- else :
- arr[i] = -1
- arr[n - 1] = -1
-```
-
-### Java
-```java
-void immediateSmaller(int arr[], int n) {
- for (int i = 0; i < n - 1; i++) {
- if (arr[i] > arr[i + 1]) {
- arr[i] = arr[i + 1];
- }
- else
- arr[i] = -1;
- }
- arr[n - 1] = -1;
-}
-```
-
-### C++
-```cpp
-void immediateSmaller(vector&arr, int n) {
- for (int i = 0; i < n - 1; i++) {
- if (arr[i] > arr[i + 1]) {
- arr[i] = arr[i + 1];
- }
- else
- arr[i] = -1;
- }
- arr[n - 1] = -1;
-}
-```
-
-### C
-```c
-void immediateSmaller(int arr[], int n) {
- for (int i = 0; i < n - 1; i++) {
- if (arr[i] > arr[i + 1]) {
- arr[i] = arr[i + 1];
- } else {
- arr[i] = -1;
- }
- }
- arr[n - 1] = -1;
-}
-```
-
-- **Time Complexity:** $O(N)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0019.md b/dsa-solutions/gfg-solutions/Basic/0019.md
deleted file mode 100644
index 4182c3da2..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0019.md
+++ /dev/null
@@ -1,122 +0,0 @@
----
-id: implement-strstr
-title: Implement strstr
-sidebar_label: 0019 Implement strstr
-tags:
-- String
-- C
-- Python
-- Java
-- C++
-description: "This document provides solutions to check if a string is a substring of another."
----
-
-## Problem
-
-Your task is to implement the function **strstr**. The function takes two strings as arguments **(s,x)** and locates the occurrence of the string **x** in the string **s**. The function returns an integer denoting the **first occurrence** of the string **x** in s (0 based indexing).
-
-**Note:** You are not allowed to use inbuilt function.
-
-### Examples:
-**Example 1:**
-```
-Input:
-s = GeeksForGeeks, x = Fr
-Output: -1
-Explanation: Fr is not present in the string GeeksForGeeks as substring.
-```
-
-**Example 2:**
-```
-Input:
-s = GeeksForGeeks, x = For
-Output: 5
-Explanation: For is present as substring in GeeksForGeeks from index 5 (0 based indexing).
-```
-
-### Your task:
-
-You don't have to take any input. Just complete the **strstr()** function which takes two strings **str**, **target** as an input parameter. The function returns -1 if no match if found else it returns an integer denoting the first occurrence of the x in the string s.
-
-- **Expected Time Complexity:** $O(|s|*|x|)$
-- **Expected Auxiliary Space:** $O(1)$
-
-Note : Try to solve the question in constant space complexity.
-
-### Constraints:
-
-- $1 <= |s|,|x| <= 100$
-
-## Solution
-### Python
-```python
-def strstr(s,x):
- n, m = len(s), len(x)
- if m == 0:
- return 0
- for i in range(n - m + 1):
- if s[i:i + m] == x:
- return i
- return -1
-```
-
-### Java
-```java
-int strstr(String s, String x) {
- int n = s.length();
- int m = x.length();
- if (m == 0) {
- return 0;
- }
- for (int i = 0; i <= n - m; i++) {
- if (s.substring(i, i + m).equals(x)) {
- return i;
- }
- }
- return -1;
-}
-```
-
-### C++
-```cpp
-int strstr(string s, string x) {
- int n = s.length();
- int m = x.length();
- if (m == 0) {
- return 0;
- }
- for (int i = 0; i <= n - m; i++) {
- if (s.substr(i, m) == x) {
- return i;
- }
- }
- return -1;
-}
-```
-
-### C
-```c
-int strstr_c(const char *s, const char *x) {
- int n = strlen(s);
- int m = strlen(x);
- if (m == 0) {
- return 0;
- }
- for (int i = 0; i <= n - m; i++) {
- int match = 1;
- for (int j = 0; j < m; j++) {
- if (s[i + j] != x[j]) {
- match = 0;
- break;
- }
- }
- if (match) {
- return i;
- }
- }
- return -1;
-}
-```
-
-- **Time Complexity:** $O(|s|*|x|)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0020.md b/dsa-solutions/gfg-solutions/Basic/0020.md
deleted file mode 100644
index aa03874dc..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0020.md
+++ /dev/null
@@ -1,136 +0,0 @@
----
-id: implement-stack-using-array
-title: Implement stack using array
-sidebar_label: 0020 Implement stack using array
-tags:
-- Array
-- Stack
-- C
-- Python
-- Java
-- C++
-description: "This document provides solutions to implement a stack using array."
----
-
-## Problem
-
-Write a program to implement a Stack using Array. Your task is to use the class as shown in the comments in the code editor and complete the functions push() and pop() to implement a stack.
-
-### Examples:
-**Example 1:**
-```
-Input:
-push(2)
-push(3)
-pop()
-push(4)
-pop()
-Output: 3, 4
-Explanation:
-push(2) the stack will be {2}
-push(3) the stack will be {2 3}
-pop() poped element will be 3,
- the stack will be {2}
-push(4) the stack will be {2 4}
-pop() poped element will be 4
-```
-
-**Example 2:**
-```
-Input:
-pop()
-push(4)
-push(5)
-pop()
-Output: -1, 5
-```
-
-### Your task:
-
-You are required to complete two methods **push()** and **pop()**. The push() method takes one argument, an integer '**x**' to be pushed into the stack and **pop()** which returns an integer present at the top and popped out from the stack. If the stack is empty then return **-1** from the pop() method.
-
-- **Expected Time Complexity:** $O(1)$ for both **push()** and **pop()**
-- **Expected Auxiliary Space:** $O(1)$ for both **push()** and **pop()**
-
-### Constraints:
-
-- $1 <= Q <= 100$
-- $1 <= x <= 100$
-
-## Solution
-### Python
-```python
-def push(self,data):
- self.arr.append(data)
- return self.arr
-
-def pop(self):
- if len(self.arr) == 0:
- return -1
- else:
- return self.arr.pop()
-```
-
-### Java
-```java
-void push(int a) {
- if (top < 999) {
- top++;
- arr[top] = a;
- }
-}
-
-int pop() {
- if (top >= 0) {
- int poppedElement = arr[top];
- top--;
- return poppedElement;
- }
- else {
- return -1;
- }
-}
-```
-
-### C++
-```cpp
-void MyStack :: push(int x) {
- if (top < 999) {
- top++;
- arr[top] = x;
- }
-}
-
-int MyStack :: pop() {
- if (top >= 0) {
- int poppedElement = arr[top];
- top--;
- return poppedElement;
- }
- else {
- return -1;
- }
-}
-```
-
-### C
-```c
-void push(struct Stack* stack, int item) {
- if (stack->top != stack->capacity - 1) {
- stack->top++;
- stack->array[stack->top] = item;
- }
-}
-
-int pop(struct Stack* stack) {
- if (stack->top == -1) {
- return -1;
- }
- int item = stack->array[stack->top];
- stack->top--;
- return item;
-}
-```
-
-- **Time Complexity:** $O(1)$, for both **push()** and **pop()**
-- **Auxiliary Space:** $O(1)$, for both **push()** and **pop()**
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0021.md b/dsa-solutions/gfg-solutions/Basic/0021.md
deleted file mode 100644
index 08c05e3bb..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0021.md
+++ /dev/null
@@ -1,99 +0,0 @@
----
-id: count-linked-list-nodes
-title: Count Linked List Nodes
-sidebar_label: 0021 Count Linked List Nodes
-tags:
-- Linked List
-- C
-- Python
-- Java
-- C++
-description: "This document provides solutions to counting the nodes in a linked list."
----
-
-## Problem
-
-Given a singly linked list. The task is to find the length of the linked list, where length is defined as the number of nodes in the linked list.
-
-### Examples:
-**Example 1:**
-```
-Input:
-LinkedList: 1->2->3->4->5
-Output: 5
-Explanation: Count of nodes in the linked list is 5, which is its length.
-```
-
-**Example 2:**
-```
-Input:
-LinkedList: 2->4->6->7->5->1->0
-Output: 7
-Explanation: Count of nodes in the linked list is 7. Hence, the output is 7.
-```
-
-### Your task:
-
-Your task is to complete the given function **getCount()**, which takes a head reference as an argument and should return the length of the linked list.
-
-- **Expected Time Complexity:** $O(N)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1<=N<=10^5$
-- $1<=value<=10^3$
-
-## Solution
-### Python
-```python
-def getCount(self, head_node):
- temp = head_node
- count = 0
- while temp is not None:
- count+=1
- temp = temp.next
- return count
-```
-
-### Java
-```java
-public static int getCount(Node head) {
- Node temp = head;
- int count = 0;
- while(temp!=null) {
- count++;
- temp = temp.next;
- }
- return count;
-}
-```
-
-### C++
-```cpp
-int getCount(struct Node* head){
- struct Node* temp = head;
- int count = 0;
- while (temp != NULL) {
- count++;
- temp = temp->next;
- }
- return count;
-}
-```
-
-### C
-```c
-int getCount(struct Node* head) {
- struct Node* temp = head;
- int count = 0;
- while (temp != NULL) {
- count++;
- temp = temp->next;
- }
- return count;
-}
-```
-
-- **Time Complexity:** $O(N)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0022.md b/dsa-solutions/gfg-solutions/Basic/0022.md
deleted file mode 100644
index c4d39976a..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0022.md
+++ /dev/null
@@ -1,105 +0,0 @@
----
-id: preorder-traversal
-title: Preorder Traversal
-sidebar_label: 0022 Preorder Traversal
-tags:
-- Array
-- Vector
-- Python
-- Java
-- C++
-description: "This document provides solutions to preorder traversal of a binary tree."
----
-
-## Problem
-
-Given a binary tree, find its preorder traversal.
-
-### Examples:
-**Example 1:**
-```
-Input:
- 1
- /
- 4
- / \
-4 2
-Output: 1 4 4 2
-```
-
-**Example 2:**
-```
-Input:
- 6
- / \
- 3 2
- \ /
- 1 2
-Output: 6 3 1 2 2
-```
-
-### Your task:
-
-You just have to complete the function **preorder()** which takes the root node of the tree as input and returns an array containing the preorder traversal of the tree.
-
-- **Expected Time Complexity:** $O(N)$
-- **Expected Auxiliary Space:** $O(N)$
-
-### Constraints:
-
-- $1 <=$ Number of nodes $<= 10^4$
-- $0 <=$ Data of a node $<= 10^5$
-
-## Solution
-### Python
-```python
-def preorder(root):
- arr = []
- def traverse(node):
- if node is None:
- return
- arr.append(node.data)
- traverse(node.left)
- traverse(node.right)
- traverse(root)
- return arr
-```
-
-### Java
-```java
-static ArrayList preorder(Node root) {
- ArrayList arr = new ArrayList<>();
- traverse(root, arr);
- return arr;
-}
-
-static void traverse(Node node, ArrayList arr) {
- if (node == null)
- return;
- arr.add(node.data);
- traverse(node.left, arr);
- traverse(node.right, arr);
-}
-```
-
-### C++
-```cpp
-void traverse(Node* node, std::vector& result);
-
-vector preorder(Node* root) {
- vector result;
- traverse(root, result);
- return result;
-}
-
-void traverse(Node* node, vector& result) {
- if (node == nullptr)
- return;
- result.push_back(node->data);
- traverse(node->left, result);
- traverse(node->right, result);
-}
-```
-
-- **Time Complexity:** $O(N)$
-- **Auxiliary Space:** $O(N)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0023.md b/dsa-solutions/gfg-solutions/Basic/0023.md
deleted file mode 100644
index a80767abf..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0023.md
+++ /dev/null
@@ -1,120 +0,0 @@
----
-id: check-if-circular-linked-list
-title: Check If Circular Linked List
-sidebar_label: 0010 Check If Circular Linked List
-tags:
-- Array
-- C
-- Python
-- Java
-- C++
-description: "This document provides solutions to whether a linked list is circular or not."
----
-
-## Problem
-
-Given **head**, the head of a singly linked list, find if the linked list is circular or not. A linked list is called circular if it not NULL terminated and all nodes are connected in the form of a cycle. An empty linked list is considered as circular.
-
-**Note:** The linked list does not contains any inner loop.
-
-### Examples:
-**Example 1:**
-```
-Input:
-LinkedList: 1->2->3->4->5 (the first and last node is connected, i.e. 5 --> 1)
-Output: 1
-```
-
-**Example 2:**
-```
-Input:
-LinkedList: 2->4->6->7->5->1
-Output: 0
-```
-
-### Your task:
-
-The task is to complete the function isCircular() which checks if the given linked list is circular or not. It should return true or false accordingly. (the driver code prints 1 if the returned values is true, otherwise 0)
-
-- **Expected Time Complexity:** $O(N)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1 <=$Number of nodes$<= 100$
-
-## Solution
-### Python
-```python
-def isCircular(head):
- if head is None:
- return False
- slow = head
- fast = head.next
- while fast is not None and fast.next is not None:
- if slow == fast:
- return True
- slow = slow.next
- fast = fast.next.next
- return False
-```
-
-### Java
-```java
-boolean isCircular(Node head) {
- if (head == null) {
- return false;
- }
- Node slow = head;
- Node fast = head.next;
- while (fast != null && fast.next != null) {
- if (slow == fast) {
- return true;
- }
- slow = slow.next;
- fast = fast.next.next;
- }
- return false;
-}
-```
-
-### C++
-```cpp
-bool isCircular(Node *head) {
- if (head == NULL) {
- return false;
- }
- Node* slow = head;
- Node* fast = head->next;
- while (fast != nullptr && fast->next != nullptr) {
- if (slow == fast) {
- return true;
- }
- slow = slow->next;
- fast = fast->next->next;
- }
- return false;
-}
-```
-
-### C
-```c
-bool isCircular(struct Node *head){
- if (head == NULL) {
- return false;
- }
- struct Node *slow = head;
- struct Node *fast = head->next;
- while (fast != NULL && fast->next != NULL) {
- if (slow == fast) {
- return true;
- }
- slow = slow->next;
- fast = fast->next->next;
- }
- return false;
-}
-```
-
-- **Time Complexity:** $O(N)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0024.md b/dsa-solutions/gfg-solutions/Basic/0024.md
deleted file mode 100644
index bcb52dd62..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0024.md
+++ /dev/null
@@ -1,101 +0,0 @@
----
-id: inorder-traversal
-title: Inorder Traversal
-sidebar_label: 0024 Inorder Traversal
-tags:
-- Array
-- Binary tree
-- Python
-- Java
-- C++
-description: "This document provides solutions for inorder traversal of a tree."
----
-
-## Problem
-
-Given a Binary Tree, find the In-Order Traversal of it.
-
-### Examples:
-**Example 1:**
-```
-Input:
- 1
- / \
- 3 2
-Output: 3 1 2
-```
-
-**Example 2:**
-```
-Input:
- 10
- / \
- 20 30
- / \ /
- 40 60 50
-Output: 40 20 60 10 50 30
-```
-
-### Your task:
-
-You don't need to read input or print anything. Your task is to complete the function **inOrder()** that takes root node of the tree as input and returns a list containing the In-Order Traversal of the given Binary Tree.
-
-- **Expected Time Complexity:** $O(N)$
-- **Expected Auxiliary Space:** $O(N)$
-
-### Constraints:
-
-- $1 <=$Number of nodes $<= 10^5$
-- $0 <=$Data of a node $<= 10^5$
-
-## Solution
-### Python
-```python
-def InOrder(self,root):
- arr = []
- def traverse(node):
- if node is None:
- return
- traverse(node.left)
- arr.append(node.data)
- traverse(node.right)
- traverse(root)
- return arr
-```
-
-### Java
-```java
-ArrayList inOrder(Node root) {
- ArrayList arr = new ArrayList<>();
- traverse(root, arr);
- return arr;
-}
-
-void traverse(Node node, ArrayList arr) {
- if (node == null)
- return;
- traverse(node.left, arr);
- arr.add(node.data);
- traverse(node.right, arr);
-}
-```
-
-### C++
-```cpp
-vector inOrder(Node* root) {
- vector result;
- traverse(root, result);
- return result;
-}
-
-void traverse(Node* node, vector& result) {
- if (node == nullptr)
- return;
- traverse(node->left, result);
- result.push_back(node->data);
- traverse(node->right, result);
-}
-```
-
-- **Time Complexity:** $O(N)$
-- **Auxiliary Space:** $O(N)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0025.md b/dsa-solutions/gfg-solutions/Basic/0025.md
deleted file mode 100644
index 00c7804e4..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0025.md
+++ /dev/null
@@ -1,144 +0,0 @@
----
-id: implement-queue-using-array
-title: Implement Queue using array
-sidebar_label: 0010 Implement Queue using array
-tags:
-- Array
-- Queue
-- C
-- Python
-- Java
-- C++
-description: "This document provides solutions to implement a queue using an array."
----
-
-## Problem
-
-Implement a Queue using an Array. Queries in the Queue are of the following type:
-- 1 x (a query of this type means pushing 'x' into the queue)
-- 2 (a query of this type means to pop element from queue and print the poped element)
-
-### Examples:
-**Example 1:**
-```
-Input:
-Q = 5
-Queries = 1 2 1 3 2 1 4 2
-Output: 2 3
-Explanation:
-In the first test case for query
-1 2 the queue will be {2}
-1 3 the queue will be {2 3}
-2 poped element will be 2 the
- queue will be {3}
-1 4 the queue will be {3 4}
-2 poped element will be 3
-```
-
-**Example 2:**
-```
-Input:
-Q = 4
-Queries = 1 3 2 2 1 4
-Output: 3 -1
-Explanation:
-In the second testcase for query
-1 3 the queue will be {3}
-2 poped element will be 3 the
- queue will be empty
-2 there is no element in the
- queue and hence -1
-1 4 the queue will be {4}.
-```
-
-- **Expected Time Complexity:** $O(1)$ for both **push()** and **pop()**
-- **Expected Auxiliary Space:** $O(1)$ for both **push()** and **pop()**
-
-### Constraints:
-
-- $1 ≤ Q ≤ 10^5$
-- $0 ≤ x ≤ 10^5$
-
-## Solution
-### Python
-```python
-def __init__(self):
- self.q = []
-
-def push(self, x):
- self.q.append(x)
-
-def pop(self):
- if self.q:
- return self.q.pop(0)
- else:
- return -1
-```
-
-### Java
-```java
-void push(int x) {
- if (rear == arr.length) {
- return;
- }
- arr[rear] = x;
- rear++;
-}
-
-int pop() {
- if (front == rear) {
- return -1;
- }
- int element = arr[front];
- for (int i = 0; i < rear - 1; i++) {
- arr[i] = arr[i + 1];
- }
- rear--;
- return element;
-}
-```
-
-### C++
-```cpp
-void MyQueue :: push(int x) {
- if ((rear + 1) % 100005 == front) {
- return;
- }
- arr[rear] = x;
- rear = (rear + 1) % 100005;
-}
-
-int MyQueue :: pop() {
- if (front == rear) {
- return -1;
- }
- int element = arr[front];
- front = (front + 1) % 100005;
-
- return element;
-}
-```
-
-### C
-```c
-void push(struct MyQueue *queue, int x) {
- if ((queue->rear + 1) % MAX_SIZE == queue->front) {
- return;
- }
- queue->arr[queue->rear] = x;
- queue->rear = (queue->rear + 1) % MAX_SIZE;
-}
-
-int pop(struct MyQueue *queue) {
- if (queue->front == queue->rear) {
- printf("Queue is empty. Cannot pop element.\n");
- return -1;
- }
- int element = queue->arr[queue->front];
- queue->front = (queue->front + 1) % MAX_SIZE;
- return element;
-}
-```
-
-- **Time Complexity:** $O(1)$ for both **push()** and **pop()**
-- **Auxiliary Space:** $O(1)$ for both **push()** and **pop()**
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0026.md b/dsa-solutions/gfg-solutions/Basic/0026.md
deleted file mode 100644
index 7f3226361..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0026.md
+++ /dev/null
@@ -1,78 +0,0 @@
----
-id: count-squares
-title: Count Squares
-sidebar_label: 0026 Count Squares
-tags:
-- C
-- Python
-- Java
-- C++
-description: "This document provides solutions for calculating perfect squares."
----
-
-## Problem
-
-Consider a sample space S consisting of all perfect squares starting from 1, 4, 9 and so on. You are given a number **N**, you have to output the number of integers less than N in the sample space S.
-
-### Examples:
-**Example 1:**
-```
-Input :
-N = 9
-Output:
-2
-Explanation:
-1 and 4 are the only Perfect Squares less than 9. So, the Output is 2.
-```
-
-**Example 2:**
-```
-Input :
-N = 3
-Output:
-1
-Explanation:
-1 is the only Perfect Square less than 3. So, the Output is 1.
-```
-
-### Your task:
-
-You don't need to read input or print anything. Your task is to complete the function **countSquares()** which takes an Integer N as input and returns the answer.
-
-- **Expected Time Complexity:** $O(sqrt(N))$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1<=N<=10^8$
-
-## Solution
-### Python
-```python
-def countSquares(self, N):
- return (math.floor(math.sqrt(N-1)) - math.ceil(math.sqrt(1)) + 1)
-```
-
-### Java
-```java
-static int countSquares(int N) {
- return (int)(Math.floor(Math.sqrt(N - 1)) - Math.ceil(Math.sqrt(1)) + 1);
-}
-```
-
-### C++
-```cpp
-int countSquares(int N) {
- return (floor(sqrt(N - 1)) - ceil(sqrt(1)) + 1);
-}
-```
-
-### C
-```c
-int countSquares(int N) {
- return (int)(floor(sqrt(N - 1)) - ceil(sqrt(1)) + 1);
-}
-```
-
-- **Time Complexity:** $O(sqrt(N))$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0027.md b/dsa-solutions/gfg-solutions/Basic/0027.md
deleted file mode 100644
index eea9abbb6..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0027.md
+++ /dev/null
@@ -1,97 +0,0 @@
----
-id: print-linked-list-elements
-title: Print Linked List elements
-sidebar_label: 0027 Print Linked List elements
-tags:
-- Linked list
-- C
-- Python
-- Java
-- C++
-description: "This document provides solutions to cyclically rotate the array by one."
----
-
-## Problem
-
-Given a linked list. Print all the elements of the linked list.
-
-**Note:** End of Line is handled by driver code itself. You just have to end with a single space.
-
-### Examples:
-**Example 1:**
-```
-Input:
-LinkedList : 1 -> 2
-Output:
-1 2
-Explanation:
-The linked list contains two elements 1 and 2.The elements are printed in a single line.
-```
-
-**Example 2:**
-```
-Input:
-Linked List : 49 -> 10 -> 30
-Output:
-49 10 30
-Explanation:
-The linked list contains 3 elements 49, 10 and 30. The elements are printed in a single line.
-```
-
-### Your task:
-
-You don't need to read input or print anything. Your task is to complete the function **display()** which takes the head of the linked list as input and prints the linked list in a single line.
-
-- **Expected Time Complexity:** $O(n)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1 <= n <=10^5$
-- $1 <=$ node values $<= 10^6$
-
-## Solution
-### Python
-```python
-def display(self,head):
- temp = head
- while temp is not None:
- print(temp.data, end = " ")
- temp = temp.next
-```
-
-### Java
-```java
-void display(Node head) {
- Node temp = head;
- while (temp != null) {
- System.out.print(temp.data + " ");
- temp = temp.next;
- }
-}
-```
-
-### C++
-```cpp
-void display(Node *head) {
- Node* temp = head;
- while (temp != nullptr) {
- cout << temp->data << " ";
- temp = temp->next;
- }
-}
-```
-
-### C
-```c
-void display(struct Node *head) {
- struct Node* temp = head;
- while (temp != NULL) {
- printf("%d ", temp->data);
- temp = temp->next;
- }
-}
-```
-
-- **Time Complexity:** $O(n)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0028.md b/dsa-solutions/gfg-solutions/Basic/0028.md
deleted file mode 100644
index 47474022d..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0028.md
+++ /dev/null
@@ -1,139 +0,0 @@
----
-id: implement-stack-using-linked-list
-title: Implement Stack using Linked List
-sidebar_label: 0028 Implement Stack using Linked List
-tags:
-- Array
-- Linked List
-- C
-- Python
-- Java
-- C++
-description: "This document provides solutions to implementing a stack using linked list."
----
-
-## Problem
-
-You have a linked list and you have to implement the functionalities push and pop of stack using this given linked list. Your task is to use the class as shown in the comments in the code editor and complete the functions push() and pop() to implement a stack.
-
-### Examples:
-**Example 1:**
-```
-Input:
-push(2)
-push(3)
-pop()
-push(4)
-pop()
-Output: 3 4
-Explanation:
-push(2) the stack will be {2}
-push(3) the stack will be {2 3}
-pop() poped element will be 3,
- the stack will be {2}
-push(4) the stack will be {2 4}
-pop() poped element will be 4
-```
-
-**Example 2:**
-```
-Input:
-pop()
-push(4)
-push(5)
-pop()
-Output: -1 5
-```
-
-### Your task:
-
-You are required to complete two methods **push()** and **pop()**. The **push()** method takes one argument, an integer '**x**' to be pushed into the stack and **pop()** which returns an integer present at the top and popped out from the stack. If the stack is empty then return -1 from the **pop()** method.
-
-- **Expected Time Complexity:** $O(1)$ for both **push()** and **pop()**
-- **Expected Auxiliary Space:** $O(1)$ for both **push()** and **pop()**
-
-### Constraints:
-
-- $1 <= Q <= 100$
-- $1 <= x <= 100$
-
-## Solution
-### Python
-```python
-def __init__(self):
- self.head = None
-
-def push(self, data):
- new_node = StackNode(data)
- new_node.next = self.head
- self.head = new_node
-
-def pop(self):
- if self.head is None:
- return -1
- else:
- ele = self.head.data
- self.head = self.head.next
- return ele
-```
-
-### Java
-```java
-void push(int a) {
- StackNode new_node = new StackNode(a);
- new_node.next = top;
- top = new_node;
-}
-
-int pop() {
- if (top == null) {
- return -1;
- } else {
- int element = top.data;
- top = top.next;
- return element;
- }
-}
-```
-
-### C++
-```cpp
-void MyStack ::push(int x) {
- StackNode* new_node = new StackNode(x);
- new_node->next = top;
- top = new_node;
-}
-
-int MyStack ::pop() {
- if (top == nullptr) {
- return -1;
- }
- else {
- int element = top->data;
- StackNode* temp = top;
- top = top->next;
- delete temp;
- return element;
- }
-}
-```
-
-### C
-```c
-void push(struct Stack* stack, int item) {
- if (stack->top == stack->capacity - 1) {
- return;
- }
- stack->array[++stack->top] = item;
-}
-
-int pop(struct Stack* stack) {
- if (stack->top == -1) {
- return -1;
- }
- return stack->array[stack->top--];
-}
-```
-
-- **Time Complexity:** $O(1)$ for both **push()** and **pop()**
-- **Auxiliary Space:** $O(1)$ for both **push()** and **pop()**
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0029.md b/dsa-solutions/gfg-solutions/Basic/0029.md
deleted file mode 100644
index 56cf487b2..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0029.md
+++ /dev/null
@@ -1,90 +0,0 @@
----
-id: factorial
-title: Factorial
-sidebar_label: 0029 Factorial
-tags:
-- C
-- Python
-- Java
-- C++
-description: "This document provides solutions to finding the factorial of a number."
----
-
-## Problem
-
-Given a positive integer, **N**. Find the factorial of **N**.
-
-### Examples:
-**Example 1:**
-```
-Input:
-N = 5
-Output:
-120
-Explanation:
-5*4*3*2*1 = 120
-```
-
-**Example 2:**
-```
-Input:
-N = 4
-Output:
-24
-Explanation:
-4*3*2*1 = 24
-```
-
-### Your task:
-
-You don't need to read input or print anything. Your task is to complete the function **factorial()** which takes an integer **N** as input parameters and returns an integer, the factorial of N.
-
-- **Expected Time Complexity:** $O(N)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $0 <= N <= 18$
-
-## Solution
-### Python
-```python
-def factorial (self, N):
- fact = 1
- for i in range(1, N+1):
- fact = fact*i
- return fact
-```
-
-### Java
-```java
-static long factorial(int N){
- long fact = 1;
- for (int i = 1; i<=N; i++)
- fact = fact*i;
- return fact;
-}
-```
-
-### C++
-```cpp
-long long int factorial(int N){
- long fact = 1;
- for (int i = 1; i<=N; i++)
- fact = fact*i;
- return fact;
-}
-```
-
-### C
-```c
-long long int factorial(int N){
- long fact = 1;
- for (int i = 1; i<=N; i++)
- fact = fact*i;
- return fact;
-}
-```
-
-- **Time Complexity:** $O(N)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0030.md b/dsa-solutions/gfg-solutions/Basic/0030.md
deleted file mode 100644
index 42edec0a3..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0030.md
+++ /dev/null
@@ -1,103 +0,0 @@
----
-id: identical-linked-lists
-title: Identical Linked Lists
-sidebar_label: 0029 Identical Linked Lists
-tags:
-- C
-- Python
-- Java
-- C++
-description: "This document provides solutions for checking whether two linked lists are identical or not."
----
-
-## Problem
-
-Given the two singly **Linked Lists** respectively. The task is to check whether two linked lists are **identical** or not.
-
-Two Linked Lists are identical when they have the same data and with the same arrangement too. If both Linked Lists are identical then return true otherwise return false.
-
-### Examples:
-**Example 1:**
-```
-Input:
-LinkedList1: 1->2->3->4->5->6
-LinkedList2: 99->59->42->20
-Output: Not identical
-```
-
-**Example 2:**
-```
-Input:
-LinkedList1: 1->2->3->4->5
-LinkedList2: 1->2->3->4->5
-Output: Identical
-```
-
-- **Expected Time Complexity:** $O(n)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1 <= n <= 10^3$
-
-## Solution
-### Python
-```python
-def areIdentical(head1, head2):
- temp1 = head1
- temp2 = head2
- while temp1 is not None and temp2 is not None:
- if temp1.data!=temp2.data:
- return False
- temp1 = temp1.next
- temp2 = temp2.next
- return True
-```
-
-### Java
-```java
-public boolean isIdentical (Node head1, Node head2){
- Node temp1 = head1;
- Node temp2 = head2;
- while (temp1!=null && temp2!=null) {
- if (temp1.data!=temp2.data)
- return false;
- temp1 = temp1.next;
- temp2 = temp2.next;
- }
- return temp1 == null && temp2 == null;
-}
-```
-
-### C++
-```cpp
-bool areIdentical(struct Node *head1, struct Node *head2) {
- struct Node* temp1 = head1;
- struct Node* temp2 = head2;
- while (temp1 != nullptr && temp2 != nullptr) {
- if (temp1->data != temp2->data)
- return false;
- temp1 = temp1->next;
- temp2 = temp2->next;
- }
- return temp1 == nullptr && temp2 == nullptr;
-}
-```
-
-### C
-```c
-bool areIdentical(struct Node *head1, struct Node *head2) {
- struct Node* temp1 = head1;
- struct Node* temp2 = head2;
- while (temp1 != NULL && temp2 != NULL) {
- if (temp1->data != temp2->data)
- return false;
- temp1 = temp1->next;
- temp2 = temp2->next;
- }
- return temp1 == NULL && temp2 == NULL;
-}
-```
-
-- **Time Complexity:** $O(n)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0031.md b/dsa-solutions/gfg-solutions/Basic/0031.md
deleted file mode 100644
index 5293dc8e6..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0031.md
+++ /dev/null
@@ -1,98 +0,0 @@
----
-id: searching-a-number
-title: Searching a number
-sidebar_label: 0031 Searching a number
-tags:
-- Array
-- C
-- Python
-- Java
-- C++
-description: "This document provides solutions to finding the position of an element in the array."
----
-
-## Problem
-
-Given an array **arr** of **n** elements and a integer **k**. Your task is to return the position of **first occurence** of **k** in the given array and if element k is not present in the array then return **-1** .
-
-**Note:** Position of first element is considered as 1.
-
-### Examples:
-**Example 1:**
-```
-Input:
-n = 5
-k = 16
-arr = {9, 7, 2, 16, 4}
-Output: 4
-Explanation: k = 16 is found in the given array at position 4.
-```
-
-**Example 2:**
-```
-Input:
-n = 7
-k = 98
-arr = {1, 22, 57, 47, 34, 18, 66}
-Output: -1
-Explanation: k = 98 isn't found in the given array.
-```
-
-### Your task:
-
-Complete the function **search()** which takes two integers **n** , **k** and an array **arr**, as input parameters and returns an integer denoting the answer. Return **-1** if the number is not found in the array. You don't have to print answers or take inputs.
-
-- **Expected Time Complexity:** $O(n)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1 <= n <= 10^6$
-- $1 <= k <= 10^6$
-- $1 <= arr[i] <= 10^9$
-
-## Solution
-### Python
-```python
-def search(self, n : int, k : int, arr : List[int]) -> int:
- for i in range(0, n-1):
- if k==arr[i]:
- return i+1
- return -1
-```
-
-### Java
-```java
-public static int search(int n, int k, int[] arr) {
- for(int i = 0; i &arr) {
- for(int i = 0; i sortArr(vectorarr, int n){
- sort(arr.begin(), arr.end());
- return arr;
-}
-```
-
-### C
-```c
-int compare(const void* a, const void* b) {
- return (*(int*)a - *(int*)b);
-}
-
-void sortArr(int arr[], int n) {
- qsort(arr, n, sizeof(int), compare);
-}
-```
-
-- **Time Complexity:** $O(n * log n)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0033.md b/dsa-solutions/gfg-solutions/Basic/0033.md
deleted file mode 100644
index bcc31d143..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0033.md
+++ /dev/null
@@ -1,114 +0,0 @@
----
-id: postorder-traversal
-title: Postorder Traversal
-sidebar_label: 0033 Postorder Traversal
-tags:
-- Binary Tree
-- Python
-- Java
-- C++
-description: "This document provides solutions postorder traversal of a binary tree."
----
-
-## Problem
-
-Given a binary tree, find the Postorder Traversal of it.
-
-For Example, the postorder traversal of the following tree is:
-5 10 39 1
-```
- 1
- / \
- 10 39
- /
-5
-```
-
-### Examples:
-**Example 1:**
-```
-Input:
- 19
- / \
- 10 8
- / \
- 11 13
-Output: 11 13 10 8 19
-```
-
-**Example 2:**
-```
-Input:
- 11
- /
- 15
- /
- 7
-Output: 7 15 11
-```
-
-### Your task:
-
-You don't need to read input or print anything. Your task is to complete the function **postOrder()** that takes **root node** as input and returns an array containing the postorder traversal of the given Binary Tree.
-
-- **Expected Time Complexity:** $O(N)$
-- **Expected Auxiliary Space:** $O(N)$
-
-### Constraints:
-
-- $1 <=$ Number of nodes $<= 10^5$
-- $0 <=$ Data of a node $<= 10^5$
-
-## Solution
-### Python
-```python
-def postOrder(root):
- arr = []
- def traverse(node):
- if node is None:
- return
- traverse(node.left)
- traverse(node.right)
- arr.append(node.data)
- traverse(root)
- return arr
-```
-
-### Java
-```java
-ArrayList postOrder(Node root) {
- ArrayList arr = new ArrayList<>();
- traverse(root, arr);
- return arr;
-}
-
-void traverse(Node node, ArrayList arr) {
- if (node == null)
- return;
- traverse(node.left, arr);
- traverse(node.right, arr);
- arr.add(node.data);
-}
-```
-
-### C++
-```cpp
-void traverse(Node* node, vector& result);
-
-vector postOrder(Node* root) {
- vector result;
- traverse(root, result);
- return result;
-}
-
-void traverse(Node* node, vector& result) {
- if (node == nullptr)
- return;
- traverse(node->left, result);
- traverse(node->right, result);
- result.push_back(node->data);
-}
-```
-
-- **Time Complexity:** $O(N)$
-- **Auxiliary Space:** $O(N)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0034.md b/dsa-solutions/gfg-solutions/Basic/0034.md
deleted file mode 100644
index baa9eb473..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0034.md
+++ /dev/null
@@ -1,112 +0,0 @@
----
-id: lcm-and-gcd
-title: LCM and GCD
-sidebar_label: 0034 LCM and GCD
-tags:
-- Mathematics
-- Number Theory
-- C
-- Python
-- Java
-- C++
-description: "This document provides solutions for finding the Least Common Multiple (LCM) and Greatest Common Divisor (GCD) of integers."
----
-
-## Problem
-
-Given two integers a and b, write a function lcmAndGcd() to compute their LCM and GCD. The function takes two integers b and b as input and returns a list containing their LCM and GCD.
-
-### Examples:
-**Example 1:**
-```
-Input: a = 5 , b = 10
-Output: 10 5
-Explanation: LCM of 5 and 10 is 10, while thier GCD is 5.
-```
-
-**Example 2:**
-```
-Input: a = 14 , b = 8
-Output: 56 2
-Explanation: LCM of 14 and 8 is 56, while thier GCD is 2.
-```
-
-- **Expected Time Complexity:** $O(log(min(a, b))$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1 <= a, b <=10^9$
-
-## Solution
-### Python
-```python
-def lcmAndGcd(self, A , B):
- def g(a,b):
- if (b == 0):
- return a
- return g(b, a%b)
-
- gcd = g(A, B)
- lcm = A*B//gcd
- return lcm, gcd
-```
-
-### Java
-```java
-static Long[] lcmAndGcd(Long A , Long B) {
- long gcd = calculateGCD(A, B);
- long lcm = (A * B) / gcd;
- return new Long[] {lcm, gcd};
-}
-
-static long calculateGCD(long a, long b) {
- if (b == 0) {
- return a;
- }
- return calculateGCD(b, a % b);
-}
-```
-
-### C++
-```cpp
-public:
-vector lcmAndGcd(long long A , long long B) {
- long long gcd_val = gcd(A, B);
- long long lcm_val = (A / gcd_val) * B;
- return {lcm_val, gcd_val};
-}
-
-private:
-long long gcd(long long a, long long b) {
- if (b == 0) {
- return a;
- }
- return gcd(b, a % b);
-}
-```
-
-### C
-```c
-long long gcd(long long a, long long b) {
- while (b != 0) {
- long long temp = b;
- b = a % b;
- a = temp;
- }
- return a;
-}
-
-long long lcm(long long a, long long b) {
- return (a / gcd(a, b)) * b;
-}
-
-void lcmAndGcd(long long A, long long B, long long *lcm_result, long long *gcd_result) {
- *gcd_result = gcd(A, B);
- *lcm_result = lcm(A, B);
-}
-
-```
-
-- **Time Complexity:** $O(log(min(a, b))$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0035.md b/dsa-solutions/gfg-solutions/Basic/0035.md
deleted file mode 100644
index 440b6d2d8..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0035.md
+++ /dev/null
@@ -1,135 +0,0 @@
----
-id: rotating-an-array
-title: Rotating an Array
-sidebar_label: 0035 Rotating an Array
-tags:
-- Array
-- Rotation
-- C
-- Python
-- Java
-- C++
-description: "This document provides solutions for rotating an array to the left or right by a specified number of positions."
----
-
-## Problem
-
-Given an array of size n. The task is to rotate array by d elements where d ≤ n.
-
-### Examples:
-**Example 1:**
-```
-Input:
-n = 7
-arr[] = {-1, -2, -3, 4, 5, 6, 7}
-d = 2
-Output: {-3, 4, 5, 6, 7, -1, -2}
-Explanation:
-Rotate by 1: [-2, -3, 4, 5, 6, 7, -1]
-Rotate by 2: [-3, 4, 5, 6, 7, -1, -2]
-```
-
-**Example 2:**
-```
-Input:
-n = 4
-arr[] = {1, 3, 4, 2}
-d = 3
-Output: {2, 1, 3, 4}
-```
-
-### Your task:
-
-You don't need to read input or print anything. Your task is to complete the function **leftRotate()** which takes the array of integers **arr[]**, its size **n** and **d** as input parameters and rotates arr[] in-place without using any extra memory.
-
-- **Expected Time Complexity:** $O(n)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1 ≤ n ≤ 10^6$
-- $-10^9 ≤ arr[i] ≤ 10^9$
-- $0 ≤ d ≤ n$
-
-## Solution
-### Python
-```python
-def reverse(self, arr, start, end):
- while start < end:
- arr[start], arr[end] = arr[end], arr[start]
- start += 1
- end -= 1
-
-def leftRotate(self, arr, n, d):
- d = d % n
- self.reverse(arr, 0, d - 1)
- self.reverse(arr, d, n - 1)
- self.reverse(arr, 0, n - 1)
-```
-
-### Java
-```java
-void leftRotate(int[] arr, int n, int d) {
- d = d % n;
- reverse(arr, 0, d - 1);
- reverse(arr, d, n - 1);
- reverse(arr, 0, n - 1);
-}
-
-void reverse(int[] arr, int start, int end) {
- while (start < end) {
- int temp = arr[start];
- arr[start] = arr[end];
- arr[end] = temp;
- start++;
- end--;
- }
-}
-```
-
-### C++
-```cpp
-public:
-void reverse(int arr[], int start, int end) {
- while (start < end) {
- swap(arr[start], arr[end]);
- start++;
- end--;
- }
-}
-
-public:
-void leftRotate(int arr[], int n, int d) {
- d = d % n;
- reverse(arr, 0, d - 1);
- reverse(arr, d, n - 1);
- reverse(arr, 0, n - 1);
-}
-```
-
-### C
-```c
-void swap(int *a, int *b) {
- int temp = *a;
- *a = *b;
- *b = temp;
-}
-
-void reverse(int arr[], int start, int end) {
- while (start < end) {
- swap(&arr[start], &arr[end]);
- start++;
- end--;
- }
-}
-
-void leftRotate(int arr[], int n, int d) {
- d = d % n;
- reverse(arr, 0, d - 1);
- reverse(arr, d, n - 1);
- reverse(arr, 0, n - 1);
-}
-```
-
-- **Time Complexity:** $O(n)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0036.md b/dsa-solutions/gfg-solutions/Basic/0036.md
deleted file mode 100644
index e3b2aa5ed..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0036.md
+++ /dev/null
@@ -1,118 +0,0 @@
----
-id: binary-array-sorting
-title: Binary Array Sorting
-sidebar_label: 0036 Binary Array Sorting
-tags:
-- Array
-- Sorting
-- Binary Array
-- C
-- Python
-- Java
-- C++
-description: "This document provides solutions for sorting a binary array, where elements are either 0 or 1."
----
-
-## Problem
-
-Given a binary array **A[]** of size **N**. The task is to arrange the array in increasing order.
-
-**Note:** The binary array contains only 0 and 1.
-
-### Examples:
-**Example 1:**
-```
-Input:
-5
-1 0 1 1 0
-
-Output:
-0 0 1 1 1
-
-Explanation:
-After arranging the elements in increasing order, elements will be as 0 0 1 1 1.
-```
-
-**Example 2:**
-```
-Input:
-10
-1 0 1 1 1 1 1 0 0 0
-
-Output:
-0 0 0 0 1 1 1 1 1 1
-
-Explanation:
-After arranging the elements in increasing order, elements will be 0 0 0 0 1 1 1 1 1 1.
-```
-
-### Your task:
-
-This is a function problem. You only need to complete the function **binSort()** that takes the array **A[]** and it's size **N** as parameters and sorts the array. The printing is done automatically by the driver code.
-
-- **Expected Time Complexity:** $O(N)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1<=N<=10^6$
-- $0<=A[i]<=1$
-
-## Solution
-### Python
-```python
-def binSort(self, A, N):
- j = -1
- for i in range(N):
- if A[i] < 1:
- j = j + 1
- A[i], A[j] = A[j], A[i]
-```
-
-### Java
-```java
-static void binSort(int A[], int N) {
- int j = -1;
- for (int i = 0; i < N; i++) {
- if (A[i] < 1) {
- j++;
- int temp = A[i];
- A[i] = A[j];
- A[j] = temp;
- }
- }
-}
-```
-
-### C++
-```cpp
-void binSort(int A[], int N) {
- int j = -1;
- for (int i = 0; i < N; i++) {
- if (A[i] < 1) {
- j++;
- int temp = A[i];
- A[i] = A[j];
- A[j] = temp;
- }
- }
-}
-```
-
-### C
-```c
-void binSort(int A[], int N) {
- int j = -1;
- for (int i = 0; i < N; i++) {
- if (A[i] < 1) {
- j++;
- int temp = A[i];
- A[i] = A[j];
- A[j] = temp;
- }
- }
-}
-```
-
-- **Time Complexity:** $O(N)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0037.md b/dsa-solutions/gfg-solutions/Basic/0037.md
deleted file mode 100644
index d4013296a..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0037.md
+++ /dev/null
@@ -1,125 +0,0 @@
----
-id: count-leaves-binary-tree
-title: Count Leaves in Binary Tree
-sidebar_label: 0037 Count Leaves in Binary Tree
-tags:
-- Binary Tree
-- Tree Traversal
-- Depth-First Search
-- C
-- Python
-- Java
-- C++
-description: "This document provides solutions for counting the number of leaf nodes in a binary tree."
----
-
-## Problem
-
-Given a Binary Tree of size N, You have to count leaves in it. For example, there are two leaves in following tree.
-
-```
- 1
- / \
- 10 39
- /
-5
-```
-
-### Examples:
-**Example 1:**
-```
-Input:
-Given Tree is
- 4
- / \
- 8 10
- / / \
- 7 5 1
- /
- 3
-Output:
-3
-Explanation:
-Three leaves are 3 , 5 and 1.
-```
-
-### Your task:
-
-You don't have to take input. Complete the function **countLeaves()** that takes root node of the given tree as parameter and returns the count of leaves in tree. The printing is done by the driver code.
-
-### Constraints:
-
-- $1<=N<=10^4$
-
-## Solution
-### Python
-```python
-def countLeaves(root):
- q = []
- q.append(root)
- count = 0
- while(len(q) > 0):
- temp = q.pop(0)
- if(temp.left is None and temp.right is None):
- count += 1
- if(temp.left is not None):
- q.append(temp.left)
- if(temp.right is not None):
- q.append(temp.right)
- return count
-```
-
-### Java
-```java
-int countLeaves(Node node) {
- Queue q = new LinkedList();
- q.add(node);
- int count = 0;
- while(!q.isEmpty()){
- Node temp = q.poll();
- if(temp.left == null && temp.right == null) count++;
- if(temp.left != null) q.add(temp.left);
- if(temp.right != null) q.add(temp.right);
- }
- return count;
-}
-```
-
-### C++
-```cpp
-int countLeaves(Node* root) {
- queue q;
- q.push(root);
- int count = 0;
- while(!q.empty()){
- Node* temp = q.front();
- q.pop();
- if(temp->left == NULL && temp->right == NULL)
- count++;
- if(temp->left) q.push(temp->left);
- if(temp->right) q.push(temp->right);
- }
- return count;
-}
-```
-
-### C
-```c
-int countLeaves(struct Node* root) {
- struct Node** queue = (struct Node**) malloc(1000 * sizeof(struct Node*));
- int front = 0, rear = 0;
- queue[rear++] = root;
- int count = 0;
- while (front < rear) {
- struct Node* temp = queue[front++];
- if (temp->left == NULL && temp->right == NULL)
- count++;
- if (temp->left)
- queue[rear++] = temp->left;
- if (temp->right)
- queue[rear++] = temp->right;
- }
- free(queue);
- return count;
-}
-```
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0038.md b/dsa-solutions/gfg-solutions/Basic/0038.md
deleted file mode 100644
index 260cc23d4..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0038.md
+++ /dev/null
@@ -1,110 +0,0 @@
----
-id: third-largest-element
-title: Third Largest Element
-sidebar_label: 0038 Third Largest Element
-tags:
-- Array
-- Sorting
-- C
-- Python
-- Java
-- C++
-description: "This document provides solutions for finding the third largest element in an array."
----
-
-
-## Problem
-
-Given an array of distinct elements. Find the third largest element in it.
-
-Suppose you have A[] = {1, 2, 3, 4, 5, 6, 7}, its output will be 5 because it is the 3 largest element in the array A.
-
-### Examples:
-**Example 1:**
-```
-Input:
-N = 5
-A[] = {2,4,1,3,5}
-Output: 3
-```
-
-**Example 2:**
-```
-Input:
-N = 2
-A[] = {10,2}
-Output: -1
-```
-
-### Your task:
-
-Complete the function **thirdLargest()** which takes the array a[] and the size of the array, n, as input parameters and returns the third largest element in the array. It return -1 if there are less than 3 elements in the given array.
-
-- **Expected Time Complexity:** $O(N)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1<=N<=10^5$
-- $1<=A[i]<=10^5$
-
-## Solution
-### Python
-```python
-def thirdLargest(self,a, n):
- if (n < 3):
- return -1
- else:
- a = sorted(a)
- return a[-3]
-```
-
-### Java
-```java
-int thirdLargest(int a[], int n) {
- if (n < 3) {
- return -1;
- }
- else {
- Arrays.sort(a);
- return a[n - 3];
- }
-}
-```
-
-### C++
-```cpp
-int thirdLargest(int a[], int n) {
- if (n < 3) {
- return -1;
- }
- else {
- std::sort(a, a + n);
- return a[n - 3];
- }
-}
-```
-
-### C
-```c
-int thirdLargest(int* a, int n) {
- if (n < 3) {
- return -1;
- }
- else {
- for (int i = 0; i < n - 1; i++) {
- for (int j = 0; j < n - i - 1; j++) {
- if (a[j] > a[j + 1]) {
- int temp = a[j];
- a[j] = a[j + 1];
- a[j + 1] = temp;
- }
- }
- }
- return a[n - 3];
- }
-}
-```
-
-- **Time Complexity:** $O(N)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0039.md b/dsa-solutions/gfg-solutions/Basic/0039.md
deleted file mode 100644
index d4d85f140..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0039.md
+++ /dev/null
@@ -1,125 +0,0 @@
----
-id: insert-middle-linked-list
-title: Insert in Middle of Linked List
-sidebar_label: 0039 Insert in Middle of Linked List
-tags:
-- Linked List
-- Insertion
-- C
-- Python
-- Java
-- C++
-description: "This document provides solutions for inserting a node in the middle of a linked list."
----
-
-## Problem
-
-Given a linked list of size **N** and a **key**. The task is to insert the key in the middle of the linked list.
-
-### Examples:
-**Example 1:**
-```
-Input:
-LinkedList = 1->2->4
-key = 3
-Output: 1 2 3 4
-Explanation: The new element is inserted after the current middle element in the linked list.
-```
-
-**Example 2:**
-```
-Input:
-LinkedList = 10->20->40->50
-key = 30
-Output: 10 20 30 40 50
-Explanation: The new element is inserted after the current middle element in the linked list and Hence, the output is 10 20 30 40 50.
-```
-
-### Your task:
-
-The task is to complete the function **insertInMiddle()** which takes head reference and element to be inserted as the arguments. The printing is done automatically by the driver code.
-
-- **Expected Time Complexity:** $O(N)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1<=N<=10^4$
-
-## Solution
-### Python
-```python
-def insertInMid(head, node):
- if head is None:
- return node
- slow = head
- fast = head
- while fast.next is not None and fast.next.next is not None:
- slow = slow.next
- fast = fast.next.next
- node.next = slow.next
- slow.next = node
- return head
-```
-
-### Java
-```java
-public Node insertInMid(Node head, int data){
- Node newNode = new Node(data);
- if (head == null) {
- return newNode;
- }
- Node slow = head;
- Node fast = head;
- while (fast.next != null && fast.next.next != null) {
- slow = slow.next;
- fast = fast.next.next;
- }
- newNode.next = slow.next;
- slow.next = newNode;
- return head;
-}
-```
-
-### C++
-```cpp
-Node* insertInMiddle(Node* head, int x) {
- Node* newNode = new Node(x);
- if (head == nullptr) {
- return newNode;
- }
- Node* slow = head;
- Node* fast = head;
- while (fast->next != nullptr && fast->next->next != nullptr) {
- slow = slow->next;
- fast = fast->next->next;
- }
- newNode->next = slow->next;
- slow->next = newNode;
- return head;
-}
-```
-
-### C
-```c
-struct Node* insertInMiddle(struct Node* head, int x) {
- struct Node* newNode = (struct Node*)malloc(sizeof(struct Node));
- newNode->data = x;
- newNode->next = NULL;
- if (head == NULL) {
- return newNode;
- }
- struct Node* slow = head;
- struct Node* fast = head;
- while (fast->next != NULL && fast->next->next != NULL) {
- slow = slow->next;
- fast = fast->next->next;
- }
- newNode->next = slow->next;
- slow->next = newNode;
- return head;
-}
-```
-
-- **Time Complexity:** $O(N)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0040.md b/dsa-solutions/gfg-solutions/Basic/0040.md
deleted file mode 100644
index 4450dedd1..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0040.md
+++ /dev/null
@@ -1,122 +0,0 @@
----
-id: maximum-occurring-character
-title: Maximum Occurring Character
-sidebar_label: Maximum Occurring Character
-tags:
-- Strings
-- C
-- Python
-- Java
-- C++
-description: "This document explores algorithms to find the maximum occurring character in a string."
----
-
-## Problem
-
-Given a string **str** of lowercase alphabets. The task is to find the maximum occurring character in the string **str**. If more than one character occurs the maximum number of time then print the lexicographically smaller character.
-
-### Examples:
-**Example 1:**
-```
-Input:
-str = testsample
-Output: e
-Explanation: e is the character which is having the highest frequency.
-```
-
-**Example 2:**
-```
-Input:
-str = output
-Output: t
-Explanation: t and u are the characters with the same frequency, but t is lexicographically smaller.
-```
-
-### Your task:
-
-The task is to complete the function **getMaxOccuringChar()** which returns the character which is most occurring.
-
-- **Expected Time Complexity:** $O(N)$
-- **Expected Auxiliary Space:** $O$(Number of distinct characters)
-
-**Note:** N = |s|
-
-### Constraints:
-
-- $1 ≤ |s| ≤ 100$
-
-## Solution
-### Python
-```python
-def getMaxOccurringChar(self,s):
- mp = {}
- n = len(s)
- ans = ''
- cnt = 0
-
- for i in range(n):
- if s[i] in mp:
- mp[s[i]] += 1
- else:
- mp[s[i]] = 1
- if mp[s[i]] > cnt or (mp[s[i]] == cnt and s[i] < ans):
- ans = s[i]
- cnt = mp[s[i]]
- return ans
-```
-
-### Java
-```java
-public static char getMaxOccuringChar(String line) {
- Map mp = new HashMap<>();
- int n = line.length();
- char ans = '\0';
- int cnt = 0;
- for (int i = 0; i < n; i++) {
- char ch = line.charAt(i);
- mp.put(ch, mp.getOrDefault(ch, 0) + 1);
- if (mp.get(ch) > cnt || (mp.get(ch) == cnt && ch < ans)) {
- ans = ch;
- cnt = mp.get(ch);
- }
- }
- return ans;
-}
-```
-
-### C++
-```cpp
-char getMaxOccuringChar(string str) {
- unordered_map mp;
- char ans = '\0';
- int cnt = 0;
- for (char ch : str) {
- mp[ch]++;
- if (mp[ch] > cnt || (mp[ch] == cnt && ch < ans)) {
- ans = ch;
- cnt = mp[ch];
- }
- }
- return ans;
-}
-```
-
-### C
-```c
-char getMaxOccuringChar(const char* str) {
- int freq[256] = {0};
- char ans = '\0';
- int cnt = 0;
- for (int i = 0; str[i] != '\0'; i++) {
- freq[(int)str[i]]++;
- if (freq[(int)str[i]] > cnt || (freq[(int)str[i]] == cnt && str[i] < ans)) {
- ans = str[i];
- cnt = freq[(int)str[i]];
- }
- }
- return ans;
-}
-```
-
-- **Time Complexity:** $O(N)$
-- **Auxiliary Space:** $O$(Number of distinct characters)
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0041.md b/dsa-solutions/gfg-solutions/Basic/0041.md
deleted file mode 100644
index 8793dfbd2..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0041.md
+++ /dev/null
@@ -1,103 +0,0 @@
----
-id: count-odd-even
-title: Count Odd Even
-sidebar_label: 0041 Count Odd Even
-tags:
-- Arrays
-- C
-- Python
-- Java
-- C++
-description: "This document covers methods to count the number of odd and even integers in an array."
----
-
-## Problem
-
-Given an array **A[]** of **N** elements. The task is to return the count of the number of **odd** and **even** elements in the array.
-
-### Examples:
-**Example 1:**
-```
-Input:
-N = 5
-A[] = 1 2 3 4 5
-Output:
-3 2
-Explanation:
-There are 3 odd elements (1, 3, 5) and 2 even elements (2 and 4).
-```
-
-### Your task:
-
-Your task is to complete the function **countOddEven()** which should return the count of odd and even elements of the array.
-
-- **Expected Time Complexity:** $O(N)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1<=N<=10^6$
-- $1<=A_j<=10^6$
-
-## Solution
-### Python
-```python
-def countOddEven(self, arr, n):
- odd, even = 0,0
- for i in range(0, n):
- if arr[i]%2==0:
- even+=1
- else:
- odd+=1
- return odd, even
-```
-
-### Java
-```java
-public int[] countOddEven(int[] arr, int n) {
- int odd = 0, even = 0;
- for (int i = 0; i < n; i++) {
- if (arr[i] % 2 == 0) {
- even++;
- } else {
- odd++;
- }
- }
- int[] result = { odd, even };
- return result;
-}
-```
-
-### C++
-```cpp
-vector countOddEven(int arr[], int sizeof_array) {
- int odd = 0, even = 0;
- for (int i = 0; i < sizeof_array; i++) {
- if (arr[i] % 2 == 0) {
- even++;
- } else {
- odd++;
- }
- }
- vector result = { odd, even };
- return result;
-}
-```
-
-### C
-```c
-void countOddEven(int arr[], int sizeof_array, int *odd, int *even) {
- *odd = 0;
- *even = 0;
- for (int i = 0; i < sizeof_array; i++) {
- if (arr[i] % 2 == 0) {
- (*even)++;
- } else {
- (*odd)++;
- }
- }
-}
-```
-
-- **Time Complexity:** $O(N)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0042.md b/dsa-solutions/gfg-solutions/Basic/0042.md
deleted file mode 100644
index 3e54b74cb..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0042.md
+++ /dev/null
@@ -1,167 +0,0 @@
----
-id: implement-queue-linked-list
-title: Implement Queue using Linked List
-sidebar_label: 0042 Implement Queue with Linked List
-tags:
-- Queue
-- Linked List
-- Data Structures
-- Implementation
-- C
-- Python
-- Java
-- C++
-description: "This document covers the implementation of a Queue data structure using a Linked List in various programming languages."
----
-
-## Problem
-
-Implement a Queue using Linked List.
-A Query Q is of 2 Types
-- 1 x (a query of this type means pushing 'x' into the queue)
-- 2 (a query of this type means to pop an element from the queue and print the poped element)
-
-### Examples:
-**Example 1:**
-```
-Input:
-Q = 5
-Queries = 1 2 1 3 2 1 4 2
-Output: 2 3
-Explanation: n the first testcase
-1 2 the queue will be {2}
-1 3 the queue will be {2 3}
-2 poped element will be 2 the
- queue will be {3}
-1 4 the queue will be {3 4}
-2 poped element will be 3.
-```
-
-**Example 2:**
-```
-Input:
-Q = 4
-Queries = 1 2 2 2 1 3
-Output: 2 -1
-Explanation: In the second testcase
-1 2 the queue will be {2}
-2 poped element will be {2} then
- the queue will be empty.
-2 the queue is empty and hence -1
-1 3 the queue will be {3}.
-```
-
-### Your task:
-
-Complete the function **push()** which takes an integer as input parameter and **pop()** which will remove and return an element(-1 if queue is empty).
-
-- **Expected Time Complexity:** $O(1)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1<=N<=10^5$
-- $0<=a[i]<=10^5$
-
-## Solution
-### Python
-```python
-def __init__(self):
- self.stack1 = []
- self.stack2 = []
-
-def push(self, item):
- self.stack1.append(item)
-
-def pop(self):
- if not self.stack2:
- while self.stack1:
- self.stack2.append(self.stack1.pop())
- if self.stack2:
- return self.stack2.pop()
- else:
- return -1
-```
-
-### Java
-```java
-public MyQueue() {
- this.front = null;
- this.rear = null;
-}
-
-void push(int a) {
- QueueNode newNode = new QueueNode(a);
- if (this.rear == null) {
- this.front = newNode;
- this.rear = newNode;
- }
- else {
- this.rear.next = newNode;
- this.rear = newNode;
- }
-}
-
-int pop() {
- if (this.front == null)
- return -1;
- int poppedValue = this.front.data;
- this.front = this.front.next;
- if (this.front == null)
- this.rear = null;
- return poppedValue;
-}
-```
-
-### C++
-```cpp
-void MyQueue:: push(int x) {
- QueueNode* newNode = new QueueNode(x);
- if (rear == nullptr) {
- front = newNode;
- rear = newNode;
- }
- else {
- rear->next = newNode;
- rear = newNode;
- }
-}
-
-int MyQueue :: pop() {
- if (front == nullptr)
- return -1;
- int poppedValue = front->data;
- QueueNode* temp = front;
- front = front->next;
- delete temp;
- if (front == nullptr)
- rear = nullptr;
- return poppedValue;
-}
-```
-
-### C
-```c
-void push(struct Queue* q, int k) {
- struct Node* newnode = newNode(k);
- if (q->rear == NULL) {
- q->front = q->rear = newnode;
- return;
- }
- q->rear->next = newnode;
- q->rear = newnode;
-}
-
-void pop(struct Queue* q) {
- if (q->front == NULL)
- return -1;
- struct Node* temp = q->front;
- q->front = q->front->next;
- if (q->front == NULL)
- q->rear = NULL;
- free(temp);
-}
-```
-
-- **Time Complexity:** $O(1)$
-- **Auxiliary Space:** $O(1)$
diff --git a/dsa-solutions/gfg-solutions/Basic/0043.md b/dsa-solutions/gfg-solutions/Basic/0043.md
deleted file mode 100644
index 2fd65e94c..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0043.md
+++ /dev/null
@@ -1,87 +0,0 @@
----
-id: max-min
-title: Max Min
-sidebar_label: 0043 Max Min
-tags:
-- Arrays
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to find the maximum and minimum elements in an array using various programming languages."
----
-
-## Problem
-
-Given an array **A** of size **N** of integers. Your task is to find the sum of minimum and maximum element in the array.
-
-### Examples:
-**Example 1:**
-```
-Input:
-N = 5
-A[] = {-2, 1, -4, 5, 3}
-Output: 1
-Explanation: min = -4, max = 5. Sum = -4 + 5 = 1
-```
-
-**Example 2:**
-```
-Input:
-N = 4
-A[] = {1, 3, 4, 1}
-Output: 5
-Explanation: min = 1, max = 4. Sum = 1 + 4 = 5
-```
-
-### Your task:
-
-You don't need to read input or print anything. Your task is to complete the function **findSum()** which takes the array **A[]** and its size **N** as inputs and returns the summation of minimum and maximum element of the array.
-
-- **Expected Time Complexity:** $O(N)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1<=N<=10^5$
-- $-10^9 <= A_i <= 10^9$
-
-## Solution
-### Python
-```python
-def findSum(self,A,N):
- A.sort()
- minmax = A[0]+A[-1]
- return minmax
-```
-
-### Java
-```java
-public static int findSum(int A[],int N) {
- Arrays.sort(A);
- int minmax = A[0] + A[N - 1];
- return minmax;
-}
-```
-
-### C++
-```cpp
-int findSum(int A[], int N) {
- sort(A, A + N);
- int minmax = A[0] + A[N - 1];
- return minmax;
-}
-```
-
-### C
-```c
-void rotate(int arr[], int n) {
- int last_el = arr[n - 1];
- for (int i = n - 1; i > 0; i--)
- arr[i] = arr[i - 1];
- arr[0] = last_el;
-}
-```
-
-- **Time Complexity:** $O(N)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0044.md b/dsa-solutions/gfg-solutions/Basic/0044.md
deleted file mode 100644
index d7c83a3d7..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0044.md
+++ /dev/null
@@ -1,102 +0,0 @@
----
-id: bit-difference
-title: Bit Difference
-sidebar_label: 0044 Bit Difference
-tags:
-- Bit Manipulation
-- C
-- Python
-- Java
-- C++
-description: "This document explains how to convert A to B using bit manipulation."
----
-
-## Problem
-
-You are given two numbers **A** and **B**. The task is to count the number of bits needed to be flipped to convert A to B.
-
-### Examples:
-**Example 1:**
-```
-Input: A = 10, B = 20
-Output: 4
-Explanation:
-A = 01010
-B = 10100
-As we can see, the bits of A that need to be flipped are 01010. If we flip these bits, we get 10100, which is B.
-```
-
-**Example 2:**
-```
-Input: A = 20, B = 25
-Output: 3
-Explanation:
-A = 10100
-B = 11001
-As we can see, the bits of A that need to be flipped are 10100. If we flip these bits, we get 11001, which is B.
-```
-
-### Your task:
-
-The task is to complete the function **countBitsFlip()** that takes **A** and **B** as parameters and returns the count of the number of bits to be flipped to convert A to B.
-
-- **Expected Time Complexity:** $O(log N)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1<=A,B<=10^6$
-
-## Solution
-### Python
-```python
-def countBitsFlip(self,a,b):
- xor_result = a ^ b
- count = 0
- while xor_result != 0:
- xor_result = xor_result & (xor_result - 1)
- count += 1
- return count
-```
-
-### Java
-```java
-public static int countBitsFlip(int a, int b){
- int xorResult = a ^ b;
- int count = 0;
- while (xorResult != 0) {
- xorResult = xorResult & (xorResult - 1);
- count++;
- }
- return count;
-}
-```
-
-### C++
-```cpp
-int countBitsFlip(int a, int b){
- int xorResult = a ^ b;
- int count = 0;
- while (xorResult != 0) {
- xorResult = xorResult & (xorResult - 1);
- count++;
- }
- return count;
-}
-```
-
-### C
-```c
-int countBitsFlip(int a, int b) {
- int xorResult = a ^ b;
- int count = 0;
- while (xorResult != 0) {
- xorResult = xorResult & (xorResult - 1);
- count++;
- }
- return count;
-}
-```
-
-- **Time Complexity:** $O(log N)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0045.md b/dsa-solutions/gfg-solutions/Basic/0045.md
deleted file mode 100644
index d61a1bcc1..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0045.md
+++ /dev/null
@@ -1,158 +0,0 @@
----
-id: find-smallest-second-smallest-element-in-array
-title: Find the Smallest and Second Smallest Element in an Array
-sidebar_label: 0045 Find the Smallest and Second Smallest Element in an Array
-tags:
-- Arrays
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to find the smallest and second smallest elements in an array using various programming languages."
----
-
-## Problem
-
-Given an array of integers, your task is to find the smallest and second smallest element in the array. If smallest and second smallest do not exist, print **-1**.
-
-### Examples:
-**Example 1:**
-```
-Input :
-5
-2 4 3 5 6
-Output :
-2 3
-Explanation:
-2 and 3 are respectively the smallest and second smallest elements in the array.
-```
-
-**Example 2:**
-```
-Input :
-6
-1 2 1 3 6 7
-Output :
-1 2
-Explanation:
-1 and 2 are respectively the smallest and second smallest elements in the array.
-```
-
-### Your task:
-
-You don't need to read input or print anything. Your task is to complete the function **minAnd2ndMin()** which takes the array **A[]** and its size **N** as inputs and returns a vector containing the smallest and second smallest element if possible, else return **{-1,-1}**.
-
-- **Expected Time Complexity:** $O(N)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1<=N<=10^5$
-- $1<=A[i]<=10^5$
-
-## Solution
-### Python
-```python
-def minAnd2ndMin(a, n):
- if n < 2:
- return [-1, -1]
-
- first_min = float('inf')
- second_min = float('inf')
-
- for num in a:
- if num < first_min:
- second_min = first_min
- first_min = num
- elif num < second_min and num != first_min:
- second_min = num
-
- if second_min == float('inf'):
- return [-1, -1]
- else:
- return [first_min, second_min]
-```
-
-### Java
-```java
-public long[] minAnd2ndMin(long a[], long n) {
- if (n < 2) {
- return new long[]{-1, -1};
- }
- long first_min = Long.MAX_VALUE;
- long second_min = Long.MAX_VALUE;
- for (long num : a) {
- if (num < first_min) {
- second_min = first_min;
- first_min = num;
- }
- else if (num < second_min && num != first_min) {
- second_min = num;
- }
- }
- if (second_min == Long.MAX_VALUE) {
- return new long[]{-1, -1};
- }
- else {
- return new long[]{first_min, second_min};
- }
-}
-```
-
-### C++
-```cpp
-vector minAnd2ndMin(int a[], int n) {
- if (n < 2) {
- return {-1, -1};
- }
- int first_min = INT_MAX;
- int second_min = INT_MAX;
- for (int i = 0; i < n; ++i) {
- if (a[i] < first_min) {
- second_min = first_min;
- first_min = a[i];
- } else if (a[i] < second_min && a[i] != first_min) {
- second_min = a[i];
- }
- }
- if (second_min == INT_MAX) {
- return {-1, -1};
- }
- else {
- return {first_min, second_min};
- }
-}
-```
-
-### C
-```c
-void minAnd2ndMin(int a[], int n, int result[2]) {
- if (n < 2) {
- result[0] = -1;
- result[1] = -1;
- return;
- }
- int first_min = INT_MAX;
- int second_min = INT_MAX;
- for (int i = 0; i < n; ++i) {
- if (a[i] < first_min) {
- second_min = first_min;
- first_min = a[i];
- }
- else if (a[i] < second_min && a[i] != first_min) {
- second_min = a[i];
- }
- }
- if (second_min == INT_MAX) {
- result[0] = -1;
- result[1] = -1;
- }
- else {
- result[0] = first_min;
- result[1] = second_min;
- }
-}
-```
-
-- **Time Complexity:** $O(N)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0046.md b/dsa-solutions/gfg-solutions/Basic/0046.md
deleted file mode 100644
index 5b4d98525..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0046.md
+++ /dev/null
@@ -1,42 +0,0 @@
----
-id: cpp-hello-world
-title: C++ Hello World
-sidebar_label: 0046 C++ Hello World
-tags:
-- C++
-- Programming
-- Basics
-- Hello World
-description: "This document demonstrates how to write a 'Hello, World!' program in C++."
----
-
-## Problem
-
-Let's begin your journey towards coding with the very first question of the coding world. Your task is to write code that prints **Hello World**.
-
-### Examples:
-**Example 1:**
-```
-Input:
-No Input
-Output:
-Hello World
-```
-
-### Your task:
-
-In the function **helloWorld()**, output a line "Hello World" (without quotes).
-
-- **Expected Time Complexity:** $O(1)$
-- **Expected Auxiliary Space:** $O(1)$
-
-## Solution
-### C++
-```cpp
-void helloWorld() {
- cout<<"Hello World"< int:
- total_sum = n * (n + 1) // 2
- array_sum = sum(arr)
- return total_sum - array_sum
-```
-
-### Java
-```java
-public static int missingNumber(int n, int[] arr) {
- int total_sum = n * (n + 1) / 2;
- int array_sum = 0;
- for(int i = 0; i &arr) {
- int total_sum = n * (n + 1) / 2;
- int array_sum = 0;
- for (int i = 0; i < arr.size(); i++) {
- array_sum += arr[i];
- }
- int result = total_sum - array_sum;
- return result;
-}
-```
-
-### C
-```c
-int missingNumber(int n, int arr[], int size) {
- int total_sum = n * (n + 1) / 2;
- int array_sum = 0;
- for (int i = 0; i < size; i++) {
- array_sum += arr[i];
- }
- int result = total_sum - array_sum;
- return result;
-}
-```
-
-- **Time Complexity:** $O(n)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0049.md b/dsa-solutions/gfg-solutions/Basic/0049.md
deleted file mode 100644
index ac307aaf3..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0049.md
+++ /dev/null
@@ -1,115 +0,0 @@
----
-id: closest-number
-title: Closest Number
-sidebar_label: 0049 Closest Number
-tags:
-- Array
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to find the closest number to a given target in an array in various programming languages."
----
-
-## Problem
-
-Given two integers **N** and **M**. The problem is to find the number closest to N and divisible by M. If there are more than one such number, then output the one having **maximum absolute value**.
-
-### Examples:
-**Example 1:**
-```
-Input:
-N = 13 , M = 4
-Output:
-12
-Explanation:
-12 is the Closest Number to 13 which is divisible by 4.
-```
-
-**Example 2:**
-```
-Input:
-N = -15 , M = 6
-Output:
--18
-Explanation:
--12 and -18 are both similarly close to -15 and divisible by 6. but -18 has the maximum absolute value. So, Output is -18
-```
-
-### Your task:
-
-You don't need to read input or print anything. Your task is to complete the function **closestNumber()** which takes an Integer n as input and returns the answer.
-
-- **Expected Time Complexity:** $O(1)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $-10^5 <= N <= 10^5$
-
-## Solution
-### Python
-```python
-def closestNumber(self, N , M):
- if M == 0:
- return None
- quotient = N // M
- lower_multiple = M * quotient
- upper_multiple = M * (quotient + 1)
- if abs(N - lower_multiple) < abs(N - upper_multiple):
- return lower_multiple
- elif abs(N - upper_multiple) < abs(N - lower_multiple):
- return upper_multiple
- else:
- return max(lower_multiple, upper_multiple, key=abs)
-```
-
-### Java
-```java
-static int closestNumber(int N , int M) {
- int i=0;
- while(true){
- if((N-i)%M==0)
- return N-i;
- else if((N+i)%M==0)
- return N+i;
- else
- i++;
- }
-}
-```
-
-### C++
-```cpp
-int closestNumber(int N, int M) {
- int r = N % M;
- if (r == 0) {
- return N;
- }
- else if (r <= M / 2) {
- return N - r;
- }
- else {
- return N + (M - r);
- }
-}
-```
-
-### C
-```c
-int closestNumber(int N, int M) {
- int r = N % M;
- if (r == 0) {
- return N;
- }
- else if (r <= M / 2) {
- return N - r;
- }
- else {
- return N + (M - r);
- }
-}
-```
-
-- **Time Complexity:** $O(1)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0050.md b/dsa-solutions/gfg-solutions/Basic/0050.md
deleted file mode 100644
index 6c2116ef3..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0050.md
+++ /dev/null
@@ -1,97 +0,0 @@
----
-id: node-at-given-index-linked-list
-title: Node at Given Index in Linked List
-sidebar_label: 0047 Node at Given Index in Linked List
-tags:
-- Linked List
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to find the node at a given index in a linked list in various programming languages."
----
-
-## Problem
-
-Given a singly linked list with N nodes and a number X. The task is to find the node at the given index (X)(1 based index) of linked list.
-
-### Input:
-
-First line of input contains number of testcases T. For each testcase, first line of input contains space seperated two integers, length of linked list and X.
-
-### Output:
-
-For each testcase, there will be single line of output containing data at Xth node.
-
-### Examples:
-
-**Input:**
-```
-2
-6 5
-1 2 3 4 657 76
-10 2
-8 7 10 8 6 1 20 91 21 2
-```
-
-**Output:**
-```
-657
-7
-```
-
-**Explanation:**
-Testcase 1: Element at 5th index in the linked list is 657 (1-based indexing).
-
-### Your task:
-
-The task is to complete the function **GetNth()** which takes head reference and index as arguments and should return the data at Xth position in the linked list.
-
-### Constraints:
-
-- $1 <= T <= 30$
-- $1 <= N <= 100$
-- $X <= N$
-- $1 <= value <= 10^3$
-
-## Solution
-### Python
-```python
-def getNth(head, k):
- temp = head
- for _ in range(0,k-1):
- temp = temp.next
- return temp.data
-```
-
-### Java
-```java
-public static int getNth(Node node, int ind) {
- Node temp = node;
- for(int i=0; inext;
- }
- return current->data;
-}
-```
-
-### C
-```c
-int GetNth(struct node* head, int index) {
- struct node* current = head;
- for (int i = 0; i < index; i++) {
- current = current->next;
- }
- return current->data;
-}
-```
diff --git a/dsa-solutions/gfg-solutions/Basic/0051.md b/dsa-solutions/gfg-solutions/Basic/0051.md
deleted file mode 100644
index 8d2e74eae..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0051.md
+++ /dev/null
@@ -1,171 +0,0 @@
----
-id: uncommon-characters
-title: Uncommon Characters
-sidebar_label: 0051 Uncommon Characters
-tags:
-- Strings
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to find uncommon characters between two strings in various programming languages."
----
-
-## Problem
-
-Given two strings A and B consisting of lowercase english characters. Find the characters that are not common in the two strings.
-
-**Note:** Return the string in sorted order.
-
-### Examples:
-**Example 1:**
-```
-Input:
-A = geeksforgeeks
-B = geeksquiz
-Output: fioqruz
-Explanation:
-The characters 'f', 'i', 'o', 'q', 'r', 'u','z' are either present in A or B, but not in both.
-```
-
-**Example 2:**
-```
-Input:
-A = characters
-B = alphabets
-Output: bclpr
-Explanation: The characters 'b','c','l','p','r' are either present in A or B, but not in both.
-```
-
-### Your task:
-
-You dont need to read input or print anything. Complete the function **UncommonChars()** which takes strings A and B as input parameters and returns a string that contains all the uncommon characters in sorted order. If no such character exists return "-1".
-
-- **Expected Time Complexity:** $O(M+N)$, where M and N are the sizes of A and B respectively.
-- **Expected Auxiliary Space:** $O(M+N)$
-
-### Constraints:
-
-- $1<=M,N<=10^4$
-
-String may contain duplicate characters.
-
-## Solution
-### Python
-```python
-def UncommonChars(self, A, B):
- count_A = Counter(A)
- count_B = Counter(B)
- uncommon_chars = [
- for char in count_A:
- if char not in count_B:
- uncommon_chars.append(char)
- for char in count_B:
- if char not in count_A:
- uncommon_chars.append(char)
- uncommon_chars.sort()
- if not uncommon_chars:
- return "-1"
- else:
- return ''.join(uncommon_chars)
-```
-
-### Java
-```java
-String UncommonChars(String A, String B) {
- Set setA = new HashSet<>();
- Set setB = new HashSet<>();
- for (char ch : A.toCharArray()) {
- setA.add(ch);
- }
- for (char ch : B.toCharArray()) {
- setB.add(ch);
- Set uniqueChars = new HashSet<>();
- for (char ch : setA) {
- if (!setB.contains(ch)) {
- uniqueChars.add(ch);
- }
- }
- for (char ch : setB) {
- if (!setA.contains(ch)) {
- uniqueChars.add(ch);
- }
- }
- List sortedList = new ArrayList<>(uniqueChars);
- Collections.sort(sortedList);
- StringBuilder builder = new StringBuilder();
- for (char ch : sortedList) {
- builder.append(ch);
- }
- String result = builder.toString();
- if (result.isEmpty()) {
- return "-1";
- }
- return result;
-}
-```
-
-### C++
-```cpp
-string UncommonChars(string A, string B) {
- unordered_set setA;
- unordered_set setB;
- for (char ch : A) {
- setA.insert(ch);
- for (char ch : B) {
- setB.insert(ch);
- }
- unordered_set uniqueChars;
- for (char ch : setA) {
- if (setB.find(ch) == setB.end()) {
- uniqueChars.insert(ch);
- }
- }
- for (char ch : setB) {
- if (setA.find(ch) == setA.end()) {
- uniqueChars.insert(ch);
- }
- }
- vector sortedList(uniqueChars.begin(), uniqueChars.end());
- sort(sortedList.begin(), sortedList.end());
- string result(sortedList.begin(), sortedList.end());
- if (result.empty()) {
- return "-1";
- }
- return result;
-}
-```
-
-### C
-```c
-char* UncommonChars(const char* A, const char* B) {
- int map[26] = {0};
- for (int i = 0; A[i] != '\0'; ++i) {
- map[A[i] - 'a'] = 1;
- }
- for (int i = 0; B[i] != '\0'; ++i) {
- if (map[B[i] - 'a'] == 1 || map[B[i] - 'a'] == -1) {
- map[B[i] - 'a'] = -1;
- } else {
- map[B[i] - 'a'] = 2;
- }
- }
- char* result = (char*)malloc(27 * sizeof(char));
- int index = 0;
- for (int i = 0; i < 26; ++i) {
- if (map[i] > 0) {
- result[index++] = 'a' + i;
- }
- }
- result[index] = '\0';
- if (index == 0) {
- free(result);
- result = (char*)malloc(3 * sizeof(char));
- strcpy(result, "-1");
- }
- return result;
-}
-```
-
-- **Time Complexity:** $O(M+N)$
-- **Auxiliary Space:** $O(M+N)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0052.md b/dsa-solutions/gfg-solutions/Basic/0052.md
deleted file mode 100644
index ca3152a15..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0052.md
+++ /dev/null
@@ -1,117 +0,0 @@
----
-id: search-node-bst
-title: Search a Node in BST
-sidebar_label: 0052 Search a Node in BST
-tags:
-- Binary Search Tree
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to search for a node in a Binary Search Tree (BST) in various programming languages."
----
-
-## Problem
-
-Given a **Binary Search Tree** and a node value X, find if the node with value X is present in the BST or not.
-
-### Examples:
-**Example 1:**
-```
-Input:
- 2
- \
- 81
- / \
- 42 87
- \ \
- 66 90
- /
- 45
-X = 87
-Output: 1
-Explanation: As 87 is present in the given nodes , so the output will be 1.
-```
-
-**Example 2:**
-```
-Input:
- 6
- \
- 8
- / \
- 7 9
-X = 11
-Output: 0
-Explanation: As 11 is not present in the given nodes , so the output will be 0.
-```
-
-### Your task:
-
-You don't need to read input or print anything. Complete the function **search()** which returns true if the node with value x is present in the BSTelse returns false.
-
-- **Expected Time Complexity:** $O$(Height of the BST)
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1<=$Number of Nodes$<=10^5$
-
-## Solution
-### Python
-```python
-def search(self, node, x):
- if node is None:
- return False
- if x == node.data:
- return True
- elif x < node.data:
- return self.search(node.left, x)
- else:
- return self.search(node.right, x)
-```
-
-### Java
-```java
-boolean search(Node root, int x) {
- if (root == null)
- return false;
- if (x == root.data)
- return true;
- else if (x < root.data)
- return search(root.left, x);
- else
- return search(root.right, x);
-}
-```
-
-### C++
-```cpp
-bool search(Node* root, int x) {
- if (root == nullptr)
- return false;
- if (x == root->data)
- return true;
- else if (x < root->data)
- return search(root->left, x);
- else
- return search(root->right, x);
-}
-```
-
-### C
-```c
-bool search(struct Node* root, int x) {
- if (root == NULL)
- return false;
- if (x == root->data)
- return true;
- else if (x < root->data)
- return search(root->left, x);
- else
- return search(root->right, x);
-}
-```
-
-- **Time Complexity:** $O$(Height of the BST)
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0053.md b/dsa-solutions/gfg-solutions/Basic/0053.md
deleted file mode 100644
index 19cc7c9fb..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0053.md
+++ /dev/null
@@ -1,87 +0,0 @@
----
-id: product-of-array-elements
-title: Product of Array Elements
-sidebar_label: 0053 Product of Array Elements
-tags:
-- Array
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to calculate the product of all elements in an array in various programming languages."
----
-
-## Problem
-
-This is a functional problem. Your task is to return the product of array elements under a given modulo.
-
-The **modulo operation** finds the remainder after the division of one number by another. For example, K(mod(m))=K%m= remainder obtained when K is divided by m
-
-### Examples:
-**Example 1:**
-```
-Input:
-1
-4
-1 2 3 4
-
-Output:
-24
-```
-
-### Input:
-
-The first line of input contains T denoting the number of test cases. Then each of the T lines contains a single positive integer N denotes the number of elements in the array. The next line contains 'N' integer elements of the array.
-
-### Output:
-Return the product of array elements under a given modulo.
-That is, return (Array[0]*Array[1]*Array[2]...*Array[n])%modulo.
-
-### Constraints:
-
-- $1<=T<=200$
-- $1<=N<=10^5$
-- $1<=ar[i]<=10^5$
-
-## Solution
-### Python
-```python
-def product(arr,n,mod):
- product_result = 1
- for n in arr:
- product_result = (product_result * n) % mod
- return product_result
-```
-
-### Java
-```java
-public static Long product(Long arr[], Long mod, int n) {
- long productResult = 1;
- for (int i = 0; i < n; i++) {
- productResult = (productResult * arr[i]) % mod;
- }
- return productResult;
-}
-```
-
-### C++
-```cpp
-long long int product(int ar[], int n, long long int mod) {
- long long int productResult = 1;
- for (int i = 0; i < n; i++) {
- productResult = (productResult * ar[i]) % mod;
- }
- return productResult;
-}
-```
-
-### C
-```c
-long long int product(int ar[], int n, long long int mod) {
- long long int productResult = 1;
- for (int i = 0; i < n; i++) {
- productResult = (productResult * ar[i]) % mod;
- }
- return productResult;
-}
-```
diff --git a/dsa-solutions/gfg-solutions/Basic/0054.md b/dsa-solutions/gfg-solutions/Basic/0054.md
deleted file mode 100644
index d61b75891..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0054.md
+++ /dev/null
@@ -1,125 +0,0 @@
----
-id: remove-consecutive-characters
-title: Remove Consecutive Characters
-sidebar_label: 0054 Remove Consecutive Characters
-tags:
-- Strings
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to remove consecutive duplicate characters from a string in various programming languages."
----
-
-## Problem
-
-Given a string S. For each index `i(1<=i<=N-1)`, erase it if s[i] is equal to s[i-1] in the string.
-
-### Examples:
-**Example 1:**
-```
-Input:
-S = aabb
-Output: ab
-Explanation: 'a' at 2nd position is appearing 2nd time consecutively. Similiar explanation for b at 4th position.
-```
-
-**Example 2:**
-```
-Input:
-S = aabaa
-Output: aba
-Explanation: 'a' at 2nd position is appearing 2nd time consecutively. 'a' at fifth position is appearing 2nd time consecutively.
-```
-
-### Your task:
-
-You dont need to read input or print anything. Complete the function **removeConsecutiveCharacter()** which accepts a string as input parameter and returns modified string.
-
-- **Expected Time Complexity:** $O(|S|)$
-- **Expected Auxiliary Space:** $O(|S|)$
-
-### Constraints:
-
-- $1<=|S|<=10^5$
-
-All characters are lowercase alphabets.
-
-## Solution
-### Python
-```python
-def removeConsecutiveCharacter(self, S):
- if len(S) == 0:
- return ""
- result = []
- result.append(S[0])
- for i in range(1, len(S)):
- if S[i] != S[i - 1]:
- result.append(S[i])
- return ''.join(result)
-```
-
-### Java
-```java
-public String removeConsecutiveCharacter(String S){
- if (S == null || S.length() == 0) {
- return "";
- }
- StringBuilder result = new StringBuilder();
- result.append(S.charAt(0));
- for (int i = 1; i < S.length(); i++) {
- char currentChar = S.charAt(i);
- char previousChar = result.charAt(result.length() - 1);
- if (currentChar != previousChar) {
- result.append(currentChar);
- }
- }
- return result.toString();
-}
-```
-
-### C++
-```cpp
-string removeConsecutiveCharacter(string S) {
- if (S.empty()) {
- return "";
- }
- string result;
- result.push_back(S[0]);
- for (int i = 1; i < S.length(); i++) {
- if (S[i] != result.back()) {
- result.push_back(S[i]);
- }
- }
- return result;
-}
-```
-
-### C
-```c
-char* removeConsecutiveCharacter(const char* S) {
- if (S == NULL || strlen(S) == 0) {
- char* result = (char*) malloc(sizeof(char));
- result[0] = '\0';
- return result;
- }
- int len = strlen(S);
- char* result = (char*) malloc((len + 1) * sizeof(char));
- if (result == NULL) {
- return NULL;
- }
- int resultIndex = 0;
- result[resultIndex++] = S[0];
- for (int i = 1; i < len; i++) {
- if (S[i] != result[resultIndex - 1]) {
- result[resultIndex++] = S[i];
- }
- }
- result[resultIndex] = '\0';
- return result;
-}
-
-```
-
-- **Time Complexity:** $O(|S|)$
-- **Auxiliary Space:** $O(|S|)$
diff --git a/dsa-solutions/gfg-solutions/Basic/0055.md b/dsa-solutions/gfg-solutions/Basic/0055.md
deleted file mode 100644
index 2a17815fb..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0055.md
+++ /dev/null
@@ -1,167 +0,0 @@
----
-id: middle-of-three
-title: Middle of Three
-sidebar_label: 0055 Middle of Three
-tags:
-- Algorithm
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to find the middle of three given numbers in various programming languages."
----
-
-## Problem
-
-Given three distinct numbers A, B and C. Find the number with value in middle (Try to do it with minimum comparisons).
-
-### Examples:
-**Example 1:**
-```
-Input:
-A = 978, B = 518, C = 300
-Output:
-518
-Explanation:
-Since 518>300 and 518<978, so 518 is the middle element.
-```
-
-**Example 2:**
-```
-Input:
-A = 162, B = 934, C = 200
-Output:
-200
-Exaplanation:
-Since 200>162 && 200<934, So, 200 is the middle element.
-```
-
-### Your task:
-
-You don't need to read input or print anything.Your task is to complete the function ***middle()*** which takes three integers A,B and C as input parameters and returns the number which has middle value.
-
-- **Expected Time Complexity:** $O(1)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1<=A,B,C<=10^9$
-
-A,B,C are distinct.
-
-## Solution
-### Python
-```python
-def middle(self,A,B,C):
- if A > B:
- if A > C:
- if B > C:
- return B
- else:
- return C
- else:
- return A
- else:
- if B > C:
- if A > C:
- return A
- else:
- return C
- else:
- return B
-```
-
-### Java
-```java
-int middle(int A, int B, int C){
- if (A > B) {
- if (A > C) {
- if (B > C) {
- return B;
- } else {
- return C;
- }
- } else {
- return A;
- }
- }
- else {
- if (B > C) {
- if (A > C) {e
- return A;
- }
- else {
- return C;
- }
- }
- else {
- return B;
- }
- }
-}
-```
-
-### C++
-```cpp
-int middle(int A, int B, int C){
- if (A > B) {
- if (A > C) {
- if (B > C) {
- return B;
- } else {
- return C;
- }
- }
- else {
- return A;
- }
- }
- else {
- if (B > C) {
- if (A > C) {
- return A;
- }
- else {
- return C;
- }
- }
- else {
- return B;
- }
- }
-}
-```
-
-### C
-```c
-int middle(int A, int B, int C){
- if (A > B) {
- if (A > C) {
- if (B > C) {
- return B;
- } else {
- return C;
- }
- }
- else {
- return A;
- }
- }
- else {
- if (B > C) {
- if (A > C) {
- return A;
- }
- else {
- return C;
- }
- }
- else {
- return B;
- }
- }
-}
-```
-
-- **Time Complexity:** $O(1)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0056.md b/dsa-solutions/gfg-solutions/Basic/0056.md
deleted file mode 100644
index 585a868eb..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0056.md
+++ /dev/null
@@ -1,118 +0,0 @@
----
-id: replace-zeros-with-fives
-title: Replace All 0's with 5
-sidebar_label: 0056 Replace All 0's with 5
-tags:
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to replace all occurrences of 0 with 5 in a given number in various programming languages."
----
-
-## Problem
-
-You are given an integer N. You need to convert all zeroes of N to 5.
-
-### Examples:
-**Example 1:**
-```
-Input:
-N = 1004
-Output: 1554
-Explanation: There are two zeroes in 1004 on replacing all zeroes with "5", the new number will be "1554".
-```
-
-**Example 2:**
-```
-Input:
-N = 121
-Output: 121
-Explanation: Since there are no zeroes in "121", the number remains as "121".
-```
-
-### Your task:
-
-Your task is to complete the function **convertFive()** which takes an integer N as an argument and replaces all zeros in the number N with 5. Your function should return the converted number.
-
-- **Expected Time Complexity:** $O(K)$, where K is the number of digits in N
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1 <= n <= 10000$
-
-## Solution
-### Python
-```python
-def convertFive(n):
- n_str = str(n)
- modified_digits = []
- for char in n_str:
- if char == '0':
- modified_digits.append('5')
- else:
- modified_digits.append(char)
- modified_str = ''.join(modified_digits)
- modified_n = int(modified_str)
- return modified_n
-```
-
-### Java
-```java
-int convertfive(int num) {
- String numStr = String.valueOf(num);
- StringBuilder modifiedDigits = new StringBuilder();
- for (int i = 0; i < numStr.length(); i++) {
- char ch = numStr.charAt(i);
- if (ch == '0') {
- modifiedDigits.append('5');
- } else {
- modifiedDigits.append(ch);
- }
- }
- int modifiednum = Integer.parseInt(modifiedDigits.toString());
- return modifiednum;
-}
-```
-
-### C++
-```cpp
-int convertFive(int n) {
- string nStr = to_string(n);
- string modifiedStr = "";
- for (char ch : nStr) {
- if (ch == '0') {
- modifiedStr += '5';
- } else {
- modifiedStr += ch;
- }
- }
- int modifiedN = stoi(modifiedStr);
- return modifiedN;
-}
-```
-
-### C
-```c
-int convertFive(int num) {
- if (num == 0) {
- return 5;
- }
- int result = 0;
- int decimalPlace = 1;
- while (num > 0) {
- int digit = num % 10;
- if (digit == 0) {
- digit = 5;
- }
- result = digit * decimalPlace + result;
- decimalPlace *= 10;
- num /= 10;
- }
- return result;
-}
-```
-
-- **Time Complexity:** $O(K)$, where K is the number of digits in N
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0057.md b/dsa-solutions/gfg-solutions/Basic/0057.md
deleted file mode 100644
index 08f95ab95..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0057.md
+++ /dev/null
@@ -1,167 +0,0 @@
----
-id: doubly-linked-list-insertion
-title: Doubly Linked List Insertion at Given Position
-sidebar_label: 0057 Doubly Linked List Insertion at Given Position
-tags:
-- Linked List
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to insert a node at a given position in a doubly linked list in various programming languages."
----
-
-## Problem
-
-Given a doubly-linked list, a position p, and an integer x. The task is to add a new node with value x at the position just after pth node in the doubly linked list.
-
-### Examples:
-**Example 1:**
-```
-Input:
-LinkedList: 2<->4<->5
-p = 2, x = 6
-Output: 2 4 5 6
-Explanation: p = 2, and x = 6. So, 6 is inserted after p, i.e, at position 3 (0-based indexing).
-```
-
-**Example 2:**
-```
-Input:
-LinkedList: 1<->2<->3<->4
-p = 0, x = 44
-Output: 1 44 2 3 4
-Explanation: p = 0, and x = 44 . So, 44 is inserted after p, i.e, at position 1 (0-based indexing).
-```
-
-### Your task:
-
-The task is to complete the function **addNode()** which head reference, position and data to be inserted as the arguments, with no return type.
-
-- **Expected Time Complexity:** $O(N)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1<=N<=10^4$
-- $0 <= p < N$
-
-## Solution
-### Python
-```python
-def addNode(head, p, data):
- new_node = Node(data)
- if head is None:
- head = new_node
- else:
- temp = head
- count = 0
- while temp.next is not None and count < p:
- temp = temp.next
- count += 1
- if temp.next is None:
- temp.next = new_node
- new_node.prev = temp
- else:
- new_node.next = temp.next
- new_node.prev = temp
- temp.next = new_node
- if new_node.next is not None:
- new_node.next.prev = new_node
-```
-
-### Java
-```java
-void addNode(Node head_ref, int pos, int data) {
- Node new_node = new Node(data);
- if (head_ref == null) {
- head_ref = new_node;
- }
- else {
- Node temp = head_ref;
- int count = 0;
- while (temp.next != null && count < pos) {
- temp = temp.next;
- count++;
- }
- if (temp.next == null) {
- temp.next = new_node;
- new_node.prev = temp;
- }
- else {
- new_node.next = temp.next;
- new_node.prev = temp;
- temp.next = new_node;
- if (new_node.next != null) {
- new_node.next.prev = new_node;
- }
- }
- }
-}
-```
-
-### C++
-```cpp
-void addNode(Node *head, int pos, int data) {
- Node* new_node = new Node(data);
- if (head == nullptr) {
- head = new_node;
- }
- else {
- Node* temp = head;
- int count = 0;
- while (temp->next != nullptr && count < pos) {
- temp = temp->next;
- count++;
- }
- if (temp->next == nullptr) {
- temp->next = new_node;
- new_node->prev = temp;
- }
- else {
- new_node->next = temp->next;
- new_node->prev = temp;
- temp->next = new_node;
- if (new_node->next != nullptr) {
- new_node->next->prev = new_node;
- }
- }
- }
-}
-```
-
-### C
-```c
-void addNode(struct Node *head, int pos, int data) {
- struct Node* new_node = (struct Node*)malloc(sizeof(struct Node));
- new_node->data = data;
- new_node->prev = NULL;
- new_node->next = NULL;
- if (head == NULL) {
- head = new_node;
- }
- else {
- struct Node* temp = head;
- int count = 0;
- while (temp->next != NULL && count < pos) {
- temp = temp->next;
- count++;
- }
- if (temp->next == NULL) {
- temp->next = new_node;
- new_node->prev = temp;
- }
- else {
- new_node->next = temp->next;
- new_node->prev = temp;
- temp->next = new_node;
- if (new_node->next != NULL) {
- new_node->next->prev = new_node;
- }
- }
- }
-}
-```
-
-- **Time Complexity:** $O(N)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0058.md b/dsa-solutions/gfg-solutions/Basic/0058.md
deleted file mode 100644
index 57829c23f..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0058.md
+++ /dev/null
@@ -1,119 +0,0 @@
----
-id: repeated-character
-title: Repeated Character
-sidebar_label: 0058 Repeated Character
-tags:
-- Strings
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to find the first repeated character in a string in various programming languages."
----
-
-## Problem
-
-Given a string consisting of lowercase english alphabets. Find the repeated character present first in the string.
-
-**NOTE:** If there are no repeating characters return '#'.
-
-### Examples:
-**Example 1:**
-```
-Input:
-S = "geeksforgeeks"
-Output: g
-Explanation: g, e, k and s are the repeating characters. Out of these, g occurs first.
-```
-
-**Example 2:**
-```
-Input:
-S = "abcde"
-Output: -1
-Explanation: No repeating character present. (You need to return '#')
-```
-
-### Your task:
-
-You don't need to read input or print anything. Your task is to complete the function **firstRep()** which takes the string S as input and returns the the first repeating character in the string. In case there's no repeating character present, return '#'.
-
-- **Expected Time Complexity:** $O(|S|)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1<=|S|<=10^5$
-
-## Solution
-### Python
-```python
-def firstRep(self, s):
- char_count = {}
- for index, char in enumerate(s):
- if char in char_count:
- char_count[char]['count'] += 1
- else:
- char_count[char] = {'count': 1, 'index': index}
- first_repeated = '#'
- min_index = float('inf')
- for char in s:
- if char_count[char]['count'] > 1 and char_count[char]['index'] < min_index:
- first_repeated = char
- min_index = char_count[char]['index']
- return first_repeated
-```
-
-### Java
-```java
-char firstRep(String S) {
- char []str=S.toCharArray();
- for(int i=0;im;
- for(char c:s) {
- m[c]++;
- }
- for(char c:s) {
- if(m[c]>1) {
- return c;
- }
- }
- return '#';
-}
-```
-
-### C
-```c
-char firstRep(const char *s) {
- Entry hashmap[256] = {0};
- int len = strlen(s);
- for (int i = 0; i < len; i++) {
- hashmap[s[i]].key = s[i];
- hashmap[s[i]].count++;
- }
- for (int i = 0; i < len; i++) {
- if (hashmap[s[i]].count > 1) {
- return s[i];
- }
- }
- return '#'; /
-}
-```
-
-- **Time Complexity:** $O(|S|)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0059.md b/dsa-solutions/gfg-solutions/Basic/0059.md
deleted file mode 100644
index 79f4879bd..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0059.md
+++ /dev/null
@@ -1,90 +0,0 @@
----
-id: exceptionally-odd
-title: Exceptionally Odd
-sidebar_label: 0059 Exceptionally Odd
-tags:
-- Array
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to find the element that occurs an odd number of times in an array in various programming languages."
----
-
-## Problem
-
-Given an array of N positive integers where all numbers occur even number of times except one number which occurs odd number of times. Find the exceptional number.
-
-### Examples:
-**Example 1:**
-```
-Input:
-N = 7
-Arr[] = {1, 2, 3, 2, 3, 1, 3}
-Output: 3
-Explaination: 3 occurs three times.
-```
-
-**Example 2:**
-```
-Input:
-N = 7
-Arr[] = {5, 7, 2, 7, 5, 2, 5}
-Output: 5
-Explaination: 5 occurs three times.
-```
-
-### Your task:
-
-You don't need to read input or print anything. Your task is to complete the function **getOddOccurrence()** which takes **arr[]** and **n** as input parameters and returns the exceptional number.
-
-- **Expected Time Complexity:** $O(N)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1<=N<=10^5$
-- $1<=arr[i]<=10^6$
-
-## Solution
-### Python
-```python
-def getOddOccurrence(self, arr, n):
- result = 0
- for num in arr:
- result ^= num
- return result
-```
-
-### Java
-```java
-int getOddOccurrence(int[] arr, int n) {
- int result = 0;
- for(int i = 0; i4->3
-Output:
-Odd
-Explanation:
-The length of linked list is 3 which is odd.
-```
-
-**Example 2:**
-```
-Input:
-n = 6
-linked list = 12->52->10->47->95->0
-Output:
-Even
-Explanation:
-The length of linked list is 6 which is even.
-```
-
-### Your task:
-
-Since this is a functional problem you don't have to worry about input, you just have to complete the function **isLengthEvenOrOdd()** which takes the head of the linked list as the input parameter and returns 0 if the length of the linked list is even otherwise returns 1.
-
-- **Expected Time Complexity:** $O(n)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1 <= n <= 10^4$
-- $1 <=$ elements of the linked list $<= 10^3$
-
-## Solution
-### Python
-```python
-def isLengthEvenOrOdd(head):
- count = 0
- temp = head
- while temp is not None:
- count+=1
- temp = temp.next
- if count%2==0:
- return 0
- else:
- return 1
-```
-
-### Java
-```java
-public int isLengthEvenOrOdd(Node head) {
- int count = 0;
- Node temp = head;
- while(temp!=null) {
- count+=1;
- temp = temp.next;
- }
- if(count%2==0)
- return 0;
- else
- return 1;
-}
-```
-
-### C++
-```cpp
-int isLengthEvenOrOdd(struct Node* head) {
- int count = 0;
- Node* temp = head;
- while(temp!=nullptr) {
- count+=1;
- temp = temp->next;
- }
- if(count%2==0)
- return 0;
- else
- return 1;
-}
-```
-
-### C
-```c
-int isLengthEvenOrOdd(struct Node* head) {
- int count = 0;
- struct Node* temp = head;
- while (temp != NULL) {
- count += 1;
- temp = temp->next;
- }
- if (count % 2 == 0)
- return 0;
- else
- return 1;
-}
-```
-
-- **Time Complexity:** $O(n)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0063.md b/dsa-solutions/gfg-solutions/Basic/0063.md
deleted file mode 100644
index 184727f84..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0063.md
+++ /dev/null
@@ -1,121 +0,0 @@
----
-id: find-position-of-set-bit
-title: Find Position of Set Bit
-sidebar_label: 0063 Find Position of Set Bit
-tags:
-- Bit Manipulation
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to find the position of the set bit in a number in various programming languages."
----
-
-## Problem
-
-Given a number N having only one ‘1’ and all other ’0’s in its binary representation, find position of the only set bit. If there are 0 or more than 1 set bit the answer should be -1. Position of set bit '1' should be counted starting with 1 from LSB side in binary representation of the number.
-
-### Examples:
-**Example 1:**
-```
-Input:
-N = 2
-Output:
-2
-Explanation:
-2 is represented as "10" in Binary. As we see there's only one set bit and it's in Position 2 and thus the
-Output 2.
-```
-
-**Example 2:**
-```
-Input:
-N = 5
-Output:
--1
-Explanation:
-5 is represented as "101" in Binary. As we see there's two set bits and thus the Output -1.
-```
-
-### Your task:
-
-You don't need to read input or print anything. Your task is to complete the function **findPosition()** which takes an integer N as input and returns the answer.
-
-- **Expected Time Complexity:** $O(log(N))$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $0 <= N <= 10^8$
-
-## Solution
-### Python
-```python
-def findPosition(self, N):
- if N == 0 or (N & (N - 1)) != 0:
- return -1
- position = 1
- while N:
- if N & 1:
- return position
- N >>= 1
- position += 1
- return -1
-```
-
-### Java
-```java
-static int findPosition(int N) {
- if (N == 0 || (N & (N - 1)) != 0) {
- return -1;
- }
- int position = 1;
- while (N != 0) {
- if ((N & 1) != 0) {
- return position;
- }
- N >>= 1;
- position++;
- }
- return -1;
-}
-```
-
-### C++
-```cpp
-int findPosition(int N) {
- if (N == 0 || (N & (N - 1)) != 0) {
- return -1;
- }
- int position = 1;
- while (N != 0) {
- if ((N & 1) != 0) {
- return position;
- }
- N >>= 1;
- position++;
- }
- return -1;
-}
-```
-
-### C
-```c
-int findPosition(int N) {
- if (N == 0 || (N & (N - 1)) != 0) {
- return -1;
- }
- int position = 1;
- while (N != 0) {
- if ((N & 1) != 0) {
- return position;
- }
- N >>= 1;
- position++;
- }
- return -1;
-}
-```
-
-- **Time Complexity:** $O(log(N))$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0064.md b/dsa-solutions/gfg-solutions/Basic/0064.md
deleted file mode 100644
index 0465524d5..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0064.md
+++ /dev/null
@@ -1,174 +0,0 @@
----
-id: remove-common-characters-concatenate
-title: Remove Common Characters and Concatenate
-sidebar_label: 0064 Remove Common Characters and Concatenate
-tags:
-- Strings
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to remove common characters from two strings and concatenate the remaining characters in various programming languages."
----
-
-## Problem
-
-Given two strings s1 and s2. Modify both the strings such that all the common characters of s1 and s2 are to be removed and the uncommon characters of s1 and s2 are to be concatenated.
-
-**Note:** If all characters are removed print -1.
-
-### Examples:
-**Example 1:**
-```
-Input:
-s1 = aacdb
-s2 = gafd
-Output: cbgf
-Explanation: The common characters of s1 and s2 are: a, d. The uncommon characters of s1 and s2 are c, b, g and f. Thus the modified string with uncommon characters concatenated is cbgf.
-```
-
-**Example 2:**
-```
-Input:
-s1 = abcs
-s2 = cxzca
-Output: bsxz
-Explanation: The common characters of s1 and s2 are: a,c. The uncommon characters of s1 and s2 are b,s,x and z. Thus the modified string with uncommon characters concatenated is bsxz.
-```
-
-### Your task:
-
-The task is to complete the function **concatenatedString()** which removes the common characters, concatenates, and returns the string. If all characters are removed then return -1.
-
-- **Expected Time Complexity:** $O(N)$
-- **Expected Auxiliary Space:** $O$(Number of distinct characters)
-
-**Note:** N = |Length of Strings|
-
-### Constraints:
-
-- $1<=$|Length of Strings|$<=10^4$
-
-## Solution
-### Python
-```python
-def concatenatedString(self,s1,s2):
- freq_s1 = {}
- freq_s2 = {}
- for char in s1:
- freq_s1[char] = freq_s1.get(char, 0) + 1
- for char in s2:
- freq_s2[char] = freq_s2.get(char, 0) + 1
- result = []
- for char in s1:
- if char not in freq_s2:
- result.append(char)
- for char in s2:
- if char not in freq_s1:
- result.append(char)
- if len(result) == 0:
- return "-1"
- else:
- return "".join(result)
-```
-
-### Java
-```java
-public static String concatenatedString(String s1,String s2) {
- Map freq_s1 = new HashMap<>();
- Map freq_s2 = new HashMap<>();
- for (char ch : s1.toCharArray()) {
- freq_s1.put(ch, freq_s1.getOrDefault(ch, 0) + 1);
- }
- for (char ch : s2.toCharArray()) {
- freq_s2.put(ch, freq_s2.getOrDefault(ch, 0) + 1);
- }
- StringBuilder result = new StringBuilder();
- for (char ch : s1.toCharArray()) {
- if (!freq_s2.containsKey(ch)) {
- result.append(ch);
- }
- }
- for (char ch : s2.toCharArray()) {
- if (!freq_s1.containsKey(ch)) {
- result.append(ch);
- }
- }
- if (result.length() == 0) {
- return "-1";
- }
- else {
- return result.toString();
- }
-}
-```
-
-### C++
-```cpp
-string concatenatedString(string s1, string s2) {
- unordered_map freq_s1;
- unordered_map freq_s2;
- for (char ch : s1) {
- freq_s1[ch]++;
- }
- for (char ch : s2) {
- freq_s2[ch]++;
- }
- string result;
- for (char ch : s1) {
- if (freq_s2.find(ch) == freq_s2.end()) {
- result += ch;
- }
- }
- for (char ch : s2) {
- if (freq_s1.find(ch) == freq_s1.end()) {
- result += ch;
- }
- }
- if (result.empty()) {
- return "-1";
- }
- else {
- return result;
- }
-}
-```
-
-### C
-```c
-char* concatenatedString(const char* s1, const char* s2) {
- Entry freq_s1[256] = {0};
- Entry freq_s2[256] = {0};
- int len1 = strlen(s1);
- int len2 = strlen(s2);
- for (int i = 0; i < len1; i++) {
- freq_s1[s1[i]].key = s1[i];
- freq_s1[s1[i]].count++;
- }
- for (int i = 0; i < len2; i++) {
- freq_s2[s2[i]].key = s2[i];
- freq_s2[s2[i]].count++;
- }
-
- char* result = (char*)malloc((len1 + len2 + 1) * sizeof(char));
- int idx = 0;
- for (int i = 0; i < len1; i++) {
- if (freq_s2[s1[i]].count == 0) {
- result[idx++] = s1[i];
- }
- }
- for (int i = 0; i < len2; i++) {
- if (freq_s1[s2[i]].count == 0) {
- result[idx++] = s2[i];
- }
- }
- result[idx] = '\0';
- if (idx == 0) {
- strcpy(result, "-1");
- }
- return result;
-}
-```
-
-- **Time Complexity:** $O(N)$
-- **Auxiliary Space:** $O$(Number of distinct characters)
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0065.md b/dsa-solutions/gfg-solutions/Basic/0065.md
deleted file mode 100644
index 242fd3b98..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0065.md
+++ /dev/null
@@ -1,101 +0,0 @@
----
-id: pattern-1
-title: Pattern 1
-sidebar_label: 0065 Pattern 1
-tags:
-- Patterns
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to print square pattern in various programming languages."
----
-
-## Problem
-
-Geek is very fond of patterns. Once, his teacher gave him a square pattern to solve. He gave Geek an integer n and asked him to build a pattern.
-
-Help Geek to build a square pattern with the help of * such that each * is space-separated in each line.
-
-### Examples:
-**Example 1:**
-```
-Input:
-n = 3
-Output:
-* * *
-* * *
-* * *
-```
-
-**Example 2:**
-```
-Input:
-n = 5
-Output:
-* * * * *
-* * * * *
-* * * * *
-* * * * *
-* * * * *
-```
-
-### Your task:
-
-You don't need to input anything. Complete the function **printSquare()** which takes an integer n as the input parameter and print the pattern.
-
-- **Expected Time Complexity:** $O(N^2)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1<= n <= 1000$
-
-## Solution
-### Python
-```python
-def printSquare(self, N):
- for i in range(N):
- for j in range(N):
- print("* ", end="")
- print()
-```
-
-### Java
-```java
-void printSquare(int n) {
- for (int i = 0; i < n; i++) {
- for (int j = 0; j < n; j++) {
- System.out.print("* ");
- }
- System.out.println();
- }
-}
-```
-
-### C++
-```cpp
-void printSquare(int n) {
- for(int i = 0; i < n; i++) {
- for(int j = 0; j < n; j++) {
- cout << "* ";
- }
- cout << endl;
- }
-}
-```
-
-### C
-```c
-void printSquare(int n) {
- for (int i = 0; i < n; i++) {
- for (int j = 0; j < n; j++) {
- printf("* ");
- }
- printf("\n");
- }
-}
-```
-
-- **Time Complexity:** $O(N^2)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0066.md b/dsa-solutions/gfg-solutions/Basic/0066.md
deleted file mode 100644
index 8b0e5748a..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0066.md
+++ /dev/null
@@ -1,124 +0,0 @@
----
-id: anagram-of-string
-title: Anagram of String
-sidebar_label: 0066 Anagram of String
-tags:
-- Strings
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to check if two strings are anagrams of each other in various programming languages."
----
-
-## Problem
-
-Given two strings S1 and S2 in lowercase, the task is to make them anagram. The only allowed operation is to remove a character from any string. Find the minimum number of characters to be deleted to make both the strings anagram. Two strings are called anagram of each other if one of them can be converted into another by rearranging its letters.
-
-### Examples:
-**Example 1:**
-```
-Input:
-S1 = bcadeh
-S2 = hea
-Output: 3
-Explanation: We need to remove b, c and d from S1.
-```
-
-**Example 2:**
-```
-Input:
-S1 = cddgk
-S2 = gcd
-Output: 2
-Explanation: We need to remove d and k from S1.
-```
-
-### Your task:
-
-Complete the function **remAnagram()** which takes two strings S1, S2 as input parameter, and returns minimum characters needs to be deleted.
-
-- **Expected Time Complexity:** $O(max(|S1|, |S2|))$, where |S| = length of string S
-- **Expected Auxiliary Space:** $O(26)$
-
-### Constraints:
-
-- $1 <= |S1|, |S2| <= 10^5$
-
-## Solution
-### Python
-```python
-def remAnagram(str1,str2):
- CHARS = 26
- count1 = [0]*CHARS
- count2 = [0]*CHARS
- i = 0
- while i < len(str1):
- count1[ord(str1[i])-ord('a')] += 1
- i += 1
- i =0
- while i < len(str2):
- count2[ord(str2[i])-ord('a')] += 1
- i += 1
- result = 0
- for i in range(26):
- result += abs(count1[i] - count2[i])
- return result
-```
-
-### Java
-```java
-public int remAnagrams(String s,String s1) {
- int count1[] = new int[26];
- int count2[] = new int[26];
- for (int i = 0; i < s.length() ; i++)
- count1[s.charAt(i) -'a']++;
- for (int i = 0; i < s1.length() ; i++)
- count2[s1.charAt(i) -'a']++;
- int result = 0;
- for (int i = 0; i < 26; i++)
- result += Math.abs(count1[i] - count2[i]);
- return result;
-}
-```
-
-### C++
-```cpp
-int remAnagram(string str1, string str2) {
- int count1[26] = {0};
- int count2[26] = {0};
- for (char c : str1) {
- count1[c - 'a']++;
- }
- for (char c : str2) {
- count2[c - 'a']++;
- }
- int result = 0;
- for (int i = 0; i < 26; i++) {
- result += abs(count1[i] - count2[i]);
- }
- return result;
-}
-```
-
-### C
-```c
-int remAnagram(const char* str1, const char* str2) {
- int count1[26] = {0};
- int count2[26] = {0};
- for (int i = 0; str1[i] != '\0'; i++) {
- count1[str1[i] - 'a']++;
- }
- for (int i = 0; str2[i] != '\0'; i++) {
- count2[str2[i] - 'a']++;
- }
- int result = 0;
- for (int i = 0; i < 26; i++) {
- result += abs(count1[i] - count2[i]);
- }
- return result;
-}
-```
-
-- **Time Complexity:** $O(max(|S1|, |S2|))$
-- **Auxiliary Space:** $O(26)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0067.md b/dsa-solutions/gfg-solutions/Basic/0067.md
deleted file mode 100644
index 2e2426454..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0067.md
+++ /dev/null
@@ -1,116 +0,0 @@
----
-id: number-sparse-or-not
-title: Number is Sparse or Not
-sidebar_label: 0067 Number is Sparse or Not
-tags:
-- Bit Manipulation
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to determine if a number is sparse or not in various programming languages."
----
-
-## Problem
-
-Given a number N. The task is to check whether it is sparse or not. A number is said to be a sparse number if no two or more consecutive bits are set in the binary representation.
-
-### Examples:
-**Example 1:**
-```
-Input: N = 2
-Output: 1
-Explanation: Binary Representation of 2 is 10, which is not having consecutive set bits. So, it is sparse number.
-```
-
-**Example 2:**
-```
-Input: N = 3
-Output: 0
-Explanation: Binary Representation of 3 is 11, which is having consecutive set bits in it. So, it is not a sparse number.
-```
-
-### Your task:
-
-The task is to complete the function **checkSparse()** that takes n as a parameter and returns 1 if the number is sparse else returns 0.
-
-- **Expected Time Complexity:** $O(1)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1<=N<=10^6$
-
-## Solution
-### Python
-```python
-def isSparse(self,n):
- if (n == 1):
- return True
- global prev
- while(n > 0):
- prev = n & 1
- n = n >> 1
- curr = n & 1
- if(prev == curr and prev == 1):
- return False
- prev = curr
- return True
-```
-
-### Java
-```java
-public static boolean isSparse(int n) {
- int prev;
- if (n == 1)
- return true;
- while (n > 0) {
- prev = n & 1;
- n = n >> 1;
- int curr = n & 1;
- if (prev == curr && prev == 1)
- return false;
- prev = curr;
- }
- return true;
-}
-```
-
-### C++
-```cpp
-bool isSparse(int n) {
- int prev;
- if (n == 1)
- return true;
- while (n > 0) {
- prev = n & 1;
- n = n >> 1;
- int curr = n & 1;
- if (prev == curr && prev == 1)
- return false;
- prev = curr;
- }
- return true;
-}
-```
-
-### C
-```c
-bool isSparse(int n) {
- int prev;
- if (n == 1)
- return true;
- while (n > 0) {
- prev = n & 1;
- n = n >> 1;
- int curr = n & 1;
- if (prev == curr && prev == 1)
- return false;
- prev = curr;
- }
- return true;
-}
-```
-
-- **Time Complexity:** $O(1)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0068.md b/dsa-solutions/gfg-solutions/Basic/0068.md
deleted file mode 100644
index 29e6082b4..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0068.md
+++ /dev/null
@@ -1,111 +0,0 @@
----
-id: delete-alternate-nodes
-title: Delete Alternate Nodes
-sidebar_label: 0068 Delete Alternate Nodes
-tags:
-- Linked List
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to delete alternate nodes from a linked list in various programming languages."
----
-
-## Problem
-
-Given a Singly Linked List of size n, delete all alternate nodes of the list.
-
-### Examples:
-**Example 1:**
-```
-Input:
-LinkedList: 1->2->3->4->5->6
-Output: 1->3->5
-Explanation: Deleting alternate nodes results in the linked list with elements 1->3->5.
-```
-
-**Example 2:**
-```
-Input:
-LinkedList: 99->59->42->20
-Output: 99->42
-```
-
-### Your task:
-
-Your task is to complete the function **deleteAlt()** which takes the **head** of the linked list in the input parameter and modifies the given linked list accordingly.
-
-- **Expected Time Complexity:** $O(n)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1<=n<=10^5$
-- $1<=node.data<=10^6$
-
-## Solution
-### Python
-```python
-def deleteAlt(self, head):
- if (head == None):
- return
- prev = head
- now = head.next
- while (prev != None and now != None):
- prev.next = now.next
- now = None
- prev = prev.next
- if (prev != None):
- now = prev.next
-```
-
-### Java
-```java
-public void deleteAlternate (Node head){
- if (head == null)
- return;
- Node node = head;
- while (node != null && node.next != null) {
- node.next = node.next.next;
- node = node.next;
- }
-}
-```
-
-### C++
-```cpp
-void deleteAlt(struct Node *head){
- if (head == NULL)
- return
- Node *prev = head;
- Node *node = head->next;
- while (prev != NULL && node != NULL) {
- prev->next = node->next;
- delete(node);
- prev = prev->next;
- if (prev != NULL)
- node = prev->next;
- }
-}
-```
-
-### C
-```c
-void deleteAlt(struct Node *head) {
- if (head == NULL)
- return;
- struct Node *prev = head;
- struct Node *node = head->next;
- while (prev != NULL && node != NULL) {
- prev->next = node->next;
- free(node);
- prev = prev->next;
- if (prev != NULL)
- node = prev->next;
- }
-}
-
-```
-
-- **Time Complexity:** $O(n)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0069.md b/dsa-solutions/gfg-solutions/Basic/0069.md
deleted file mode 100644
index 8d16a190b..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0069.md
+++ /dev/null
@@ -1,116 +0,0 @@
----
-id: ishaan-loves-chocolates
-title: Ishaan Loves Chocolates
-sidebar_label: 0069 Ishaan Loves Chocolates
-tags:
-- Array
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods for determining the tastiness level of the square which his sister gets in various programming languages."
----
-
-## Problem
-
-As we know, Ishaan has a love for chocolates. He has bought a huge chocolate bar that contains N chocolate squares. Each of the squares has a tastiness level which is denoted by an array A[].
-
-Ishaan can eat the first or the last square of the chocolate at once. Ishaan has a sister who loves chocolates too and she demands the last chocolate square. Now, Ishaan being greedy eats the more tasty square first.
-
-Determine the tastiness level of the square which his sister gets.
-
-### Examples:
-**Example 1:**
-```
-Input : arr[ ] = {5, 3, 1, 6, 9}
-Output : 1
-Explanation:
-Initially: 5 3 1 6 9
-In first step: 5 3 1 6
-In Second step: 5 3 1
-In Third step: 3 1
-In Fourth step: 1
-Return 1
-```
-
-**Example 2:**
-```
-Input : arr[ ] = {5, 9, 2, 6}
-Output : 2
-```
-
-### Your task:
-
-This is a function problem. The input is already taken care of by the driver code. You only need to complete the function **chocolates()** that takes an array (arr), sizeOfArray (n) and return the tastiness level of the square which his sister gets. The driver code takes care of the printing.
-
-- **Expected Time Complexity:** $O(N)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1<=N<=10^5$
-- $1 ≤ A[i] ≤ 10^9$
-
-## Solution
-### Python
-```python
-def chocolates(self, n : int, arr : List[int]) -> int:
- low = 0
- high = n-1
- while lowarr[high]:
- low+=1
- else:
- high-=1
- return arr[low]
-```
-
-### Java
-```java
-public static int chocolates(int n, int[] arr) {
- int low = 0, high = n-1;
- while(lowarr[high]) {
- low++;
- }
- else {
- high--;
- }
- }
- return arr[low];
-}
-```
-
-### C++
-```cpp
-int chocolates(int n, vector &arr) {
- int low = 0, high = n-1;
- while(lowarr[high]) {
- low++;
- }
- else {
- high--;
- }
- }
- return arr[low];
-}
-```
-
-### C
-```c
-int chocolates(int arr[], int l, int r) {
- while(larr[r]) {
- l++;
- }
- else {
- r--;
- }
- }
- return arr[l];
-}
-```
-
-- **Time Complexity:** $O(N)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0070.md b/dsa-solutions/gfg-solutions/Basic/0070.md
deleted file mode 100644
index 7a0cb30bf..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0070.md
+++ /dev/null
@@ -1,100 +0,0 @@
----
-id: binary-to-decimal
-title: Binary Number to Decimal Number
-sidebar_label: 0070 Binary Number to Decimal Number
-tags:
-- Binary
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to convert a binary number to a decimal number in various programming languages."
----
-
-## Problem
-
-Given a Binary Number B, find its decimal equivalent.
-
-### Examples:
-**Example 1:**
-```
-Input: B = 10001000
-Output: 136
-```
-
-**Example 2:**
-```
-Input: B = 101100
-Output: 44
-```
-
-### Your task:
-
-You don't need to read or print anything. Your task is to complete the function **binary_to_decimal()** which takes the binary number as string input parameter and returns its decimal equivalent.
-
-- **Expected Time Complexity:** $O(K * Log(K))$, where K is number of bits in binary number.
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1 <=$ number of bits in binary number $<= 16$
-
-## Solution
-### Python
-```python
-def binary_to_decimal(self, str):
- num = int(str);
- dec_value = 0;
- base = 1;
- temp = num;
- while(temp):
- last_digit = temp % 10;
- temp = int(temp / 10);
- dec_value += last_digit * base;
- base = base * 2;
- return dec_value;
-```
-
-### Java
-```java
-public int binary_to_decimal(String str) {
- int decValue = 0;
- int base = 1;
- for (int i = str.length() - 1; i >= 0; i--) {
- if (str.charAt(i) == '1') {
- decValue += base;
- }
- base = base * 2;
- }
- return decValue;
-}
-```
-
-### C++
-```cpp
-int binary_to_decimal(string str) {
- unsigned long long num = bitset<64>(str).to_ullong();
- int decValue = static_cast(num);
- return decValue;
-}
-```
-
-### C
-```c
-int binary_to_decimal(char str[]) {
- int len = strlen(str);
- int dec_value = 0;
- int base = 1;
- int i;
- for (i = len - 1; i >= 0; i--) {
- if (str[i] == '1') {
- dec_value += base;
- }
- base *= 2;
- }
- return dec_value;
-}
-```
-
-- **Time Complexity:** $O(K * Log(K))$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0071.md b/dsa-solutions/gfg-solutions/Basic/0071.md
deleted file mode 100644
index e571e57c4..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0071.md
+++ /dev/null
@@ -1,124 +0,0 @@
----
-id: isogram-check
-title: Check if a String is Isogram or Not
-sidebar_label: 0071 Check if a String is Isogram or Not
-tags:
-- Strings
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to check if a string is an isogram (a string with no repeating characters) in various programming languages."
----
-
-## Problem
-
-Given a string S of lowercase alphabets, check if it is isogram or not. An Isogram is a string in which no letter occurs more than once.
-
-### Examples:
-**Example 1:**
-```
-Input:
-S = machine
-Output: 1
-Explanation: machine is an isogram as no letter has appeared twice. Hence we print 1.
-```
-
-**Example 2:**
-```
-Input:
-S = geeks
-Output: 0
-Explanation: geeks is not an isogram as 'e' appears twice. Hence we print 0.
-```
-
-### Your task:
-
-This is a function problem. You only need to complete the function **isIsogram()** that takes a string as a parameter and returns either true or false.
-
-- **Expected Time Complexity:** $O(N)$
-- **Expected Auxiliary Space:** $O$(Number of distinct characters)
-
-Note: N = |S|
-
-### Constraints:
-
-- $1 <= |s| <= 10^3$
-
-## Solution
-### Python
-```python
-def isIsogram(self,s):
- length = len(s)
- mapHash = [0] * 26
- for i in range(length):
- mapHash[ord(s[i]) - ord('a')] += 1
- if (mapHash[ord(s[i]) - ord('a')] > 1):
- return False
- return True
-```
-
-### Java
-```java
-static boolean isIsogram(String data){
- int length = data.length();
- int[] mapHash = new int[26];
- for (int i = 0; i < length; i++) {
- char currentChar = data.charAt(i);
- if (Character.isLetter(currentChar)) {
- currentChar = Character.toLowerCase(currentChar);
- mapHash[currentChar - 'a']++;
- if (mapHash[currentChar - 'a'] > 1) {
- return false;
- }
- }
- }
- return true;
-}
-```
-
-### C++
-```cpp
-bool isIsogram(string s) {
- int length = s.length();
- vector mapHash(26, 0);
- for (int i = 0; i < length; i++) {
- char currentChar = s[i];
- if (isalpha(currentChar)) {
- currentChar = tolower(currentChar);
- mapHash[currentChar - 'a']++;
- if (mapHash[currentChar - 'a'] > 1) {
- return false;
- }
- }
- }
- return true;
-}
-```
-
-### C
-```c
-int isIsogram(const char* s) {
- int mapHash[26] = {0};
- int length = 0;
- const char* ptr = s;
- while (*ptr != '\0') {
- length++;
- ptr++;
- }
- for (int i = 0; i < length; i++) {
- char currentChar = s[i];
- if (isalpha(currentChar)) {
- currentChar = tolower(currentChar);
- mapHash[currentChar - 'a']++;
- if (mapHash[currentChar - 'a'] > 1) {
- return 0;
- }
- }
- }
- return 1;
-}
-```
-
-- **Time Complexity:** $O(N)$
-- **Auxiliary Space:** $O$(Number of distinct characters)
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0072.md b/dsa-solutions/gfg-solutions/Basic/0072.md
deleted file mode 100644
index 87bf92035..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0072.md
+++ /dev/null
@@ -1,110 +0,0 @@
----
-id: size-of-binary-tree
-title: Size of Binary Tree
-sidebar_label: 0072 Size of Binary Tree
-tags:
-- Binary Tree
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to calculate the size (number of nodes) of a binary tree in various programming languages."
----
-
-## Problem
-
-Given a binary tree of size n, you have to count the number of nodes in it. For example, the count of nodes in the tree below is 4.
-
-```
- 1
- / \
- 10 39
- /
-5
-```
-
-### Examples:
-**Example 1:**
-```
-Input:
-1 2 3
-Output:
-3
-Explanation:
-Given Tree is :
- 1
- / \
- 2 3
-There are 3 nodes in the tree.
-```
-
-**Example 2:**
-```
-Input:
-10 5 9 N 1 3 6
-Output:
-6
-Explanation:
-Given Tree is :
- 10
- / \
- 5 9
- \ / \
- 1 3 6
-There are 6 nodes in the tree.
-```
-
-### Your task:
-
-You don't need to read input or print anything. Your task is to complete the function **getSize()** which takes the tree head node and returns an integer representing the number of nodes in the tree.
-
-- **Expected Time Complexity:** $O(n)$
-- **Expected Auxiliary Space:** $O(h)$, where h is the height of the binary tree
-
-### Constraints:
-
-- $1<=n<=10^5$
-- $1 <=$ values of nodes $<= 10^6$
-
-## Solution
-### Python
-```python
-def getSize(self, node : Optional['Node']) -> int:
- if node is None:
- return 0
- else:
- return self.getSize(node.left) + 1 + self.getSize(node.right)
-```
-
-### Java
-```java
-public static int getSize(Node node) {
- if(node==null)
- return 0;
- else
- return getSize(node.left) + 1 + getSize(node.right);
-}
-```
-
-### C++
-```cpp
-int getSize(Node* node) {
- if (node == nullptr)
- return 0;
- else
- return getSize(node->left) + 1 + getSize(node->right);
-}
-```
-
-### C
-```c
-int getSize(struct Node* node) {
- if (node == NULL)
- return 0;
- else
- return getSize(node->left) + 1 + getSize(node->right);
-}
-```
-
-- **Time Complexity:** $O(n)$
-- **Auxiliary Space:** $O(h)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0073.md b/dsa-solutions/gfg-solutions/Basic/0073.md
deleted file mode 100644
index 843fc2bfb..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0073.md
+++ /dev/null
@@ -1,163 +0,0 @@
----
-id: elements-in-the-range
-title: Elements in the Range
-sidebar_label: 0073 Elements in the Range
-tags:
-- Array
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to find elements within a specified range in an array in various programming languages."
----
-
-## Problem
-
-Given an array arr[] containing positive elements. A and B are two numbers defining a range. The task is to check if the array contains all elements in the given range.
-
-### Examples:
-**Example 1:**
-```
-Input: N = 7, A = 2, B = 5
-arr[] = {1, 4, 5, 2, 7, 8, 3}
-Output: Yes
-Explanation: It has elements between range 2-5 i.e 2,3,4,5
-```
-
-**Example 2:**
-```
-Input: N = 7, A = 2, B = 6
-arr[] = {1, 4, 5, 2, 7, 8, 3}
-Output: No
-Explanation: Array does not contain 6.
-```
-
-### Your task:
-
-This is a function problem. You don't need to take any input, as it is already accomplished by the driver code. You just need to complete the function **check_elements()** that takes array arr, integer N, integer A, and integer B as parameters and returns the boolean True if array elements contain all elements in the given range else boolean False.
-
-**Note:** If the array contains all elements in the given range then driver code outputs Yes otherwise, it outputs No
-
-- **Expected Time Complexity:** $O(N)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1<=N<=10^7$
-
-## Solution
-### Python
-```python
-def check_elements(self, arr, n, A, B):
- rangeV = B - A
- for i in range(0, n):
- if A <= abs(arr[i]) <= B:
- z = abs(arr[i]) - A
- if 0 <= z < n and arr[z] > 0:
- arr[z] = arr[z] * -1
- count = 0
- for i in range(0, rangeV + 1):
- if i >= n:
- break
- if arr[i] > 0:
- return False
- else:
- count += 1
- if count != (rangeV + 1):
- return False
- return True
-```
-
-### Java
-```java
-boolean check_elements(int arr[], int n, int A, int B) {
- int rangeV = B - A;
- for (int i = 0; i < n; i++) {
- if (Math.abs(arr[i]) >= A && Math.abs(arr[i]) <= B) {
- int z = Math.abs(arr[i]) - A;
- if (z >= 0 && z < n && arr[z] > 0) {
- arr[z] = arr[z] * -1;
- }
- }
- }
- int count = 0;
- for (int i = 0; i <= rangeV; i++) {
- if (i >= n) {
- break;
- }
- if (arr[i] > 0) {
- return false;
- } else {
- count++;
- }
- }
-
- if (count != (rangeV + 1)) {
- return false;
- }
- return true;
-}
-```
-
-### C++
-```cpp
-bool check_elements(int arr[], int n, int A, int B) {
- int rangeV = B - A;
- for (int i = 0; i < n; i++) {
- if (abs(arr[i]) >= A && abs(arr[i]) <= B) {
- int z = abs(arr[i]) - A;
- if (z >= 0 && z < n && arr[z] > 0) {
- arr[z] = arr[z] * -1;
- }
- }
- }
- int count = 0;
- for (int i = 0; i <= rangeV; i++) {
- if (i >= n) {
- break;
- }
- if (arr[i] > 0) {
- return false;
- } else {
- count++;
- }
- }
- if (count != (rangeV + 1)) {
- return false;
- }
- return true;
-}
-```
-
-### C
-```c
-bool check_elements(int arr[], int n, int A, int B) {
- int rangeV = B - A;
- for (int i = 0; i < n; i++) {
- if (abs(arr[i]) >= A && abs(arr[i]) <= B) {
- int z = abs(arr[i]) - A;
- if (z >= 0 && z < n && arr[z] > 0) {
- arr[z] = arr[z] * -1;
- }
- }
- }
- int count = 0;
- for (int i = 0; i <= rangeV; i++) {
- if (i >= n) {
- break;
- }
- if (arr[i] > 0) {
- return false;
- } else {
- count++;
- }
- }
- if (count != (rangeV + 1)) {
- return false;
- }
- return true;
-}
-```
-
-- **Time Complexity:** $O(N)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0074.md b/dsa-solutions/gfg-solutions/Basic/0074.md
deleted file mode 100644
index cc67ad64f..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0074.md
+++ /dev/null
@@ -1,99 +0,0 @@
----
-id: game-with-numbers
-title: Game with Numbers
-sidebar_label: 0074 Game with Numbers
-tags:
-- Number Games
-- Python
-- Java
-- C++
-- C
-description: "This document provides solutions for forming the array by xoring the consecutive elements in various programming languages."
----
-
-## Problem
-
-You are given an array arr[], and you have to re-construct an array arr[].
-
-The values in arr[] are obtained by doing Xor of consecutive elements in the array.
-
-### Examples:
-**Example 1:**
-```
-Input : n=5, arr[ ] = {10, 11, 1, 2, 3}
-Output : 1 10 3 1 3
-Explanation:
-At index 0, arr[0] xor arr[1] = 1
-At index 1, arr[1] xor arr[2] = 10
-At index 2, arr[2] xor arr[3] = 3
-...
-At index 4, No element is left So, it will remain as
-it is.
-New Array will be {1, 10, 3, 1, 3}.
-```
-
-**Example 2:**
-```
-Input : n=4, arr[ ] = {5, 9, 7, 6}
-Output : 12 14 1 6
-Explanation:
-At index 0, arr[0] xor arr[1] = 12
-At index 1, arr[1] xor arr[2] = 14
-At index 2, arr[2] xor arr[3] = 1
-At index 3, No element is left So, it will remain as it is.
-New Array will be {12, 14, 1, 6}.
-```
-
-### Your task:
-
-This is a function problem. The input is already taken care of by the driver code. You only need to complete the function **game_with_number()** that takes an array (arr), sizeOfArray (n) and return the array re-constructed array arr. The driver code takes care of the printing.
-
-- **Expected Time Complexity:** $O(N)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1<=N<=10^5$
-- $1<=arr[i]<=10^7$
-
-## Solution
-### Python
-```python
-def game_with_number (arr, n) :
- for i in range(0,n-1):
- arr[i] = arr[i]^arr[i+1]
- return arr
-```
-
-### Java
-```java
-public static int[] game_with_number (int arr[], int n) {
- for(int i = 0; i None:
- print("Hello World")
-```
-
-### Java
-```java
-public static void printHello() {
- System.out.println("Hello World");
-}
-```
-
-### C++
-```cpp
-void printHello() {
- cout<<"Hello World";
-}
-```
-
-### C
-```c
-void printHello() {
- printf("Hello World\n");
-}
-```
-
-- **Time Complexity:** $O(1)$
-- **Auxiliary Space:** $O(1)$
diff --git a/dsa-solutions/gfg-solutions/Basic/0077.md b/dsa-solutions/gfg-solutions/Basic/0077.md
deleted file mode 100644
index 3e0027d4c..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0077.md
+++ /dev/null
@@ -1,152 +0,0 @@
----
-id: angle-between-hour-and-minute-hand
-title: Angle between Hour and Minute Hand
-sidebar_label: 0077 Angle between Hour and Minute Hand
-tags:
-- Mathematics
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to calculate the angle between the hour and minute hands of a clock at a given time in various programming languages."
----
-
-## Problem
-
-Calculate the angle between the hour hand and minute hand.
-
-Note: There can be two angles between hands; we need to print a minimum of two. Also, we need to print the floor of the final result angle. For example, if the final angle is 10.61, we need to print 10.
-
-### Examples:
-**Example 1:**
-```
-Input:
-H = 9 , M = 0
-Output:
-90
-Explanation:
-The minimum angle between hour and minute hand when the time is 9 is 90 degress.
-```
-
-**Example 2:**
-```
-Input:
-H = 3 , M = 30
-Output:
-75
-Explanation:
-The minimum angle between hour and minute hand when the time is 3:30 is 75 degress.
-```
-
-### Your task:
-
-You don't need to read, input, or print anything. Your task is to complete the function **getAngle()**, which takes 2 Integers H and M as input and returns the answer.
-
-- **Expected Time Complexity:** $O(1)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1 ≤ H ≤ 12$
-- $0 ≤ M < 60$
-
-H and M are Integers
-
-## Solution
-### Python
-```python
-def getAngle(self, H , M):
- if H < 0 or M < 0 or H > 12 or M > 60:
- print('Wrong input')
- return None
- if H == 12:
- H = 0
- if M == 60:
- M = 0
- H += 1
- if H > 12:
- H -= 12
- hour_angle = 0.5 * (H * 60 + M)
- minute_angle = 6 * M
- angle = abs(hour_angle - minute_angle)
- angle = min(360 - angle, angle)
- return int(angle)
-```
-
-### Java
-```java
-static int getAngle(int H , int M) {
- if (H < 0 || M < 0 || H > 12 || M > 60) {
- System.out.println("Wrong input");
- return -1;
- }
- if (H == 12) {
- H = 0;
- }
- if (M == 60) {
- M = 0;
- H += 1;
- if (H > 12) {
- H -= 12;
- }
- }
- double hourAngle = 0.5 * (H * 60 + M);
- double minuteAngle = 6 * M;
- double angle = Math.abs(hourAngle - minuteAngle);
- angle = Math.min(360 - angle, angle);
- return (int) angle;
-}
-```
-
-### C++
-```cpp
-int getAngle(int H , int M) {
- if (H < 0 || M < 0 || H > 12 || M > 60) {
- cout << "Wrong input" << endl;
- return -1;
- }
- if (H == 12) {
- H = 0;
- }
- if (M == 60) {
- M = 0;
- H += 1;
- if (H > 12) {
- H -= 12;
- }
- }
- double hourAngle = 0.5 * (H * 60 + M);
- double minuteAngle = 6 * M;
- double angle = abs(hourAngle - minuteAngle);
- angle = min(360 - angle, angle);
- return static_cast(angle);
-}
-```
-
-### C
-```c
-int getAngle(int H, int M) {
- if (H < 0 || M < 0 || H > 12 || M > 60) {
- printf("Wrong input\n");
- return -1;
- }
- if (H == 12) {
- H = 0;
- }
- if (M == 60) {
- M = 0;
- H += 1;
- if (H > 12) {
- H -= 12;
- }
- }
- double hourAngle = 0.5 * (H * 60 + M);
- double minuteAngle = 6 * M;
- double angle = fabs(hourAngle - minuteAngle);
- angle = fmin(360 - angle, angle);
- return (int)angle;
-}
-```
-
-- **Time Complexity:** $O(1)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0078.md b/dsa-solutions/gfg-solutions/Basic/0078.md
deleted file mode 100644
index 0692050a2..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0078.md
+++ /dev/null
@@ -1,152 +0,0 @@
----
-id: sorted-matrix
-title: Sorted Matrix
-sidebar_label: 0078 Sorted Matrix
-tags:
-- Matrix
-- Sorting
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to sort elements of a matrix in non-decreasing order in various programming languages."
----
-
-## Problem
-
-Given an NxN matrix Mat. Sort all elements of the matrix.
-
-### Examples:
-**Example 1:**
-```
-Input:
-N=4
-Mat=[[10,20,30,40],
-[15,25,35,45]
-[27,29,37,48]
-[32,33,39,50]]
-Output:
-10 15 20 25
-27 29 30 32
-33 35 37 39
-40 45 48 50
-Explanation:
-Sorting the matrix gives this result.
-```
-
-**Example 2:**
-```
-Input:
-N=3
-Mat=[[1,5,3],[2,8,7],[4,6,9]]
-Output:
-1 2 3
-4 5 6
-7 8 9
-Explanation:
-Sorting the matrix gives this result.
-```
-
-### Your task:
-
-You don't need to read input or print anything. Your task is to complete the function **sortedMatrix()** which takes the integer N and the matrix Mat as input parameters and returns the sorted matrix.
-
-- **Expected Time Complexity:** $O(N^2LogN)$
-- **Expected Auxiliary Space:** $O(N^2)$
-
-### Constraints:
-
-- $1<=N<=1000$
-- $1<=Mat[i][j]<=10^5$
-
-## Solution
-### Python
-```python
-def sortedMatrix(self,N,Mat):
- temp = [0] * (N * N)
- k = 0
- for i in range(0, N) :
- for j in range(0, N) :
- temp[k] = Mat[i][j]
- k += 1
- temp.sort()
- k = 0
- for i in range(0, N) :
- for j in range(0, N) :
- Mat[i][j] = temp[k]
- k += 1
- return Mat
-```
-
-### Java
-```java
-int[][] sortedMatrix(int N, int Mat[][]) {
- int[] temp = new int[N * N];
- int k = 0;
- for (int i = 0; i < N; i++) {
- for (int j = 0; j < N; j++) {
- temp[k] = Mat[i][j];
- k++;
- }
- }
- Arrays.sort(temp);
- k = 0;
- for (int i = 0; i < N; i++) {
- for (int j = 0; j < N; j++) {
- Mat[i][j] = temp[k];
- k++;
- }
- }
- return Mat;
-}
-```
-
-### C++
-```cpp
-vector> sortedMatrix(int N, vector> Mat) {
- vector temp(N * N);
- int k = 0;
- for (int i = 0; i < N; i++) {
- for (int j = 0; j < N; j++) {
- temp[k++] = Mat[i][j];
- }
- }
- sort(temp.begin(), temp.end());
- k = 0;
- for (int i = 0; i < N; i++) {
- for (int j = 0; j < N; j++) {
- Mat[i][j] = temp[k++];
- }
- }
- return Mat;
-}
-```
-
-### C
-```c
-int compare(const void *a, const void *b) {
- return (*(int *)a - *(int *)b);
-}
-
-int** sortedMatrix(int N, int **Mat) {
- int *temp = (int *)malloc(N * N * sizeof(int));
- int k = 0;
- for (int i = 0; i < N; i++) {
- for (int j = 0; j < N; j++) {
- temp[k++] = Mat[i][j];
- }
- }
- qsort(temp, N * N, sizeof(int), compare);
- k = 0;
- for (int i = 0; i < N; i++) {
- for (int j = 0; j < N; j++) {
- Mat[i][j] = temp[k++];
- }
- }
- free(temp);
- return Mat;
-}
-```
-
-- **Time Complexity:** $O(N^2LogN)$
-- **Auxiliary Space:** $O(N^2)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0079.md b/dsa-solutions/gfg-solutions/Basic/0079.md
deleted file mode 100644
index 8b5694af2..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0079.md
+++ /dev/null
@@ -1,116 +0,0 @@
----
-id: check-for-subsequence
-title: Check for Subsequence
-sidebar_label: 0079 Check for Subsequence
-tags:
-- Strings
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to check if one string is a subsequence of another string in various programming languages."
----
-
-## Problem
-
-Given two strings A and B, find if A is a subsequence of B.
-
-### Examples:
-**Example 1:**
-```
-Input:
-A = AXY
-B = YADXCP
-Output: 0
-Explanation: A is not a subsequence of B as 'Y' appears before 'A'.
-```
-
-**Example 2:**
-```
-Input:
-A = gksrek
-B = geeksforgeeks
-Output: 1
-Explanation: A is a subsequence of B.
-```
-
-### Your task:
-
-You dont need to read input or print anything. Complete the function **isSubSequence()** which takes A and B as input parameters and returns a boolean value denoting if A is a subsequence of B or not.
-
-- **Expected Time Complexity:** $O(N)$, where N is length of string B
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1<= |A|,|B| <=10^4$
-
-## Solution
-### Python
-```python
-def isSubSequence(self, A, B):
- n, m = len(A), len(B)
- i, j = 0, 0
- while (i < n and j < m):
- if (A[i] == B[j]):
- i += 1
- j += 1
- return i == n
-```
-
-### Java
-```java
-boolean isSubSequence(String A, String B){
- int n = A.length();
- int m = B.length();
- int i = 0, j = 0;
- while (i < n && j < m) {
- if (A.charAt(i) == B.charAt(j)) {
- i++;
- }
- j++;
- }
- return i == n;
-}
-```
-
-### C++
-```cpp
-bool isSubSequence(string A, string B) {
- int n = A.length();
- int m = B.length();
- int i = 0, j = 0;
- while (i < n && j < m) {
- if (A[i] == B[j]) {
- i++;
- }
- j++;
- }
- return i == n;
-}
-```
-
-### C
-```c
-int isSubSequence(const char *A, const char *B) {
- int n = 0;
- while (A[n] != '\0') {
- n++;
- }
- int m = 0;
- while (B[m] != '\0') {
- m++;
- }
- int i = 0, j = 0;
- while (i < n && j < m) {
- if (A[i] == B[j]) {
- i++;
- }
- j++;
- }
- return i == n;
-}
-```
-
-- **Time Complexity:** $O(N)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0080.md b/dsa-solutions/gfg-solutions/Basic/0080.md
deleted file mode 100644
index 4e3557444..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0080.md
+++ /dev/null
@@ -1,110 +0,0 @@
----
-id: multiply-left-right-array-sum
-title: Multiply Left and Right Array Sum
-sidebar_label: 0080 Multiply Left and Right Array Sum
-tags:
-- Array
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to calculate the product of the left and right array sums for a given array in various programming languages."
----
-
-## Problem
-
-Pitsy needs help with the given task by her teacher. The task is to divide an array into two sub-array (left and right) containing n/2 elements each and do the sum of the subarrays and then multiply both the subarrays.
-
-**Note:** If the length of the array is odd then the right half will contain one element more than the left half.
-
-### Examples:
-**Example 1:**
-```
-Input : arr[ ] = {1, 2, 3, 4}
-Output : 21
-Explanation:
-Sum up an array from index 0 to 1 = 3
-Sum up an array from index 2 to 3 = 7
-Their multiplication is 21.
-```
-
-**Example 2:**
-```
-Input : arr[ ] = {1, 2}
-Output : 2
-```
-
-### Your task:
-
-This is a function problem. The input is already taken care of by the driver code. You only need to complete the function **multiply()** that takes an array (arr), sizeOfArray (n), and return the sum of the subarrays and then multiply both the subarrays. The driver code takes care of the printing.
-
-- **Expected Time Complexity:** $O(N)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1 ≤ T ≤ 100$
-- $1 ≤ N ≤ 1000$
-- $1 ≤ A[i] ≤ 100$
-
-## Solution
-### Python
-```python
-def multiply (arr, n) :
- sum_left, sum_right=0, 0
- for i in range(0, n//2):
- sum_left = sum_left+arr[i]
- for j in range(n//2, n):
- sum_right = sum_right+arr[j]
- result = sum_left*sum_right
- return result
-```
-
-### Java
-```java
-public static int multiply (int arr[], int n) {
- int sum_left=0, sum_right=0;
- for(int i=0; i 0$
-
-## Solution
-### Python
-```python
-def fractionalNodes(head,k):
- if (k <= 0 or head == None):
- return None
- fractionalNode = None
- i = 0
- temp = head
- while (temp != None):
- if (i % k == 0):
- if (fractionalNode == None):
- fractionalNode = head
- else:
- fractionalNode = fractionalNode.next
- i = i + 1
- temp = temp.next
- return fractionalNode.data
-```
-
-### Java
-```java
-public static int nknode(Node head, int k) {
- if (k <= 0 || head == null)
- return -1;
- Node fractionalNode = null;
- int i = 0;
- Node temp = head;
- while (temp != null) {
- if (i % k == 0) {
- if (fractionalNode == null) {
- fractionalNode = head;
- } else {
- fractionalNode = fractionalNode.next;
- }
- }
- i++;
- temp = temp.next;
- }
- if (fractionalNode != null) {
- return fractionalNode.data;
- }
- else {
- return -1;
- }
-}
-```
-
-### C++
-```cpp
-int fractional_node(struct Node *head, int k) {
- if (k <= 0 || head == nullptr)
- return -1;
- Node* fractionalNode = nullptr;
- int i = 0;
- Node* temp = head;
- while (temp != nullptr) {
- if (i % k == 0) {
- if (fractionalNode == nullptr) {
- fractionalNode = head;
- } else {
- fractionalNode = fractionalNode->next;
- }
- }
- i++;
- temp = temp->next;
- }
- if (fractionalNode != nullptr) {
- return fractionalNode->data;
- }
- else {
- return -1;
- }
-}
-```
-
-### C
-```c
-int fractional_node(struct Node *head, int k) {
- if (k <= 0 || head == NULL)
- return -1;
- struct Node *fractionalNode = NULL;
- int i = 0;
- struct Node *temp = head;
- while (temp != NULL) {
- if (i % k == 0) {
- if (fractionalNode == NULL) {
- fractionalNode = head;
- } else {
- fractionalNode = fractionalNode->next;
- }
- }
- i++;
- temp = temp->next;
- }
- if (fractionalNode != NULL) {
- return fractionalNode->data;
- }
- else {
- return -1;
- }
-}
-```
diff --git a/dsa-solutions/gfg-solutions/Basic/0083.md b/dsa-solutions/gfg-solutions/Basic/0083.md
deleted file mode 100644
index 7a099cf12..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0083.md
+++ /dev/null
@@ -1,158 +0,0 @@
----
-id: first-last-occurrences-x
-title: First and Last Occurrences of X
-sidebar_label: 0083 First and Last Occurrences of X
-tags:
-- Array
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to find the first and last occurrences of a specified element X in an array in various programming languages."
----
-
-## Problem
-
-Given a sorted array having N elements, find the indices of the first and last occurrences of an element X in the given array.
-
-**Note:** If the number X is not found in the array, return '-1' as an array.
-
-### Examples:
-**Example 1:**
-```
-Input:
-N = 4 , X = 3
-arr[] = { 1, 3, 3, 4 }
-Output:
-1 2
-Explanation:
-For the above array, first occurence of X = 3 is at index = 1 and last occurence is at index = 2.
-```
-
-**Example 2:**
-```
-Input:
-N = 4, X = 5
-arr[] = { 1, 2, 3, 4 }
-Output:
--1
-Explanation:
-As 5 is not present in the array, so the answer is -1.
-```
-
-### Your task:
-
-ou don't need to read input or print anything. Complete the function **firstAndLast()** that takes the array arr, its size N and the value X as input parameters and returns a list of integers containing the indices of first and last occurence of X.
-
-- **Expected Time Complexity:** $O(log(N))$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1<=N<=10^5$
-- $0 <= arr[i], X <= 10^9$
-
-## Solution
-### Python
-```python
-def firstAndLast(self, arr, n, x):
- first = -1
- last = -1
- for i in range(n):
- if x != arr[i]:
- continue
- if first == -1:
- first = i
- last = i
- if first != -1:
- return [first, last]
- else:
- return [-1]
-```
-
-### Java
-```java
-public ArrayList firstAndLast(int arr[], int n, int x){
- ArrayList result = new ArrayList<>();
- int first = -1;
- int last = -1;
- for (int i = 0; i < n; i++) {
- if (x != arr[i]) {
- continue;
- }
- if (first == -1) {
- first = i;
- }
- last = i;
- }
- if (first != -1) {
- result.add(first);
- result.add(last);
- }
- else {
- result.add(-1);
- }
- return result;
-}
-```
-
-### C++
-```cpp
-vector firstAndLast(vector &arr, int n, int x) {
- vector result;
- int first = -1;
- int last = -1;
- for (int i = 0; i < n; i++) {
- if (x != arr[i]) {
- continue;
- }
- if (first == -1) {
- first = i;
- }
- last = i;
- }
- if (first != -1) {
- result.push_back(first);
- result.push_back(last);
- }
- else {
- result.push_back(-1);
- }
- return result;
-}
-```
-
-### C
-```c
-int* firstAndLast(int *arr, int n, int x, int *resultSize) {
- int *result = (int *)malloc(2 * sizeof(int));
- if (result == NULL) {
- perror("Memory allocation failed");
- exit(EXIT_FAILURE);
- }
- int first = -1;
- int last = -1;
- for (int i = 0; i < n; i++) {
- if (x != arr[i]) {
- continue;
- }
- if (first == -1) {
- first = i;
- }
- last = i;
- }
- if (first != -1) {
- result[0] = first;
- result[1] = last;
- *resultSize = 2;
- }
- else {
- result[0] = -1;
- *resultSize = 1;
- }
- return result;
-}
-```
-
-- **Time Complexity:** $O(log(N))$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0084.md b/dsa-solutions/gfg-solutions/Basic/0084.md
deleted file mode 100644
index 093c0f3da..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0084.md
+++ /dev/null
@@ -1,79 +0,0 @@
----
-id: maximum-money
-title: Maximum Money
-sidebar_label: 0084 Maximum Money
-tags:
-- Problem Solving
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to calculate the maximum amount of money that can be collected from a sequence of houses where every house has some amount of money in various programming languages."
----
-
-## Problem
-
-Given a street of N houses (a row of houses), each house having K amount of money kept inside; now there is a thief who is going to steal this money but he has a constraint/rule that he cannot steal/rob two adjacent houses. Find the maximum money he can rob.
-
-### Examples:
-**Example 1:**
-```
-Input:
-N = 5 , K = 10
-Output:
-30
-Explanation:
-The Robber can rob from the first, third and fifth houses which will result in 30.
-```
-
-**Example 2:**
-```
-Input:
-N = 2 , K = 12
-Output:
-12
-Explanation:
-The Robber can only rob from the first or second which will result in 12.
-```
-
-### Your task:
-
-You don't need to read input or print anything. Your task is to complete the function **maximizeMoney()** which takes 2 Integers N and K as input and returns the answer.
-
-- **Expected Time Complexity:** $O(1)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1 <= N,K <= 10^3$
-
-## Solution
-### Python
-```python
-def maximizeMoney(self, N , K):
- return ((N+1)//2)*K;
-```
-
-### Java
-```java
-static int maximizeMoney(int N , int K) {
- return ((N+1)/2)*K;
-}
-```
-
-### C++
-```cpp
-int maximizeMoney(int N , int K) {
- return ((N+1)/2)*K;
-}
-```
-
-### C
-```c
-int maximizeMoney(int N , int K) {
- return ((N+1)/2)*K;
-}
-```
-
-- **Time Complexity:** $O(1)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0085.md b/dsa-solutions/gfg-solutions/Basic/0085.md
deleted file mode 100644
index b99f495d4..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0085.md
+++ /dev/null
@@ -1,99 +0,0 @@
----
-id: pattern-5
-title: Pattern 5
-sidebar_label: 0085 Pattern 5
-tags:
-- Patterns
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to printinverted pyramid in various programming languages."
----
-
-## Problem
-
-Geek is very fond of patterns. Once, his teacher gave him a pattern to solve. He gave Geek an integer n and asked him to build a pattern.
-
-Help Geek build a star pattern.
-
-### Examples:
-**Example 1:**
-```
-Input: 5
-Output:
-* * * * *
-* * * *
-* * *
-* *
-*
-```
-
-**Example 2:**
-```
-Input: 3
-Output:
-* * *
-* *
-*
-```
-
-### Your task:
-
-You don't need to input anything. Complete the function **printTriangle()** which takes an integer n as the input parameter and prints the pattern.
-
-- **Expected Time Complexity:** $O(n^2)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1<= n <= 100$
-
-## Solution
-### Python
-```python
-def printTriangle(self, N):
- for i in range(1, N + 1):
- for j in range(N, i - 1, -1):
- print("* ", end="")
- print()
-```
-
-### Java
-```java
-void printTriangle(int n) {
- for(int i = 1; i<=n; i++) {
- for(int j = n; j>=i; j--) {
- System.out.print("* ");
- }
- System.out.println();
- }
-}
-```
-
-### C++
-```cpp
-void printTriangle(int n) {
- for(int i = 1; i<=n; i++) {
- for(int j = n; j>=i; j--) {
- cout<<"* ";
- }
- cout<= i; j--) {
- printf("* ");
- }
- printf("\n");
- }
-}
-```
-
-- **Time Complexity:** $O(n^2)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0086.md b/dsa-solutions/gfg-solutions/Basic/0086.md
deleted file mode 100644
index 674300a5c..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0086.md
+++ /dev/null
@@ -1,114 +0,0 @@
----
-id: balanced-array
-title: Balanced Array
-sidebar_label: 0086 Balanced Array
-tags:
-- Array
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to check if an array is balanced in various programming languages."
----
-
-## Problem
-
-Given an array of even size N, task is to find minimum value that can be added to an element so that array become balanced. An array is balanced if the sum of the left half of the array elements is equal to the sum of right half.
-
-### Examples:
-**Example 1:**
-```
-Input:
-N = 4
-arr[] = {1, 5, 3, 2}
-Output: 1
-Explanation:
-Sum of first 2 elements is 1 + 5 = 6,
-Sum of last 2 elements is 3 + 2 = 5,
-To make the array balanced you can add 1.
-```
-
-**Example 2:**
-```
-Input:
-N = 6
-arr[] = { 1, 2, 1, 2, 1, 3 }
-Output: 2
-Explanation:
-Sum of first 3 elements is 1 + 2 + 1 = 4,
-Sum of last three elements is 2 + 1 + 3 = 6,
-To make the array balanced you can add 2.
-```
-
-### Your task:
-
-You don't need to read input or print anything. Your task is to complete the function **minValueToBalance()** which takes the array a[] and N as inputs and returns the desired result.
-
-- **Expected Time Complexity:** $O(N)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $2<=N<=10^7$
-- $N\%2==0$
-
-## Solution
-### Python
-```python
-def minValueToBalance(self,a,n):
- sum1 = 0
- for i in range( int(n / 2)):
- sum1 += a[i]
- sum2 = 0;
- i = int(n / 2)
- while i < n:
- sum2 += a[i]
- i = i + 1
- return abs(sum1 - sum2)
-```
-
-### Java
-```java
-long minValueToBalance(long a[] ,int n) {
- long sum1 = 0;
- for (int i = 0; i < n / 2; i++)
- sum1 += a[i];
- long sum2 = 0;
- for (int i = n/2; i < n; i++)
- sum2 += a[i];
- return Math.abs(sum1 - sum2);
-
-}
-```
-
-### C++
-```cpp
-int minValueToBalance(int a[], int n) {
- int sum1 = 0;
- for (int i = 0; i < n/2; i++)
- sum1 += a[i];
- int sum2 = 0;
- for (int i = n/2; i < n; i++)
- sum2 += a[i];
- return abs(sum1 - sum2);
-}
-```
-
-### C
-```c
-int minValueToBalance(int a[], int n) {
- int sum1 = 0;
- int sum2 = 0;
- for (int i = 0; i < n / 2; i++) {
- sum1 += a[i];
- }
- for (int i = n / 2; i < n; i++) {
- sum2 += a[i];
- }
- int balanceValue = abs(sum1 - sum2);
- return balanceValue;
-}
-```
-
-- **Time Complexity:** $O(N)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0087.md b/dsa-solutions/gfg-solutions/Basic/0087.md
deleted file mode 100644
index b34e0789d..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0087.md
+++ /dev/null
@@ -1,125 +0,0 @@
----
-id: product-max-first-min-second
-title: Product of Maximum in First Array and Minimum in Second
-sidebar_label: 0087 Product of Maximum in First Array and Minimum in Second
-tags:
-- Array
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to find the product of the maximum element in the first array and the minimum element in the second array in various programming languages."
----
-
-## Problem
-
-Given two arrays of A and B respectively of sizes N1 and N2, the task is to calculate the product of the maximum element of the first array and minimum element of the second array.
-
-### Examples:
-**Example 1:**
-```
-Input : A[] = {5, 7, 9, 3, 6, 2},
- B[] = {1, 2, 6, -1, 0, 9}
-Output : -9
-Explanation:
-The first array is 5 7 9 3 6 2.
-The max element among these elements is 9.
-The second array is 1 2 6 -1 0 9.
-The min element among these elements is -1.
-The product of 9 and -1 is 9*-1=-9.
-
-```
-
-**Example 2:**
-```
-Input : A[] = {0, 0, 0, 0},
- B[] = {1, -1, 2}
-Output : 0
-```
-
-### Your task:
-
-This is a function problem. The input is already taken care of by the driver code. You only need to complete the function **find_multiplication()** that takes an array of integer (A), another array of integer (B), size of array A(n), size of array B(m) and return the product of the max element of the first array and the minimum element of the second array. The driver code takes care of the printing.
-
-- **Expected Time Complexity:** $O(N+M)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1 ≤ N, M ≤ 10^6$
-- $-10^8 ≤ Ai, Bi ≤ 10^8$
-
-## Solution
-### Python
-```python
-def find_multiplication (self, arr, brr, n, m) :
- max_arr = arr[0]
- min_brr = brr[0]
- for i in range(1, n):
- if arr[i] > max_arr:
- max_arr = arr[i]
- for i in range(1, m):
- if brr[i] < min_brr:
- min_brr = brr[i]
- return max_arr * min_brr
-```
-
-### Java
-```java
-public static long find_multiplication (int arr[], int brr[], int n, int m) {
- int maxArr = arr[0];
- int minBrr = brr[0];
- for (int i = 1; i < n; ++i) {
- if (arr[i] > maxArr) {
- maxArr = arr[i];
- }
- }
- for (int i = 1; i < m; ++i) {
- if (brr[i] < minBrr) {
- minBrr = brr[i];
- }
- }
- return (long) maxArr * minBrr;
-}
-```
-
-### C++
-```cpp
-long long find_multiplication(int a[], int b[], int n, int m) {
- int max_a = INT_MIN;
- int min_b = INT_MAX;
- for (int i = 0; i < n; ++i) {
- if (a[i] > max_a) {
- max_a = a[i];
- }
- }
- for (int i = 0; i < m; ++i) {
- if (b[i] < min_b) {
- min_b = b[i];
- }
- }
- return (long long) max_a * min_b;
-}
-```
-
-### C
-```c
-long long find_multiplication(int a[], int b[], int n, int m) {
- int max_a = INT_MIN;
- int min_b = INT_MAX;
- for (int i = 0; i < n; ++i) {
- if (a[i] > max_a) {
- max_a = a[i];
- }
- }
- for (int i = 0; i < m; ++i) {
- if (b[i] < min_b) {
- min_b = b[i];
- }
- }
- return (long long) max_a * min_b;
-}
-```
-
-- **Time Complexity:** $O(N+M)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0088.md b/dsa-solutions/gfg-solutions/Basic/0088.md
deleted file mode 100644
index db1b8638a..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0088.md
+++ /dev/null
@@ -1,134 +0,0 @@
----
-id: find-the-fine
-title: Find the Fine
-sidebar_label: 0088 Find the Fine
-tags:
-- Problem Solving
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to calculate total fines based from the cars in various programming languages."
----
-
-## Problem
-
-Given an array of penalties fine[], an array of car numbers car[], and also the date. The task is to find the total fine which will be collected on the given date. Fine is collected from odd-numbered cars on even dates and vice versa.
-
-### Examples:
-**Example 1:**
-```
-Input:
-N = 4, date = 12
-car[] = {2375, 7682, 2325, 2352}
-fine[] = {250, 500, 350, 200}
-Output:
-600
-Explantion:
-The date is 12 (even), so we collect the fine from odd numbered cars. The odd numbered cars and the fines associated with them are as follows:
-2375 -> 250
-2325 -> 350
-The sum of the fines is 250+350 = 600
-```
-
-**Example 2:**
-```
-Input:
-N = 3, date = 8
-car[] = {2222, 2223, 2224}
-fine[] = {200, 300, 400}
-Output:
-300
-```
-
-### Your task:
-
-You don't need to read input or print anything. Your task is to complete the function **totalFine()** which takes the array car[] and fine[] its size N and an integer date as inputs and returns the total fine.
-
-- **Expected Time Complexity:** $O(N)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1<=N<=10^5$
-- $1 <= Car_i <= 10^5$
-- $1 <= Date <= 10^5$
-- $1 <= Fine_i <= 10^5$
-
-## Solution
-### Python
-```python
-def totalFine(self, n, date, car, fine):
- totalFine = 0
- for i in range(n):
- if date % 2 == 0:
- if car[i] % 2 != 0:
- totalFine += fine[i]
- else:
- if car[i] % 2 == 0:
- totalFine += fine[i]
- return totalFine
-```
-
-### Java
-```java
-public long totalFine( long n, long date, long car[], long fine[]) {
- long totalFine = 0;
- for (int i = 0; i < n; i++) {
- if (date % 2 == 0) { /
- if (car[i] % 2 != 0) {
- totalFine += fine[i];
- }
- }
- else {
- if (car[i] % 2 == 0) {
- totalFine += fine[i];
- }
- }
- }
- return totalFine;
-}
-```
-
-### C++
-```cpp
-long long int totalFine(int n, int date, int car[], int fine[]) {
- long long int totalFine = 0;
- for (int i = 0; i < n; i++) {
- if (date % 2 == 0) {
- if (car[i] % 2 != 0) {
- totalFine += fine[i];
- }
- }
- else {
- if (car[i] % 2 == 0) {
- totalFine += fine[i];
- }
- }
- }
- return totalFine;
-}
-```
-
-### C
-```c
-long long int totalFine(int n, int date, int car[], int fine[]) {
- long long int totalFine = 0;
- for (int i = 0; i < n; i++) {
- if (date % 2 == 0) {
- if (car[i] % 2 != 0) {
- totalFine += fine[i];
- }
- }
- else {
- if (car[i] % 2 == 0) {
- totalFine += fine[i];
- }
- }
- }
- return totalFine;
-}
-```
-
-- **Time Complexity:** $O(N)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0089.md b/dsa-solutions/gfg-solutions/Basic/0089.md
deleted file mode 100644
index 128bf5f79..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0089.md
+++ /dev/null
@@ -1,135 +0,0 @@
----
-id: ways-to-tile-a-floor
-title: Ways To Tile A Floor
-sidebar_label: 0089 Ways To Tile A Floor
-tags:
-- Dynamic Programming
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to calculate the number of ways to tile a floor of given dimensions using tiles of given sizes in various programming languages."
----
-
-## Problem
-
-Given a floor of dimensions 2 x n and tiles of dimensions 2 x 1, the task is to find the number of ways the floor can be tiled. A tile can either be placed horizontally i.e as a 1 x 2 tile or vertically i.e as 2 x 1 tile. return the answer with modulo $10^9+7$.
-
-### Examples:
-**Example 1:**
-```
-Input:
-n = 3
-Output: 3
-Explanation:
-We need 3 tiles to tile the boardof size 2 x 3.
-We can tile in following ways:
-1) Place all 3 tiles vertically.
-2) Place first tile verticallyand remaining 2 tiles horizontally.
-3) Place first 2 tiles horizontally and remaining tiles vertically.
-```
-
-**Example 2:**
-```
-Input:
-n = 4
-Output:5
-Explanation:
-For a 2 x 4 board, there are 5 ways
-1) All 4 vertical
-2) All 4 horizontal
-3) First 2 vertical, remaining 2 horizontal.
-4) First 2 horizontal, remaining2 vertical.
-5) Corner 2 vertical, middle 2 horizontal.
-```
-
-### Your task:
-
-You don't need to read input or print anything. Your task is to complete the function **numberOfWays()** which takes an Integer n as input and returns the answer.
-
-- **Expected Time Complexity:** $O(n)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1<=n<=10^5$
-
-## Solution
-### Python
-```python
-def numberOfWays(self, N):
- if N == 1:
- return 1
- elif N == 2:
- return 2
- MOD = 1000000007
- dp = [0] * (N + 1)
- dp[1] = 1
- dp[2] = 2
- for i in range(3, N + 1):
- dp[i] = (dp[i-1] + dp[i-2]) % MOD
- return dp[N]
-```
-
-### Java
-```java
-static int numberOfWays(int n) {
- if (n == 1) {
- return 1;
- }
- else if (n == 2) {
- return 2;
- }
- int MOD = 1000000007;
- int[] dp = new int[n + 1];
- dp[1] = 1;
- dp[2] = 2;
- for (int i = 3; i <= n; i++) {
- dp[i] = (dp[i - 1] + dp[i - 2]) % MOD;
- }
- return dp[n];
-}
-```
-
-### C++
-```cpp
-int numberOfWays(int n) {
- if (n == 1) {
- return 1;
- }
- else if (n == 2) {
- return 2;
- }
- const int MOD = 1000000007;
- int dp[n + 1];
- dp[1] = 1;
- dp[2] = 2;
- for (int i = 3; i <= n; i++) {
- dp[i] = (dp[i - 1] + dp[i - 2]) % MOD;
- }
- return dp[n];
-}
-```
-
-### C
-```c
-int numberOfWays(int n) {
- if (n == 1) {
- return 1;
- }
- else if (n == 2) {
- return 2;
- }
- const int MOD = 1000000007;
- int dp[n + 1];
- dp[1] = 1;
- dp[2] = 2;
- for (int i = 3; i <= n; i++) {
- dp[i] = (dp[i - 1] + dp[i - 2]) % MOD;
- }
- return dp[n];
-}
-```
-
-- **Time Complexity:** $O(n)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0090.md b/dsa-solutions/gfg-solutions/Basic/0090.md
deleted file mode 100644
index 271c62dbc..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0090.md
+++ /dev/null
@@ -1,131 +0,0 @@
----
-id: index-first-1-sorted-array
-title: Index of First 1 in a Sorted Array of 0s and 1s
-sidebar_label: 0090 Index of First 1 in a Sorted Array of 0s and 1s
-tags:
-- Array
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to find the index of the first occurrence of 1 in a sorted array of 0s and 1s in various programming languages."
----
-
-## Problem
-
-Given a sorted array consisting 0s and 1s. The task is to find the index of first 1 in the given array.
-
-NOTE: If one is not present then, return -1.
-
-### Examples:
-**Example 1:**
-```
-Input :
-arr[] = {0, 0, 0, 0, 0, 0, 1, 1, 1, 1}
-Output :
-6
-Explanation:
-The index of first 1 in the array is 6.
-```
-
-**Example 2:**
-```
-Input :
-arr[] = {0, 0, 0, 0}
-Output :
--1
-Explanation:
-1's are not present in the array.
-```
-
-### Your task:
-
-You don't need to read input or print anything. Your task is to complete the function **firstIndex()** which takes the array A[] and its size N as inputs and returns the index of first 1. If 1 is not present in the array then return -1.
-
-- **Expected Time Complexity:** $O(Log (N))$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1<=N<=10^6$
-- $0<=A_i<=1$
-
-## Solution
-### Python
-```python
-def firstIndex(self, arr, n):
- low = 0
- high = n - 1
- first_one_index = -1
- while low <= high:
- mid = (low + high) // 2
- if arr[mid] == 1:
- first_one_index = mid
- high = mid - 1
- else:
- low = mid + 1
- return first_one_index
-```
-
-### Java
-```java
-public long firstIndex(long arr[], long n) {
- long low = 0;
- long high = n - 1;
- long firstOneIndex = -1;
- while (low <= high) {
- long mid = (low + high) / 2;
- if (arr[(int)mid] == 1) {
- firstOneIndex = mid;
- high = mid - 1;
- }
- else {
- low = mid + 1;
- }
- }
- return firstOneIndex;
-}
-```
-
-### C++
-```cpp
-int firstIndex(int a[], int n) {
- int low = 0;
- int high = n - 1;
- int firstOneIndex = -1;
- while (low <= high) {
- int mid = low + (high - low) / 2;
- if (a[mid] == 1) {
- firstOneIndex = mid;
- high = mid - 1;
- }
- else {
- low = mid + 1;
- }
- }
- return firstOneIndex;
-}
-```
-
-### C
-```c
-int firstIndex(int a[], int n) {
- int low = 0;
- int high = n - 1;
- int firstOneIndex = -1;
- while (low <= high) {
- int mid = low + (high - low) / 2;
- if (a[mid] == 1) {
- firstOneIndex = mid;
- high = mid - 1;
- }
- else {
- low = mid + 1;
- }
- }
- return firstOneIndex;
-}
-```
-
-- **Time Complexity:** $O(Log (N))$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0091.md b/dsa-solutions/gfg-solutions/Basic/0091.md
deleted file mode 100644
index ff31182f9..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0091.md
+++ /dev/null
@@ -1,114 +0,0 @@
----
-id: remove-character
-title: Remove Character
-sidebar_label: 0091 Remove Character
-tags:
-- Strings
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to remove a characters from the first string that are present in the second string in various programming languages."
----
-
-## Problem
-
-Given two strings string1 and string2, remove those characters from first string(string1) which are present in second string(string2). Both the strings are different and contain only lowercase characters.
-
-**NOTE:** Size of first string is always greater than the size of second string( |string1| > |string2|).
-
-### Examples:
-**Example 1:**
-```
-Input:
-string1 = "computer"
-string2 = "cat"
-Output: "ompuer"
-Explanation: After removing characters(c, a, t) from string1 we get "ompuer".
-```
-
-**Example 2:**
-```
-Input:
-string1 = "occurrence"
-string2 = "car"
-Output: "ouene"
-Explanation: After removing characters (c, a, r) from string1 we get "ouene".
-```
-
-### Your task:
-
-You dont need to read input or print anything. Complete the function **removeChars()** which takes string1 and string2 as input parameter and returns the result string after removing characters from string2 from string1.
-
-- **Expected Time Complexity:** $O(|String1| + |String2|)$
-- **Expected Auxiliary Space:** $O(|String1|)$
-
-### Constraints:
-
-- $1 <= |String1| , |String2| <= 50$
-
-## Solution
-### Python
-```python
-def removeChars (ob, string1, string2):
- set_string2 = set(string2)
- result = []
- for char in string1:
- if char not in set_string2:
- result.append(char)
- return ''.join(result)
-```
-
-### Java
-```java
-static String removeChars(String string1, String string2){
- Set setString2 = new HashSet<>();
- for (char c : string2.toCharArray()) {
- setString2.add(c);
- }
- StringBuilder result = new StringBuilder();
- for (char c : string1.toCharArray()) {
- if (!setString2.contains(c)) {
- result.append(c);
- }
- }
- return result.toString();
-}
-```
-
-### C++
-```cpp
-string removeChars(string string1, string string2) {
- unordered_set setString2;
- for (char c : string2) {
- setString2.insert(c);
- }
- string result;
- for (char c : string1) {
- if (setString2.find(c) == setString2.end()) {
- result += c;
- }
- }
- return result;
-}
-```
-
-### C
-```c
-void removeChars(char *string1, char *string2) {
- int map[256] = {0};
- for (int i = 0; i < strlen(string2); ++i) {
- map[(int)string2[i]] = 1;
- }
- int index = 0;
- for (int i = 0; i < strlen(string1); ++i) {
- if (!map[(int)string1[i]]) {
- string1[index++] = string1[i];
- }
- }
- string1[index] = '\0';
-}
-```
-
-- **Time Complexity:** $O(|String1| + |String2|)$
-- **Auxiliary Space:** $O(|String1|)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0092.md b/dsa-solutions/gfg-solutions/Basic/0092.md
deleted file mode 100644
index 06898dc08..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0092.md
+++ /dev/null
@@ -1,108 +0,0 @@
----
-id: print-first-letter-every-word
-title: Print First Letter of Every Word in the String
-sidebar_label: 0092 Print First Letter of Every Word in the String
-tags:
-- Strings
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to print the first letter of every word in a given string in various programming languages."
----
-
-## Problem
-
-Given a string S, the task is to create a string with the first letter of every word in the string.
-
-### Examples:
-**Example 1:**
-```
-Input:
-S = "geeks for geeks"
-Output: gfg
-```
-
-**Example 2:**
-```
-Input:
-S = "bad is good"
-Output: big
-```
-
-### Your task:
-
-You don't need to read input or print anything. Your task is to complete the function **firstAlphabet()** which takes string S as input parameter and returns a string that contains the first letter of every word in S.
-
-- **Expected Time Complexity:** $O(|S|)$
-- **Expected Auxiliary Space:** $O(|S|)$
-
-### Constraints:
-
-- $1<=N<=10^5$
-- $0<=a[i]<=10^5$
-
-## Solution
-### Python
-```python
-def firstAlphabet(self, S):
- words = S.split()
- result = ""
- for word in words:
- result += word[0]
- return result
-```
-
-### Java
-```java
-String firstAlphabet(String S) {
- String[] words = S.split("\\s+");
- StringBuilder result = new StringBuilder();
- for (String word : words) {
- if (!word.isEmpty()) {
- result.append(word.charAt(0));
- }
- }
- return result.toString();
-}
-```
-
-### C++
-```cpp
-string firstAlphabet(string S) {
- istringstream iss(S);
- string word;
- string result;
- while (iss >> word) {
- result += word[0];
- }
- return result;
-}
-```
-
-### C
-```c
-char* firstAlphabet(char S[]) {
- char result[100000];
- int result_index = 0;
- int i = 0;
- while (S[i] != '\0') {
- while (isspace(S[i])) {
- i++;
- }
- if (!isspace(S[i])) {
- result[result_index++] = S[i];
- }
- while (S[i] != '\0' && !isspace(S[i])) {
- i++;
- }
- }
- result[result_index] = '\0';
- char* final_result = (char*) malloc(strlen(result) + 1);
- strcpy(final_result, result);
- return final_result;
-}
-```
-
-- **Time Complexity:** $O(|S|)$
-- **Auxiliary Space:** $O(|S|)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0093.md b/dsa-solutions/gfg-solutions/Basic/0093.md
deleted file mode 100644
index 009d0d146..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0093.md
+++ /dev/null
@@ -1,124 +0,0 @@
----
-id: replace-zeros-with-five
-title: Replace All 0's with 5
-sidebar_label: 0093 Replace All 0's with 5
-tags:
- - Python
- - Java
- - C++
- - C
-description: "This document covers methods to replace all occurrences of the digit 0 with the digit 5 in a given number in various programming languages."
----
-
-## Problem
-
-Given a number N. The task is to complete the function **convertFive()** which replaces all zeros in the number with 5 and returns the number.
-
-### Examples:
-
-**Example 1:**
-
-```
-Input
-2
-1004
-121
-
-Output
-1554
-121
-
-Explanation:
-Testcase 1: At index 1 and 2 there is 0 so we replace it with 5.
-Testcase 2: There is no,0 so output will remain the same.
-```
-
-### Input:
-
-The first line of input contains an integer T, denoting the number of test cases. Then T test cases follow.
-Each test case contains a single integer N denoting the number.
-
-### Output:
-
-The function will return an integer where all zero's are converted to 5.
-
-### Your task:
-
-Since this is a functional problem you don't have to worry about input, you just have to complete the function **convertFive()**.
-
-### Constraints:
-
-- $1 <= T <= 10^3$
-- $1 <= N <= 10^4$
-
-## Solution
-
-### Python
-
-```python
-def convertFive(self,n):
- num_str = str(n)
- result = ""
- for char in num_str:
- if char == '0':
- result += '5'
- else:
- result += char
- return int(result)
-```
-
-### Java
-
-```java
-public static int convertFive(int n){
- String numStr = String.valueOf(n);
- StringBuilder result = new StringBuilder();
- for (int i = 0; i < numStr.length(); i++) {
- char currentChar = numStr.charAt(i);
- if (currentChar == '0') {
- result.append('5');
- }
- else {
- result.append(currentChar);
- }
- }
- int convertedNumber = Integer.parseInt(result.toString());
- return convertedNumber;
-}
-```
-
-### C++
-
-```cpp
-int convertFive(int n) {
- string numStr = to_string(n);
- for (char &c : numStr) {
- if (c == '0') {
- c = '5';
- }
- }
- int convertedNumber = stoi(numStr);
- return convertedNumber;
-}
-```
-
-### C
-
-```c
-int convertFive(int n) {
- int result = 0;
- int position = 1;
- while (n != 0) {
- int digit = n % 10;
- if (digit == 0) {
- result += 5 * position;
- }
- else {
- result += digit * position;
- }
- n /= 10;
- position *= 10;
- }
- return result;
-}
-```
diff --git a/dsa-solutions/gfg-solutions/Basic/0094.md b/dsa-solutions/gfg-solutions/Basic/0094.md
deleted file mode 100644
index b0b7bd27e..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0094.md
+++ /dev/null
@@ -1,101 +0,0 @@
----
-id: pattern-6
-title: Pattern 6
-sidebar_label: 0094 Pattern 6
-tags:
-- Patterns
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to print triangle number in various programming languages."
----
-
-## Problem
-
-Geek is very fond of patterns. Once, his teacher gave him a pattern to solve. He gave Geek an integer n and asked him to build a pattern.
-
-Help Geek to build a pattern.
-
-### Examples:
-**Example 1:**
-```
-Input: 5
-
-Output:
-1 2 3 4 5
-1 2 3 4
-1 2 3
-1 2
-1
-```
-
-### Your task:
-
-You don't need to input anything. Complete the function **printTriangle()** which takes an integer n as the input parameter and print the pattern.
-
-### Constraints:
-
-- $1<= N <= 20$
-
-## Solution
-### Python
-```python
-def printTriangle(self, N):
- for i in range(N, 0, -1):
- for j in range(1, i + 1):
- if j == 1:
- print(j, end='')
- else:
- print(' ' + str(j), end='')
- print()
-```
-
-### Java
-```java
-void printTriangle(int n) {
- for (int i = n; i >= 1; i--) {
- for (int j = 1; j <= i; j++) {
- if (j == 1) {
- System.out.print(j);
- } else {
- System.out.print(" " + j);
- }
- }
- System.out.println();
- }
-}
-```
-
-### C++
-```cpp
-void printTriangle(int n) {
- for (int i = n; i >= 1; i--) {
- for (int j = 1; j <= i; j++) {
- if (j == 1) {
- cout << j;
- } else {
- cout << " " << j;
- }
- }
- cout << endl;
- }
-}
-```
-
-### C
-```c
-void printTriangle(int n) {
- int i, j;
- for (i = n; i >= 1; i--) {
- for (j = 1; j <= i; j++) {
- if (j == 1) {
- printf("%d", j);
- } else {
- printf(" %d", j);
- }
- }
- printf("\n");
- }
-}
-```
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0095.md b/dsa-solutions/gfg-solutions/Basic/0095.md
deleted file mode 100644
index b494cf23c..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0095.md
+++ /dev/null
@@ -1,90 +0,0 @@
----
-id: set-kth-bit
-title: Set kth Bit
-sidebar_label: 0095 Set kth Bit
-tags:
-- Bit Manipulation
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to set the kth bit of a number to 1 in various programming languages."
----
-
-## Problem
-
-Given a number N and a value K. From the right, set the Kth bit in the binary representation of N. The position of Least Significant Bit(or last bit) is 0, the second last bit is 1 and so on.
-
-### Examples:
-**Example 1:**
-```
-Input:
-N = 10
-K = 2
-Output:
-14
-Explanation:
-Binary representation of the given number 10 is: 1 0 1 0, number of bits in the binary reprsentation is 4. Thus 2nd bit from right is 0. The number after changing this bit to 1 is: 14(1 1 1 0).
-```
-
-**Example 2:**
-```
-Input:
-N = 15
-K = 3
-Output:
-15
-Explanation:
-The binary representation of the given number 15 is: 1 1 1 1, number of bits in the binary representation is 4. Thus 3rd bit from the right is 1. The number after changing this bit to 1 is 15(1 1 1 1).
-```
-
-### Your task:
-
-You don't need to read input or print anything. Your task is to complete the function **setKthBit()** which takes two integer N and K as input parameter and returns an integer after setting the K'th bit in N.
-
-- **Expected Time Complexity:** $O(1)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1<=N<=10^9$
-- $0 <= K < X$, where X is the number of bits in the binary representation of N.
-
-## Solution
-### Python
-```python
-def setKthBit(self, N, K):
- mask = 1 << K
- result = N | mask
- return result
-```
-
-### Java
-```java
-static int setKthBit(int N,int K){
- int mask = 1 << K;
- int result = N | mask;
- return result;
-}
-```
-
-### C++
-```cpp
-int setKthBit(int N, int K) {
- int mask = 1 << K;
- int result = N | mask;
- return result;
-}
-```
-
-### C
-```c
-int setKthBit(int N, int K) {
- int mask = 1 << K;
- int result = N | mask;
- return result;
-}
-```
-
-- **Time Complexity:** $O(1)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0096.md b/dsa-solutions/gfg-solutions/Basic/0096.md
deleted file mode 100644
index 23fb763a5..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0096.md
+++ /dev/null
@@ -1,142 +0,0 @@
----
-id: gcd-of-array
-title: GCD of Array
-sidebar_label: 0096 GCD of Array
-tags:
-- Array
-- Mathematics
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to calculate the Greatest Common Divisor (GCD) of an array of integers in various programming languages."
----
-
-## Problem
-
-Given an array of N positive integers, find GCD of all the array elements.
-
-### Examples:
-**Example 1:**
-```
-Input: N = 3, arr[] = {2, 4, 6}
-Output: 2
-Explanation: GCD of 2,4,6 is 2.
-```
-
-**Example 2:**
-```
-Input: N = 1, arr[] = {1}
-Output: 1
-Explanation: Greatest common divisor of all the numbers is 1.
-```
-
-### Your task:
-
-You don't need to read input or print anything. Complete the function **gcd()** which takes N and array as input parameters and returns the gcd.
-
-- **Expected Time Complexity:** $O(N logN)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1 ≤ N, arr[i] ≤ 10^5$
-
-## Solution
-### Python
-```python
-def gcd(self, n, arr):
- def compute_gcd(a, b):
- while b != 0:
- a, b = b, a % b
- return a
- if n == 1:
- return arr[0]
- current_gcd = arr[0]
- for i in range(1, n):
- current_gcd = compute_gcd(current_gcd, arr[i])
- if current_gcd == 1:
- return 1
- return current_gcd
-```
-
-### Java
-```java
-public int gcd(int N , int arr[]) {
- if (N == 1) {
- return arr[0];
- }
- int currentGCD = arr[0];
- for (int i = 1; i < N; i++) {
- currentGCD = computeGCD(currentGCD, arr[i]);
- if (currentGCD == 1) {
- return 1;
- }
- }
- return currentGCD;
-}
-
-private int computeGCD(int a, int b) {
- while (b != 0) {
- int temp = b;
- b = a % b;
- a = temp;
- }
- return a;
-}
-```
-
-### C++
-```cpp
-int gcd(int N, int arr[]) {
- if (N == 1) {
- return arr[0];
- }
- int currentGCD = arr[0];
- for (int i = 1; i < N; i++) {
- currentGCD = computeGCD(currentGCD, arr[i]);
- if (currentGCD == 1) {
- return 1;
- }
- }
- return currentGCD;
-}
-
-int computeGCD(int a, int b) {
- while (b != 0) {
- int temp = b;
- b = a % b;
- a = temp;
- }
- return a;
-}
-```
-
-### C
-```c
-int gcd(int N, int arr[]) {
- if (N == 1) {
- return arr[0];
- }
- int currentGCD = arr[0];
- for (int i = 1; i < N; i++) {
- currentGCD = computeGCD(currentGCD, arr[i]);
- if (currentGCD == 1) {
- return 1;
- }
- }
- return currentGCD;
-}
-
-int computeGCD(int a, int b) {
- while (b != 0) {
- int temp = b;
- b = a % b;
- a = temp;
- }
- return a;
-}
-```
-
-- **Time Complexity:** $O(N logN)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0097.md b/dsa-solutions/gfg-solutions/Basic/0097.md
deleted file mode 100644
index 490023741..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0097.md
+++ /dev/null
@@ -1,120 +0,0 @@
----
-id: greater-on-right-side
-title: Greater on Right Side
-sidebar_label: 0097 Greater on Right Side
-tags:
-- Array
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to replace every element with the greatest element in various programming languages."
----
-
-## Problem
-
-You are given an array Arr of size N. Replace every element with the next greatest element (greatest element on its right side) in the array. Also, since there is no element next to the last element, replace it with -1.
-
-### Examples:
-**Example 1:**
-```
-Input:
-N = 6
-Arr[] = {16, 17, 4, 3, 5, 2}
-Output:
-17 5 5 5 2 -1
-Explanation: For 16 the greatest element
-on its right is 17. For 17 it's 5.
-For 4 it's 5. For 3 it's 5. For 5 it's 2.
-For 2 it's -1(no element to its right).
-So the answer is 17 5 5 5 2 -1
-```
-
-**Example 2:**
-```
-Input:
-N = 4
-Arr[] = {2, 3, 1, 9}
-Output:
-9 9 9 -1
-Explanation: For each element except 9 the greatest element on its right is 9.
-So the answer is 9 9 9 -1
-```
-
-### Your task:
-
-You don't need to read input or print anything. Your task is to complete the function **nextGreatest()** which takes the array of integers arr and n as parameters and returns void. You need to change the array itself.
-
-- **Expected Time Complexity:** $O(N)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1<=N<=10^5$
-- $1 <= Arr_i <= 10^6$
-
-## Solution
-### Python
-```python
-def nextGreatest(self,arr, n):
- if n == 0:
- return
- max_right = -1
- for i in range(n-1, -1, -1):
- current = arr[i]
- arr[i] = max_right
- max_right = max(max_right, current)
- arr[n-1] = -1
-```
-
-### Java
-```java
-void nextGreatest(int arr[], int n) {
- if (n == 0) {
- return;
- }
- int maxRight = -1;
- for (int i = n - 1; i >= 0; i--) {
- int current = arr[i];
- arr[i] = maxRight;
- maxRight = Math.max(maxRight, current);
- }
- arr[n - 1] = -1;
-}
-```
-
-### C++
-```cpp
-void nextGreatest(int arr[], int n) {
- if (n == 0) {
- return;
- }
- int maxRight = -1;
- for (int i = n - 1; i >= 0; i--) {
- int current = arr[i];
- arr[i] = maxRight;
- maxRight = std::max(maxRight, current);
- }
- arr[n - 1] = -1;
-}
-```
-
-### C
-```c
-void nextGreatest(int arr[], int n) {
- if (n == 0) {
- return;
- }
-
- int maxRight = -1;
- for (int i = n - 1; i >= 0; i--) {
- int current = arr[i];
- arr[i] = maxRight;
- maxRight = (maxRight > current) ? maxRight : current;
- }
- arr[n - 1] = -1;
-}
-```
-
-- **Time Complexity:** $O(N)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0098.md b/dsa-solutions/gfg-solutions/Basic/0098.md
deleted file mode 100644
index 5259686f3..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0098.md
+++ /dev/null
@@ -1,106 +0,0 @@
----
-id: max-days-without-darkness
-title: Maximum Days Without Darkness
-sidebar_label: 0098 Maximum Days Without Darkness
-tags:
-- Array
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to find the maximum number of days the room remains illuminated using candles that reduce by 1 unit each day, given an array representing the sizes of the candles."
----
-
-## Problem
-
-Given an array arr[] of size N representing the size of candles which reduce by 1 unit each day. The room is illuminated using the given N candles. Find the maximum number of days the room is without darkness.
-
-### Examples:
-**Example 1:**
-```
-Input: N = 3, arr[] = {1,1,2}
-Output: 2
-Explanation: The candles' length reduce by 1 in 1 day. So, at the end of day 1:
-Sizes would be 0 0 1, So, at end of day 2: Sizes would be 0 0 0. This means the room was illuminated for 2 days.
-```
-
-**Example 2:**
-```
-Input: N = 5, arr[] = {2,3,4,2,1}
-Output: 4
-```
-
-### Your task:
-
-This is a function problem. You don't need to take any input, as it is already accomplished by the driver code. You just need to complete the function **maxDays()** that takes array A[] and integer N as parameters and returns the desired output.
-
-- **Expected Time Complexity:** $O(N)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1<=N<=10^6$
-
-## Solution
-### Python
-```python
-def maxDays(self, arr, n):
- if n == 0:
- return 0
- max_initial_height = 0
- for height in arr:
- if height > max_initial_height:
- max_initial_height = height
- return max_initial_height
-```
-
-### Java
-```java
-long maxDays(long arr[], int n){
- if (n == 0) {
- return 0;
- }
- long maxInitialHeight = 0;
- for (int i = 0; i < n; i++) {
- if (arr[i] > maxInitialHeight) {
- maxInitialHeight = arr[i];
- }
- }
- return maxInitialHeight;
-}
-```
-
-### C++
-```cpp
-int maxDays(int arr[],int n){
- if (n == 0) {
- return 0;
- }
- long maxInitialHeight = 0;
- for (int i = 0; i < n; i++) {
- if (arr[i] > maxInitialHeight) {
- maxInitialHeight = arr[i];
- }
- }
- return maxInitialHeight;
-}
-```
-
-### C
-```c
-int maxDays(int arr[], int n) {
- if (n == 0) {
- return 0;
- }
- long maxInitialHeight = 0;
- for (int i = 0; i < n; i++) {
- if (arr[i] > maxInitialHeight) {
- maxInitialHeight = arr[i];
- }
- }
- return maxInitialHeight;
-}
-```
-
-- **Time Complexity:** $O(N)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0099.md b/dsa-solutions/gfg-solutions/Basic/0099.md
deleted file mode 100644
index 6f3779fd5..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0099.md
+++ /dev/null
@@ -1,123 +0,0 @@
----
-id: pattern-10
-title: Pattern 10
-sidebar_label: 0099 Pattern 10
-tags:
-- Patterns
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to print a pattern in various programming languages."
----
-
-## Problem
-
-Geek is very fond of patterns. Once, his teacher gave him a pattern to solve. He gave Geek an integer n and asked him to build a pattern.
-
-Help Geek to build a star pattern.
-
-### Examples:
-**Example 1:**
-```
-Input: 5
-Output:
-*
-* *
-* * *
-* * * *
-* * * * *
-* * * *
-* * *
-* *
-*
-```
-
-**Example 2:**
-```
-Input: 3
-Output:
-*
-* *
-* * *
-* *
-*
-```
-
-### Your task:
-
-You don't need to input anything. Complete the function **printTriangle()** which takes an integer n as the input parameter and prints the pattern.
-
-- **Expected Time Complexity:** $O(n^2)$
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1 <= n <= 1000$
-
-## Solution
-### Python
-```python
-def printTriangle(self, n):
- for i in range(1, n+1):
- print('* ' * i)
- for i in range(n-1, 0, -1):
- print('* ' * i)
-```
-
-### Java
-```java
-void printTriangle(int n) {
- for (int i = 1; i <= n; i++) {
- for (int j = 1; j <= i; j++) {
- System.out.print("* ");
- }
- System.out.println();
- }
- for (int i = n - 1; i >= 1; i--) {
- for (int j = 1; j <= i; j++) {
- System.out.print("* ");
- }
- System.out.println();
- }
-}
-```
-
-### C++
-```cpp
-void printTriangle(int n) {
- for (int i = 1; i <= n; i++) {
- for (int j = 1; j <= i; j++) {
- std::cout << "* ";
- }
- std::cout << std::endl;
- }
- for (int i = n - 1; i >= 1; i--) {
- for (int j = 1; j <= i; j++) {
- std::cout << "* ";
- }
- std::cout << std::endl;
- }
-}
-```
-
-### C
-```c
-void printTriangle(int n) {
- for (int i = 1; i <= n; i++) {
- for (int j = 1; j <= i; j++) {
- printf("* ");
- }
- printf("\n");
- }
- for (int i = n - 1; i >= 1; i--) {
- for (int j = 1; j <= i; j++) {
- printf("* ");
- }
- printf("\n");
- }
-}
-```
-
-- **Time Complexity:** $O(n^2)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0100.md b/dsa-solutions/gfg-solutions/Basic/0100.md
deleted file mode 100644
index d4b26ba0d..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0100.md
+++ /dev/null
@@ -1,107 +0,0 @@
----
-id: factorial-numbers-less-than-n
-title: Find All Factorial Numbers Less Than or Equal to n
-sidebar_label: 0100 Find All Factorial Numbers Less Than or Equal to n
-tags:
-- Mathematics
-- Python
-- Java
-- C++
-- C
-description: "This document covers methods to find all factorial numbers less than or equal to a given number n in various programming languages."
----
-
-## Problem
-
-A number n is called a factorial number if it is the factorial of a positive integer. For example, the first few factorial numbers are 1, 2, 6, 24, 120,
-
-Given a number n, the task is to return the list/vector of the factorial numbers smaller than or equal to n.
-
-### Examples:
-**Example 1:**
-```
-Input: n = 3
-Output: 1 2
-Explanation: The first factorial number is 1 which is less than equal to n. The second number is 2 which is less than equal to n,but the third factorial number is 6 which is greater than n. So we print only 1 and 2.
-```
-
-**Example 2:**
-```
-Input: n = 6
-Output: 1 2 6
-Explanation: The first three factorial numbers are less than equal to n but the fourth factorial number 24 is greater than n. So we print only first three factorial numbers.
-```
-
-### Your task:
-
-You don't need to read input or print anything. Your task is to complete the function **rotate()** which takes the array **A[]** and its size **N** as inputs and modify the array in place.
-
-- **Expected Time Complexity:** $O(K)$, Where K is the number of factorial numbers.
-- **Expected Auxiliary Space:** $O(1)$
-
-### Constraints:
-
-- $1<=n<=10^{18}$
-
-## Solution
-### Python
-```python
-def factorialNumbers(self, n):
- factorial = 1
- factorials = []
- i = 1
- while factorial <= n:
- factorials.append(factorial)
- i += 1
- factorial *= i
-
- return factorials
-```
-
-### Java
-```java
-static ArrayList factorialNumbers(long n) {
- ArrayList factorials = new ArrayList<>();
- long factorial = 1;
- int i = 1;
- while (factorial <= n) {
- factorials.add(factorial);
- i++;
- factorial *= i;
- }
- return factorials;
-}
-```
-
-### C++
-```cpp
-vector factorialNumbers(long long n) {
- vector factorials;
- long long factorial = 1;
- int i = 1;
- while (factorial <= n) {
- factorials.push_back(factorial);
- i++;
- factorial *= i;
- }
- return factorials;
-}
-```
-
-### C
-```c
-long long factorialNumbers(long long n, long long *out, int *out_size) {
- long long factorial = 1;
- int i = 1;
- *out_size = 0;
- while (factorial <= n) {
- out[(*out_size)++] = factorial;
- i++;
- factorial *= i;
- }
- return factorial;
-}
-```
-
-- **Time Complexity:** $O(K)$
-- **Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0101.md b/dsa-solutions/gfg-solutions/Basic/0101.md
deleted file mode 100644
index b4804130b..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0101.md
+++ /dev/null
@@ -1,239 +0,0 @@
----
-id: cpp-classes-introduction
-title: C++ Classes Introduction
-sidebar_label: 0101 C++ Classes Introduction
-
-tags:
-- CPP
-- OOP
-- Classes
-
-description: "This is a solution to the C++ Classes Introduction problem on GeeksForGeeks."
----
-
-## Problem Description
-Create class named `CollegeCourse` with fields courseID, grade, credits, gradePoints and honorPoints. Calculate honorpoints as the product of gradepoints and credits. GradePoints are calculated as (A-10),(B-9),(C-8),(D-7),(E-6) & (F-5).
-Class CollegeCourse contains following functions:
-1. set_CourseId( string CID): sets courseId
-2. set_Grade(char g): sets grade equal to g
-3. set_Credit(int cr): sets credits equal to cr
-4.calculateGradePoints(char g): returns gradePoint(int)
-5. calculateHonorPoints(int gp,int cr): return honorPoint (float)
-6. display(): prints gradePoint and honorPoint
-
-### Examples
-
-**Example 1:**
-```
-Input:
-The first line contains an integer T, the number of test cases. For each test case, there is a string CID, denoting Course ID, a character g, denoting the grade and an integer cr, denoting the credits of the course.
-
-Output:
-For each test case, the output is the gradePoints & the honorPoints of that course.
-```
-
-
-### Constraints
-- `1 ≤ T ≤ 100`
-- `0 ≤ CID.length() ≤ 100`
-- `'A' <= g <= 'F'`
-- `1 <= cr <= 4`
-
-Note: Grades are not case sensitive.
-
-### Example
-
-**Example 1:**
-```
-Input:
-2
-CSN-206 A 4
-ECE-500 d 3
-
-Output:
-10 40
-7 21
-```
-
-
-## Solution for C++ Classes Introduction
-
-### Code in Different Languages
-
-
-
-
-
-
- ```python
- class CollegeCourse:
- def __init__(self):
- self.courseID = ""
- self.gp = 0
- self.grade = ''
- self.credits = 0
-
- def set_CourseId(self, courseID):
- self.courseID = courseID
-
- def set_Grade(self, grade):
- self.grade = grade
-
- def set_Credit(self, credits):
- self.credits = credits
-
- def calculateGradePoints(self, grade):
- grade = grade.upper()
- if grade == 'A':
- self.gp = 10
- elif grade == 'B':
- self.gp = 9
- elif grade == 'C':
- self.gp = 8
- elif grade == 'D':
- self.gp = 7
- elif grade == 'E':
- self.gp = 6
- elif grade == 'F':
- self.gp = 5
- return self.gp
-
- def calculateHonorPoints(self, gp, credits):
- return gp * credits
-
- def display(self):
- print(self.calculateGradePoints(self.grade), self.calculateHonorPoints(self.gp, self.credits))
-
-# Example usage:
-course = CollegeCourse()
-course.set_CourseId("CS101")
-course.set_Grade("A")
-course.set_Credit(4)
-course.display() #
- ```
-
-
-
-
-
-
- ```
- public class CollegeCourse {
- private String courseID;
- private int gp;
- private char grade;
- private int credits;
-
- public void setCourseId(String courseID) {
- this.courseID = courseID;
- }
-
- public void setGrade(char grade) {
- this.grade = grade;
- }
-
- public void setCredit(int credits) {
- this.credits = credits;
- }
-
- public int calculateGradePoints(char grade) {
- grade = Character.toUpperCase(grade);
- switch (grade) {
- case 'A':
- gp = 10;
- break;
- case 'B':
- gp = 9;
- break;
- case 'C':
- gp = 8;
- break;
- case 'D':
- gp = 7;
- break;
- case 'E':
- gp = 6;
- break;
- case 'F':
- gp = 5;
- break;
- }
- return gp;
- }
-
- public int calculateHonorPoints(int gp, int credits) {
- return gp * credits;
- }
-
- public void display() {
- System.out.println(calculateGradePoints(grade) + " " + calculateHonorPoints(gp, credits));
- }
-
- public static void main(String[] args) {
- CollegeCourse course = new CollegeCourse();
- course.setCourseId("CS101");
- course.setGrade('A');
- course.setCredit(4);
- course.display(); // Output: 10 40
- }
- }
- ```
-
-
-
-
-
-
- ```cpp
- class CollegeCourse
- {
- //your code here
- private:
- string courseID;
- int gp;
- char grade;
- int credits;
-
- public:
- void set_CourseId(string courseID){
- this->courseID = courseID;
- }
-
- void set_Grade(char grade){
- this->grade = grade;
- }
-
- void set_Credit(int credits){
- this->credits = credits;
- }
-
- int calculateGradePoints(char grade){
- grade = toupper(grade);
- switch(grade){
- case 'A': gp = 10; break;
- case 'B': gp = 9; break;
- case 'C': gp = 8; break;
- case 'D': gp = 7; break;
- case 'E': gp = 6; break;
- case 'F': gp = 5; break;
- }
- return gp;
- }
-
- int calculateHonorPoints(int gp, int credits){
- return gp * credits;
- }
-
- void display(){
- cout<
-
-
-## References
-
-- **GeekForGeeks Problem**: [C++ Classes Introduction](https://www.geeksforgeeks.org/problems/c-classes-introduction/0)
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0102.md b/dsa-solutions/gfg-solutions/Basic/0102.md
deleted file mode 100644
index 34a2fc75e..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0102.md
+++ /dev/null
@@ -1,149 +0,0 @@
----
-id: maximum-in-struct-array
-title: Maximum in Struct Array
-sidebar_label: 0102 Maximum in Struct Array
-
-tags:
-- CPP
-- Arrays
-- Mathematical
-
-description: "This is a solution to the Maximum in Struct Array problem on GeeksForGeeks."
----
-
-## Problem Description
-Given a struct array of type **height**, having two elements **feet** and **inches**. Find the `maximum height` among n heights, where height is calculated `sum of feet and inches` after converting `feet` into `inches`.
-
-### Examples
-
-**Example 1:**
-```
-Input:
-n = 2 h1 -> {1 2} h2 -> {2 1}
-
-Output:
-25
-
-Explanation:
-(1, 2) and (2, 1) are respective given heights.After converting both heigths in to inches,we get 14 and 25 as respective heights.So, 25 is the maximum height.
-```
-
-**Example 2:**
-```
-Input:
-n = n = 3 h1 -> {3 2} h2 -> {2 3} h3 ->{1 2}
-
-Output:
-38
-
-Explanation:
-(3, 2), (2,3) and (1, 2) are respective given heights.After converting both heigths in to inches,we get 38,27 and 14 as respective heights.So, 38 is the maximum height.
-```
-
-
-### Constraints
-- `1 ≤ n ≤ 10^5`
-
-
-## Solution for Maximum in Struct Array
-
-### Code in Different Languages
-
-
-
-
-
-
- ```python
- class Height:
- def __init__(self, feet, inches):
- self.feet = feet
- self.inches = inches
-
- def findMax(arr, n):
- ans = [0] * n
- max_height = 0
-
- for i in range(n):
- ans[i] = arr[i].feet * 12 + arr[i].inches
-
- for height in ans:
- if height > max_height:
- max_height = height
-
- return max_height
-
- # Example usage
- arr = [Height(5, 9), Height(6, 2), Height(5, 11)]
- n = len(arr)
- print(findMax(arr, n)) # Output: 74 (6 feet 2 inches)
- ```
-
-
-
-
-
-
- ```
- class Height {
- int feet;
- int inches;
-
- public Height(int feet, int inches) {
- this.feet = feet;
- this.inches = inches;
- }
- }
-
- public class Main {
- public static int findMax(Height[] arr, int n) {
- int[] ans = new int[n];
- int max = 0;
-
- for (int i = 0; i < n; i++) {
- ans[i] = arr[i].feet * 12 + arr[i].inches;
- }
-
- for (int i = 0; i < n; i++) {
- if (ans[i] > max) {
- max = ans[i];
- }
- }
-
- return max;
- }
-
- public static void main(String[] args) {
- Height[] arr = {new Height(5, 9), new Height(6, 2), new Height(5, 11)};
- int n = arr.length;
- System.out.println(findMax(arr, n)); // Output: 74 (6 feet 2 inches)
- }
- }
- ```
-
-
-
-
-
-
- ```cpp
- int findMax(Height arr[], int n) {
- // Code here
- int ans[n];
- int max = 0;
- for(int i=0;imax) max=ans[i];
- }
- return max;
- }
- ```
-
-
-
-
-## References
-
-- **GeekForGeeks Problem**: [Maximum in Struct Array](https://www.geeksforgeeks.org/problems/maximum-in-struct-array/0)
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0103.md b/dsa-solutions/gfg-solutions/Basic/0103.md
deleted file mode 100644
index 8ae90dcb9..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0103.md
+++ /dev/null
@@ -1,144 +0,0 @@
----
-id: stack-designer
-title: Stack Designer
-sidebar_label: 0103 Stack Designer
-
-tags:
-- CPP
-- Stack
-- STL
-- Data structures
-
-description: "This is a solution to the Stack Designer problem on GeeksForGeeks."
----
-
-## Problem Description
-You are given an array **arr** of size **N**. You need to push the elements of the array into a stack and then print them while popping.
-
-### Examples
-
-**Example 1:**
-```
-Input:
-n = 5
-arr = {1 2 3 4 5}
-
-Output:
-5 4 3 2 1
-```
-
-**Example 2:**
-```
-Input:
-n = 7
-arr = {1 6 43 1 2 0 5}
-
-Output:
-5 0 2 1 43 6 1
-```
-
-
-### Constraints
-- `1 ≤ Ai ≤ 10^7`
-
-
-## Solution for Stack Designer
-
-### Code in Different Languages
-
-
-
-
-
-
- ```python
- class Stack:
- def __init__(self):
- self.stack = []
-
- def push(self, arr):
- for item in arr:
- self.stack.append(item)
- return self.stack
-
- def pop_all(self):
- while self.stack:
- print(self.stack.pop(), end=" ")
-
- # Example usage
- arr = [1, 2, 3, 4, 5]
- n = len(arr)
- s = Stack()
- s.push(arr)
- s.pop_all()
- # Output: 5 4 3 2 1
- ```
-
-
-
-
-
-
- ```
- import java.util.Stack;
-
- public class Main {
- public static Stack _push(int arr[], int n) {
- Stack s = new Stack<>();
- for (int i = 0; i < n; ++i) {
- s.push(arr[i]);
- }
- return s;
- }
-
- public static void _pop(Stack s) {
- while (!s.empty()) {
- System.out.print(s.pop() + " ");
- }
- }
-
- public static void main(String[] args) {
- int[] arr = {1, 2, 3, 4, 5};
- int n = arr.length;
- Stack s = _push(arr, n);
- _pop(s);
- // Output: 5 4 3 2 1
- }
- }
- ```
-
-
-
-
-
-
- ```cpp
- stack_push(int arr[],int n)
- {
- //return a stack with all elements of arr inserted in it
- stack s;
- for (int i = 0; i < n; ++i) {
- s.push(arr[i]);
- }
- return s;
- }
-
- /* _pop function to print elements of the stack
- remove as well
- */
- void _pop(stack s)
- {
- //print top and pop for each element until it becomes empty
- while (!s.empty()) {
- cout << s.top() << " ";
- s.pop();
- }
- }
- ```
-
-
-
-
-## References
-
-- **GeekForGeeks Problem**: [Stack Designer](https://www.geeksforgeeks.org/problems/stack-designer/0)
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0104.md b/dsa-solutions/gfg-solutions/Basic/0104.md
deleted file mode 100644
index 3436f9feb..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0104.md
+++ /dev/null
@@ -1,158 +0,0 @@
----
-id: parties-and-seats
-title: Parties and Seats
-sidebar_label: 0104 Parties and Seats
-
-tags:
-- CPP
-- Map
-- STL
-- Data structures
-
-description: "This is a solution to the Parties and Seats problem on GeeksForGeeks."
----
-
-## Problem Description
-Given two arrays, one is array of political parties namely - **party**, and their corresponding array of **seats** received - seats. You have to print the **political parties in lexicographical sorted order** along with their seats, and **highest seats received by the party.**
-
-**Input Format:**
-The first line of input contains **T** denoting the number of testcases. T testcases follow. Each testcase contains three lines of input. The first line contains number of parties **N**. The second line contains the **names** of the parties. The third line contains the **votes** corresponding to each party.
-
-**Output Format:**
-For each testcase, in a new line, print the required answer.
-
-**User Task:**
-Your task is to complete the function **Election2019(party, seats, n)** which accepts three arguments and prints the required result.
-
-### Examples
-
-**Example 1:**
-```
-Input:
-1
-7
-A B C D E F G
-90 150 33 23 17 500 2
-
-Output:
-A 90
-B 150
-C 33
-D 23
-E 17
-F 500
-G 2
-500
-```
-
-### Constraints
-- `1 ≤ T ≤ 100`
-- `1 ≤ N ≤ 26`
-- `1 ≤ seats ≤ 543`
-
-
-## Solution for Parties and Seats
-
-### Code in Different Languages
-
-
-
-
-
-
- ```python
- def Election2019(party, seats, n):
- # Combine party and seats into a list of tuples
- v = [(party[i], seats[i]) for i in range(n)]
-
- # Sort the list by party name
- v.sort(key=lambda x: x[0])
-
- # Find the maximum seats
- max_seats = max(v, key=lambda x: x[1])[1]
-
- # Print the sorted party and seats
- for p, s in v:
- print(f"{p} {s}")
-
- # Print the maximum seats
- print(max_seats)
-
- # Example usage
- party = ['A', 'B', 'C', 'A', 'B']
- seats = [10, 20, 30, 15, 25]
- n = len(party)
- Election2019(party, seats, n)
- ```
-
-
-
-
-
-
- ```
- import java.util.*;
-
- public class Main {
- public static void Election2019(char[] party, int[] seats, int n) {
- // Create a list of pairs
- List> v = new ArrayList<>();
- for (int i = 0; i < n; i++) {
- v.add(new AbstractMap.SimpleEntry<>(String.valueOf(party[i]), seats[i]));
- }
-
- // Sort the list by party name
- v.sort(Comparator.comparing(AbstractMap.SimpleEntry::getKey));
-
- // Find the maximum seats
- int max_seats = Collections.max(v, Comparator.comparing(AbstractMap.SimpleEntry::getValue)).getValue();
-
- // Print the sorted party and seats
- for (AbstractMap.SimpleEntry entry : v) {
- System.out.println(entry.getKey() + " " + entry.getValue());
- }
-
- // Print the maximum seats
- System.out.println(max_seats);
- }
-
- public static void main(String[] args) {
- char[] party = {'A', 'B', 'C', 'A', 'B'};
- int[] seats = {10, 20, 30, 15, 25};
- int n = party.length;
- Election2019(party, seats, n);
- }
- }
- ```
-
-
-
-
-
-
- ```cpp
- void Election2019(char party[], int seats[], int n)
- {
- //Your code here
- vector> v;
- for (int i = 0; i < n; i++) {
- string s(1, party[i]);
- v.push_back({s, seats[i]});
- }
- sort(v.begin(), v.end());
- int max_seats = max_element(v.begin(), v.end(), [](pair a, pair b) {
- return a.second < b.second;
- })->second;
- for (auto x : v) {
- cout << x.first << " " << x.second << endl;
- }
- cout << max_seats << endl;
- }
- ```
-
-
-
-
-## References
-
-- **GeekForGeeks Problem**: [Parties and Seats](https://www.geeksforgeeks.org/problems/parties-and-seats/0)
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Basic/0105.md b/dsa-solutions/gfg-solutions/Basic/0105.md
deleted file mode 100644
index 3e42dedd4..000000000
--- a/dsa-solutions/gfg-solutions/Basic/0105.md
+++ /dev/null
@@ -1,110 +0,0 @@
----
-id: celsius-to-fahrenheit-conversion
-title: Celsius to Fahrenheit Conversion
-sidebar_label: 0105 Celsius to Fahrenheit Conversion
-
-tags:
-- CPP
-- Mathematical
-- Algorithms
-
-description: "This is a solution to the Celsius to Fahrenheit Conversion problem on GeeksForGeeks."
----
-
-## Problem Description
-Given a temperature in celsius **C**. You have to convert it in **Fahrenheit**.
-
-### Examples
-
-**Example 1:**
-```
-Input:
-C = 32
-
-Output:
-89.60
-
-Explanation:
-For 32 degree C temperature
-in farenheit = 89.60
-```
-
-**Example 2:**
-```
-Input:
-C = 25
-
-Output:
-77.00
-
-Explanation:
-For 25 degree C temperature
-in farenheit = 77.
-```
-
-### Constraints
-- `1 ≤ C ≤ 100000`
-
-
-## Solution for Celsius to Fahrenheit Conversion
-
-### Code in Different Languages
-
-
-
-
-
-
- ```python
- class Solution:
- def celciusToFahrenheit(self, C: int) -> float:
- # code here
- return C * 9 / 5 + 32
-
- # Example usage
- solution = Solution()
- print(solution.celciusToFahrenheit(0)) # 32.0
- print(solution.celciusToFahrenheit(100)) # 212.0
- ```
-
-
-
-
-
-
- ```
- class Solution {
- public double celciusToFahrenheit(int C) {
- // code here
- return (double) C * 9 / 5 + 32;
- }
-
- public static void main(String[] args) {
- Solution solution = new Solution();
- System.out.println(solution.celciusToFahrenheit(0)); // 32.0
- System.out.println(solution.celciusToFahrenheit(100)); // 212.0
- }
- }
- ```
-
-
-
-
-
-
- ```cpp
- class Solution{
- public:
- double celciusToFahrenheit(int C){
- //code here
- return (double) C * 9 / 5 + 32;
- }
- };
- ```
-
-
-
-
-## References
-
-- **GeekForGeeks Problem**: [Celsius to Fahrenheit Conversion](https://www.geeksforgeeks.org/problems/celsius-to-fahrenheit-conversion5212/1)
diff --git a/dsa-solutions/gfg-solutions/Easy problems/Arithmetic-Number.md b/dsa-solutions/gfg-solutions/Easy problems/Arithmetic-Number.md
deleted file mode 100644
index 689b508f8..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/Arithmetic-Number.md
+++ /dev/null
@@ -1,146 +0,0 @@
----
-id: arithmetic-number
-title: Arithmetic Number
-sidebar_label: Arithmetic-Number
-tags:
- - Intermediate
- - Array
- - Mathematical
- - GeeksforGeeks
- - CPP
- - Python
- - DSA
-description: "This tutorial covers the solution to the Find the Arithmetic Number problem from the GeeksforGeeks."
----
-## Problem Description
-
-Given three integers `'A'` denoting the first term of an arithmetic sequence , `'C'` denoting the common difference of an arithmetic sequence and an integer `'B'`. you need to tell whether `'B'` exists in the arithmetic sequence or not. Return `1` if `B` is present in the sequence. Otherwise, returns `0`.
-
-## Examples
-
-**Example 1:**
-
-```
-Input: A = 1, B = 3, C = 2
-Output: 1
-Explaination: 3 is the second term of the
-sequence starting with 1 and having a common
-difference 2.
-```
-
-**Example 2:**
-
-```
-Input: A = 1, B = 2, C = 3
-Output: 0
-Explaination: 2 is not present in the sequence.
-```
-
-## Your Task
-
-You do not need to read input or print anything. Your task is to complete the function inSequence() which takes A, B and C and returns 1 if B is present in the sequence. Otherwise, returns 0.
-
-Expected Time Complexity: $O(1)$
-
-Expected Auxiliary Space: $O(1)$
-
-## Constraints
-
-* `-10^9 ≤ A, B, C ≤ 10^9`
-
-## Problem Explanation
-Given three integers 'A' denoting the first term of an arithmetic sequence , 'C' denoting the common difference of an arithmetic sequence and an integer 'B'. you need to tell whether 'B' exists in the arithmetic sequence or not. Return 1 if B is present in the sequence. Otherwise, returns 0.
-
-
-## Code Implementation
-
-
-
-
-
- ```py
- def is_present(A, C, B):
- if (B - A) % C == 0 and (B - A) / C >= 0:
- return 1
- return 0
-
-
- ```
-
-
-
-
-
- ```cpp
- int isPresent(int A, int C, int B) {
- if ((B - A) % C == 0 && (B - A) / C >= 0) {
- return 1;
- }
- return 0;
-}
-
- ```
-
-
-
-
-
-
- ```javascript
- function isPresent(A, C, B) {
- if ((B - A) % C === 0 && (B - A) / C >= 0) {
- return 1;
- }
- return 0;
-}
-
-
- ```
-
-
-
-
-
-
- ```typescript
-function isPresent(A, C, B) {
- if ((B - A) % C === 0 && (B - A) / C >= 0) {
- return 1;
- }
- return 0;
-}
-
- ```
-
-
-
-
-
-
- ```java
- public int isPresent(int A, int C, int B) {
- if ((B - A) % C == 0 && (B - A) / C >= 0) {
- return 1;
- }
- return 0;
-}
-
-
- ```
-
-
-
-
-
-## Solution Logic:
-The solution checks if the difference between B and A is a multiple of C (the common difference) and if the result is non-negative. If both conditions are true, it means that B is present in the arithmetic sequence.
-
-
-## Time Complexity
-
-* The time complexity is $O(1)$, because it only involves simple arithmetic operations.
-
-
-## Space Complexity
-
-* The auxiliary space complexity is $O(1)$ because we are not using any extra space proportional to the size of the input array.
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Easy problems/Array-Leaders.md b/dsa-solutions/gfg-solutions/Easy problems/Array-Leaders.md
deleted file mode 100644
index 484d63f92..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/Array-Leaders.md
+++ /dev/null
@@ -1,228 +0,0 @@
----
-id: array-leaders
-title: Array Leaders
-sidebar_label: Array-Leaders
-tags:
- - Array
- - Data Structure
-description: "This tutorial covers the solution to the Array Leaders problem from the GeeksforGeeks website."
----
-## Problem Description
-
-Given an array `arr` of `n` positive integers, your task is to find all the leaders in the array. An element of the array is considered a leader if it is greater than all the elements on its right side or if it is equal to the maximum element on its right side. The rightmost element is always a leader.
-
-## Examples
-
-**Example 1:**
-
-```
-Input:
-arr = [16, 17, 4, 3, 5, 2]
-Output: 17, 5, 2
-Explanation: The leaders are 17, 5, and 2.
-```
-
-**Example 2:**
-
-```
-Input:
-arr = [1, 2, 3, 4, 0]
-Output: 4, 0
-Explanation: The leaders are 4 and 0.
-```
-
-## Your Task
-
-You don't need to read input or print anything. Your task is to complete the function `leaders()` which takes the array `arr[]` and its size `n` as input parameters and returns a list of integers containing the leaders in the array.
-
-Expected Time Complexity: $O(n)$
-
-Expected Auxiliary Space: $O(n)$
-
-## Constraints
-
-* `1 ≤ n ≤ 10^7`
-* `0 ≤ arr[i] ≤ 10^7`
-
-## Problem Explanation
-
-The task is to find all the leaders in the array, where a leader is an element that is greater than or equal to all the elements to its right. The rightmost element is always a leader.
-
-## Code Implementation
-
-
-
-
-
- ```python
- class Solution:
- def leaders(self, arr, n):
- leaders = []
- max_from_right = arr[-1]
- leaders.append(max_from_right)
-
- for i in range(n-2, -1, -1):
- if arr[i] >= max_from_right:
- leaders.append(arr[i])
- max_from_right = arr[i]
-
- return leaders[::-1]
-
- # Example usage
- if __name__ == "__main__":
- solution = Solution()
- arr = [16, 17, 4, 3, 5, 2]
- print(solution.leaders(arr, len(arr))) # Expected output: [17, 5, 2]
- ```
-
-
-
-
-
- ```cpp
- //{ Driver Code Starts
- #include
- using namespace std;
-
- // } Driver Code Ends
- class Solution {
- public:
- vector leaders(int n, int arr[]) {
- vector leaders;
- int max_from_right = arr[n-1];
- leaders.push_back(max_from_right);
-
- for (int i = n-2; i >= 0; i--) {
- if (arr[i] >= max_from_right) {
- leaders.push_back(arr[i]);
- max_from_right = arr[i];
- }
- }
-
- reverse(leaders.begin(), leaders.end());
- return leaders;
- }
- };
-
- //{ Driver Code Starts.
- int main() {
- long long t;
- cin >> t; // testcases
- while (t--) {
- long long n;
- cin >> n; // total size of array
-
- int arr[n];
-
- // inserting elements in the array
- for (long long i = 0; i < n; i++) {
- cin >> arr[i];
- }
- Solution obj;
- // calling leaders() function
- vector v = obj.leaders(n, arr);
-
- // printing elements of the vector
- for (auto it = v.begin(); it != v.end(); it++) {
- cout << *it << " ";
- }
-
- cout << endl;
- }
- }
- // } Driver Code Ends
- ```
-
-
-
-
-
-
- ```javascript
- class Solution {
- leaders(arr, n) {
- let leaders = [];
- let maxFromRight = arr[n - 1];
- leaders.push(maxFromRight);
- for (let i = n - 2; i >= 0; i--) {
- if (arr[i] >= maxFromRight) {
- leaders.push(arr[i]);
- maxFromRight = arr[i];
- }
- }
- return leaders.reverse();
- }
-}
-
- ```
-
-
-
-
-
-
- ```typescript
-class Solution {
- leaders(arr: number[], n: number): number[] {
- let leaders: number[] = [];
- let maxFromRight: number = arr[n - 1];
- leaders.push(maxFromRight);
- for (let i: number = n - 2; i >= 0; i--) {
- if (arr[i] >= maxFromRight) {
- leaders.push(arr[i]);
- maxFromRight = arr[i];
- }
- }
- return leaders.reverse();
- }
-}
-
-
- ```
-
-
-
-
-
-
- ```java
-import java.util.ArrayList;
-import java.util.Collections;
-
-public class Solution {
- public ArrayList leaders(ArrayList arr, int n) {
- ArrayList leaders = new ArrayList();
- int maxFromRight = arr.get(n - 1);
- leaders.add(maxFromRight);
- for (int i = n - 2; i >= 0; i--) {
- if (arr.get(i) >= maxFromRight) {
- leaders.add(arr.get(i));
- maxFromRight = arr.get(i);
- }
- }
- Collections.reverse(leaders);
- return leaders;
- }
-}
-
- ```
-
-
-
-
-
-## Solution Logic:
-
-1. Traverse the array from right to left.
-2. Keep track of the maximum element encountered so far.
-3. If the current element is greater than or equal to the maximum element, it is a leader.
-4. Add the leader to the result list and update the maximum element.
-5. Return the result list in reverse order.
-
-## Time Complexity
-
-* The function iterates through the array once, so the time complexity is $O(n)$.
-
-## Space Complexity
-
-* The function uses additional space for the result list, so the auxiliary space complexity is $O(n)$.
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Easy problems/Balanced_Tree_check.md b/dsa-solutions/gfg-solutions/Easy problems/Balanced_Tree_check.md
deleted file mode 100644
index 3c49ac168..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/Balanced_Tree_check.md
+++ /dev/null
@@ -1,187 +0,0 @@
----
-id: balanced-tree-check
-title: Balanced Tree Check
-sidebar_label: Balanced Tree Check
-tags:
- - Easy
- - Binary Tree
- - Tree
- - Recursion
- - C++
-description: "This is a solution to the Balanced Tree Check problem."
----
-
-This tutorial contains a complete walk-through of the Balanced Tree Check problem. It features the implementation of the solution code in C++.
-
-## Problem Description
-
-Given a binary tree, find if it is height balanced or not. A tree is height balanced if the difference between the heights of left and right subtrees is not more than one for all nodes of the tree.
-
-## Examples
-
-**Example 1:**
-
-```
-Input:
- 1
- / \
- 2 3
- /
- 4
-Output: 1 (true)
-Explanation: The given tree is balanced as the height difference between the left and right subtrees is not more than one.
-```
-
-**Example 2:**
-
-```
-Input:
- 10
- / \
- 20 30
- / \
- 40 60
- \
- 70
-Output: 0 (false)
-Explanation: The given tree is not balanced as the height difference between the left and right subtrees is more than one.
-```
-
-## Your Task
-
-You don't need to read input or print anything. Your task is to complete the function `isBalanced()` which takes the root node of the tree as input and returns `true` if the tree is balanced, otherwise `false`.
-
-Expected Time Complexity: O(N)
-
-Expected Auxiliary Space: O(h) where h is the height of the tree.
-
-## Constraints
-
-* 1 ≤ Number of nodes ≤ 10^5
-* 1 ≤ Data of a node ≤ 10^5
-
-## Problem Explanation
-
-The problem is to check if a given binary tree is height balanced. A tree is height balanced if, for every node, the difference between the heights of the left and right subtrees is not more than one.
-
-## Code Implementation
-
-```cpp
-//{ Driver Code Starts
-#include
-using namespace std;
-
-// } Driver Code Ends
-
-struct Node {
- int data;
- Node* left;
- Node* right;
-
- Node(int val) {
- data = val;
- left = right = NULL;
- }
-};
-
-class Solution {
- public:
- // Helper function to check if tree is balanced and to return its height
- pair isBalancedHelper(Node* root) {
- // Base case: An empty tree is balanced and its height is 0
- if (root == NULL) {
- return {true, 0};
- }
-
- // Recursively check the left and right subtrees
- auto left = isBalancedHelper(root->left);
- auto right = isBalancedHelper(root->right);
-
- // The tree is balanced if the left and right subtrees are balanced and
- // the height difference between the left and right subtrees is not more than 1
- bool balanced = left.first && right.first && abs(left.second - right.second <= 1);
-
- // Height of the current tree is 1 plus the maximum of the heights of the left and right subtrees
- int height = max(left.second, right.second) + 1;
-
- return {balanced, height};
- }
-
- // Function to check whether a binary tree is balanced or not.
- bool isBalanced(Node* root) {
- return isBalancedHelper(root).first;
- }
-};
-
-//{ Driver Code Starts.
-
-int main() {
- int t;
- cin >> t;
- while (t--) {
- int n;
- cin >> n;
-
- unordered_map m;
- Node* root = NULL;
-
- while (n--) {
- int n1, n2;
- char lr;
- cin >> n1 >> n2 >> lr;
-
- Node* parent;
- if (m.find(n1) == m.end()) {
- parent = new Node(n1);
- m[n1] = parent;
- if (root == NULL) root = parent;
- } else {
- parent = m[n1];
- }
-
- Node* child = new Node(n2);
- if (lr == 'L') parent->left = child;
- else parent->right = child;
-
- m[n2] = child;
- }
-
- Solution obj;
- cout << obj.isBalanced(root) << endl;
- }
- return 0;
-}
-// } Driver Code Ends
-```
-
-## Example Walkthrough
-
-For the given example:
-
-Input:
-```
- 1
- / \
- 2 3
- /
- 4
-```
-The function should return `true` because the given tree is balanced as the height difference between the left and right subtrees is not more than one.
-
-## Solution Logic
-
-1. Define a helper function `isBalancedHelper` that returns a pair consisting of a boolean (whether the tree is balanced) and an integer (the height of the tree).
-2. In the helper function, recursively check the left and right subtrees.
-3. Determine if the current tree is balanced by checking if the left and right subtrees are balanced and if their height difference is not more than 1.
-4. Return the balanced status and height of the current tree.
-5. The main function `isBalanced` calls the helper function and returns the balanced status.
-
-## Time Complexity
-
-* The time complexity is O(N) where N is the number of nodes in the tree.
-
-## Space Complexity
-
-* The auxiliary space complexity is O(h) where h is the height of the tree, due to the recursive call stack.
- **gfg Problem:** [gfg Problem](https://www.geeksforgeeks.org/problems/check-for-balanced-tree/1?page=1&difficulty=Easy&sortBy=submissions)
-- **Solution Author:** [arunimad6yuq](https://www.geeksforgeeks.org/user/arunimad6yuq/)
diff --git a/dsa-solutions/gfg-solutions/Easy problems/Binary-Search.md b/dsa-solutions/gfg-solutions/Easy problems/Binary-Search.md
deleted file mode 100644
index 1f267dc07..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/Binary-Search.md
+++ /dev/null
@@ -1,178 +0,0 @@
----
-id: binary-search
-title: Binary Search
-sidebar_label: Binary-Search
-tags:
- - Modular Arithmetic
- - Algorithms
-description: "This tutorial covers the solution to the Count Digits problem from the GeeksforGeeks."
----
-## Problem Description
-Given a sorted array `arr` and an integer `k`, find the position(0-based indexing) at which `k` is present in the array using binary search. when divided.
-
-## Examples
-
-**Example 1:**
-
-```
-Input: k = 4, arr= [1, 2, 3, 4, 5]
-Output: 3
-Explanation: 4 appears at index 3.
-```
-
-**Example 2:**
-
-```
-Input: k = 445, arr= [11, 22, 33, 44, 55]
-Output: -1
-Explanation: 445 is not present.
-```
-
-
-Expected Time Complexity: O(logn)
-
-Expected Auxiliary Space: O(logn)
-
-## Constraints
-
-* `1 ≤ N ≤ 10^5`
-
-## Problem Explanation
-
-The task is to traverse the array and search the number.
-
-## Code Implementation
-
-### C++ Solution
-
-```cpp
-
-#include
-#include
-
-int binarySearch(const std::vector& arr, int k) {
- int low = 0;
- int high = arr.size() - 1;
- while (low <= high) {
- int mid = low + (high - low) / 2;
- if (arr[mid] == k) {
- return mid;
- } else if (arr[mid] < k) {
- low = mid + 1;
- } else {
- high = mid - 1;
- }
- }
- return -1; // return -1 if k is not found in the array
-}
-int main() {
- std::vector arr = {1, 2, 3, 4, 5, 6, 7, 8, 9};
- int k = 5;
- int position = binarySearch(arr, k);
- if (position != -1) {
- std::cout << "Element " << k << " is present at position " << position << std::endl;
- } else {
- std::cout << "Element " << k << " is not present in the array" << std::endl;
- }
- return 0;
-}
-
-
-
-
-```
-
-```java
-import java.util.*;
-
-public class Main {
- public static int binarySearch(int[] arr, int k) {
- int low = 0;
- int high = arr.length - 1;
- while (low <= high) {
- int mid = low + (high - low) / 2;
- if (arr[mid] == k) {
- return mid;
- } else if (arr[mid] < k) {
- low = mid + 1;
- } else {
- high = mid - 1;
- }
- }
- return -1; // return -1 if k is not found in the array
- }
- public static void main(String[] args) {
- int[] arr = {1, 2, 3, 4, 5, 6, 7, 8, 9};
- int k = 5;
- int position = binarySearch(arr, k);
- if (position != -1) {
- System.out.println("Element " + k + " is present at position " + position);
- } else {
- System.out.println("Element " + k + " is not present in the array");
- }
- }
-}
-
-
-```
-
-```python
-
-def binary_search(arr, k):
- low = 0
- high = len(arr) - 1
- while low <= high:
- mid = low + (high - low) // 2
- if arr[mid] == k:
- return mid
- elif arr[mid] < k:
- low = mid + 1
- else:
- high = mid - 1
- return -1 # return -1 if k is not found in the array
-
-arr = [1, 2, 3, 4, 5, 6, 7, 8, 9]
-k = 5
-position = binary_search(arr, k)
-if position != -1:
- print("Element {} is present at position {}".format(k, position))
-else:
- print("Element {} is not present in the array".format(k))
-
-
-```
-
-```javascript
-function binarySearch(arr, k) {
- let low = 0;
- let high = arr.length - 1;
- while (low <= high) {
- let mid = Math.floor(low + (high - low) / 2);
- if (arr[mid] === k) {
- return mid;
- } else if (arr[mid] < k) {
- low = mid + 1;
- } else {
- high = mid - 1;
- }
- }
- return -1; // return -1 if k is not found in the array
-}
-
-
-```
-
-## Solution Logic:
-This solution uses binary search to find the position of k in the sorted array. It starts by considering the middle element of the array. If the middle element is equal to k, it returns the position of the middle element. If the middle element is less than k, it repeats the process for the right half of the array. If the middle element is greater than k, it repeats the process for the left half of the array.
-
-
-
-
-## Time Complexity
-
-* The time complexity is $O(log(n))$ where n is the input number.
-
-
-## Space Complexity
-
-* The auxiliary space complexity is $O(1)$ due to the only extra memory used is for temporary variables while swapping two values in Array.
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Easy problems/Bubble-Sort.md b/dsa-solutions/gfg-solutions/Easy problems/Bubble-Sort.md
deleted file mode 100644
index 504a5c00c..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/Bubble-Sort.md
+++ /dev/null
@@ -1,263 +0,0 @@
----
-id: bubble-sort
-title: Bubble Sort
-sidebar_label: Bubble-Sort
-tags:
- - Sorting
- - Algorithms
-description: "This tutorial covers the solution to the Bubble Sort problem from the GeeksforGeeks."
----
-## Problem Description
-
-Given an unsorted array of size `N`, use bubblesort to sort `arr[]` in increasing order.
-
-## Examples
-
-**Example 1:**
-
-```
-Input:
-N = 5
-arr[] = {4, 1, 3, 9, 7}
-Output:
-1 3 4 7 9
-```
-
-**Example 2:**
-
-```
-Input:
-N = 10
-arr[] = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1}
-Output:
-1 2 3 4 5 6 7 8 9 10
-```
-
-## Your Task
-You don't have to read input or print anything. Your task is to complete the function bubblesort() which takes the array and it's size as input and sorts the array using bubble sort algorithm.
-
-Expected Time Complexity: O(N^2)
-
-Expected Auxiliary Space: O(1)
-
-## Constraints
-
-* `1 ≤ N ≤ 10^3`
-
-## Problem Explanation
-
-The task is to traverse the array and sort the array using bubble sort.
-
-## Code Implementation
-
-### C++ Solution
-
-```cpp
-// Optimized implementation of Bubble sort
-#include
-using namespace std;
-
-// An optimized version of Bubble Sort
-void bubbleSort(int arr[], int n)
-{
- int i, j;
- bool swapped;
- for (i = 0; i < n - 1; i++) {
- swapped = false;
- for (j = 0; j < n - i - 1; j++) {
- if (arr[j] > arr[j + 1]) {
- swap(arr[j], arr[j + 1]);
- swapped = true;
- }
- }
-
- // If no two elements were swapped
- // by inner loop, then break
- if (swapped == false)
- break;
- }
-}
-
-// Function to print an array
-void printArray(int arr[], int size)
-{
- int i;
- for (i = 0; i < size; i++)
- cout << " " << arr[i];
-}
-
-// Driver program to test above functions
-int main()
-{
- int arr[] = { 64, 34, 25, 12, 22, 11, 90 };
- int N = sizeof(arr) / sizeof(arr[0]);
- bubbleSort(arr, N);
- cout << "Sorted array: \n";
- printArray(arr, N);
- return 0;
-}
-
-
-```
-
-```java
-// Optimized java implementation of Bubble sort
-
-import java.io.*;
-
-class GFG {
-
- // An optimized version of Bubble Sort
- static void bubbleSort(int arr[], int n)
- {
- int i, j, temp;
- boolean swapped;
- for (i = 0; i < n - 1; i++) {
- swapped = false;
- for (j = 0; j < n - i - 1; j++) {
- if (arr[j] > arr[j + 1]) {
-
- // Swap arr[j] and arr[j+1]
- temp = arr[j];
- arr[j] = arr[j + 1];
- arr[j + 1] = temp;
- swapped = true;
- }
- }
-
- // If no two elements were
- // swapped by inner loop, then break
- if (swapped == false)
- break;
- }
- }
-
- // Function to print an array
- static void printArray(int arr[], int size)
- {
- int i;
- for (i = 0; i < size; i++)
- System.out.print(arr[i] + " ");
- System.out.println();
- }
-
- // Driver program
- public static void main(String args[])
- {
- int arr[] = { 64, 34, 25, 12, 22, 11, 90 };
- int n = arr.length;
- bubbleSort(arr, n);
- System.out.println("Sorted array: ");
- printArray(arr, n);
- }
-}
-
-
-
-```
-
-```python
-# Optimized Python program for implementation of Bubble Sort
-
-
-def bubbleSort(arr):
- n = len(arr)
-
- # Traverse through all array elements
- for i in range(n):
- swapped = False
-
- # Last i elements are already in place
- for j in range(0, n-i-1):
-
- # Traverse the array from 0 to n-i-1
- # Swap if the element found is greater
- # than the next element
- if arr[j] > arr[j+1]:
- arr[j], arr[j+1] = arr[j+1], arr[j]
- swapped = True
- if (swapped == False):
- break
-
-
-# Driver code to test above
-if __name__ == "__main__":
- arr = [64, 34, 25, 12, 22, 11, 90]
-
- bubbleSort(arr)
-
- print("Sorted array:")
- for i in range(len(arr)):
- print("%d" % arr[i], end=" ")
-
-
-
-```
-
-```javascript
-// Optimized javaScript implementation
-// of Bubble sort
-// An optimized version of Bubble Sort
-function bubbleSort(arr, n)
-{
- var i, j, temp;
- var swapped;
- for (i = 0; i < n - 1; i++)
- {
- swapped = false;
- for (j = 0; j < n - i - 1; j++)
- {
- if (arr[j] > arr[j + 1])
- {
- // Swap arr[j] and arr[j+1]
- temp = arr[j];
- arr[j] = arr[j + 1];
- arr[j + 1] = temp;
- swapped = true;
- }
- }
-
- // IF no two elements were
- // swapped by inner loop, then break
- if (swapped == false)
- break;
- }
-}
-
-// Function to print an array
-function printArray(arr, size)
-{
- var i;
- for (i = 0; i < size; i++)
- console.log(arr[i] + " ");
-}
-
-// Driver program
-var arr = [ 64, 34, 25, 12, 22, 11, 90 ];
-var n = arr.length;
-bubbleSort(arr, n);
-console.log("Sorted array: ");
-printArray(arr, n);
-
-
-
-```
-
-## Solution Logic:
-
-1. The largest element is placed in its correct position, i.e., the end of the array.
-
-2. Place the second largest element at correct position
-
-3. Place the remaining two elements at their correct positions.
-
-4. Total no. of passes: n-1. Total no. of comparisons: n*(n-1)/2
-
-
-## Time Complexity
-
-* The time complexity is $O(N^2)$ as there are two nested loops
-
-## Space Complexity
-
-* The auxiliary space complexity is $O(1)$ due to the only extra memory used is for temporary variables while swapping two values in Array.
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Easy problems/Check-Equal-Arrays.md b/dsa-solutions/gfg-solutions/Easy problems/Check-Equal-Arrays.md
deleted file mode 100644
index 6bd666a22..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/Check-Equal-Arrays.md
+++ /dev/null
@@ -1,106 +0,0 @@
----
-id: check-equal-arrays
-title: Check Equal Arrays
-sidebar_label: Check-Equal-Arrays
-tags:
- - Modular Arithmetic
- - Algorithms
-description: "This tutorial covers the solution to the Check Equal Arrays problem from the GeeksforGeeks."
----
-## Problem Description
-Given two arrays `arr1` and `arr2` of equal size, the task is to find whether the given arrays are equal. Two arrays are said to be equal if both contain the same set of elements, arrangements (or permutations) of elements may be different though.
-Note: If there are repetitions, then counts of repeated elements must also be the same for two arrays to be equal.
-
-## Examples
-
-**Example 1:**
-
-```
-Input: arr1[] = [1, 2, 5, 4, 0], arr2[] = [2, 4, 5, 0, 1]
-Output: true
-Explanation: Both the array can be rearranged to [0,1,2,4,5]
-```
-
-**Example 2:**
-
-```
-Input: arr1[] = [1, 2, 5], arr2[] = [2, 4, 15]
-Output: false
-Explanation: arr1[] and arr2[] have only one common value.
-```
-
-
-Expected Time Complexity: O(n)
-
-Expected Auxiliary Space: O(n)
-
-## Constraints
-
-* `1<= arr1.size, arr2.size<=10^7`
-
-## Problem Explanation
-
-The task is to traverse the array and search the number.
-
-## Code Implementation
-
-### C++ Solution
-
-```cpp
-
-#include
-#include
-
-bool areEqual(std::vector arr1, std::vector arr2) {
- std::sort(arr1.begin(), arr1.end());
- std::sort(arr2.begin(), arr2.end());
- return arr1 == arr2;
-}
-
-
-```
-
-```java
-import java.util.Arrays;
-
-public class Main {
- public static boolean areEqual(int[] arr1, int[] arr2) {
- Arrays.sort(arr1);
- Arrays.sort(arr2);
- return Arrays.equals(arr1, arr2);
- }
-}
-
-
-
-```
-
-```python
-
-def are_equal(arr1, arr2):
- return sorted(arr1) == sorted(arr2)
-```
-
-```javascript
-
-function areEqual(arr1, arr2) {
- return arr1.sort((a, b) => a - b).every((value, index) => value === arr2.sort((a, b) => a - b)[index]);
-}
-
-
-```
-
-## Solution Logic:
-In the solution, the arrays are sorted and then compared. If the sorted arrays are equal, then the original arrays contain the same set of elements, regardless of order. Note that this approach assumes that the arrays contain only elements that can be compared using the default comparison operators (e.g., numbers, strings). If the arrays contain custom objects, a custom comparison function may be needed.
-
-
-
-
-## Time Complexity
-
-* The time complexity is $O(log(n))$ where n is the input number.
-
-
-## Space Complexity
-
-* The auxiliary space complexity is $O(1)$ due to the only extra memory used is for temporary variables while swapping two values in Array.
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Easy problems/Common-in-3-Sorted-Array.md b/dsa-solutions/gfg-solutions/Easy problems/Common-in-3-Sorted-Array.md
deleted file mode 100644
index c98bc20f9..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/Common-in-3-Sorted-Array.md
+++ /dev/null
@@ -1,186 +0,0 @@
----
-id: common-in-3-sorted-arrays
-title: Common In 3 Sorted Arrays
-sidebar_label: Common-In-3-Sorted-Arrays
-tags:
- - Searching
- - Algorithms
-description: "This tutorial covers the solution to the Common in 3 sorted arrays problem from the GeeksforGeeks."
----
-## Problem Description
-
-You are given three arrays sorted in increasing order. Find the elements that are common in all three arrays.
-If there are no such elements return an empty array. In this case, the output will be -1.
-
-## Examples
-
-**Example 1:**
-
-```
-Input: arr1 = [1, 5, 10, 20, 40, 80] , arr2 = [6, 7, 20, 80, 100] , arr3 = [3, 4, 15, 20, 30, 70, 80, 120]
-Output: [20, 80]
-Explanation: 20 and 80 are the only common elements in arr, brr and crr.
-```
-
-**Example 2:**
-
-```
-Input: arr1 = [1, 2, 3, 4, 5] , arr2 = [6, 7] , arr3 = [8,9,10]
-Output: [-1]
-Explanation: There are no common elements in arr, brr and crr.
-```
-
-
-Expected Time Complexity: O(n)
-
-Expected Auxiliary Space: O(n)
-
-## Constraints
-
-* `-10^5 <= arr1i , arr2i , 1arr3i <= 10^5`
-
-## Problem Explanation
-
-The task is to traverse the arrays and find the common element.
-
-## Code Implementation
-
-### C++ Solution
-
-```cpp
-
-#include
-#include
-
-std::vector commonElements(std::vector arr1, std::vector arr2, std::vector arr3) {
- std::vector result;
- int i = 0, j = 0, k = 0;
- while (i < arr1.size() && j < arr2.size() && k < arr3.size()) {
- if (arr1[i] == arr2[j] && arr2[j] == arr3[k]) {
- result.push_back(arr1[i]);
- i++;
- j++;
- k++;
- } else {
- if (arr1[i] <= arr2[j] && arr1[i] <= arr3[k]) {
- i++;
- } else if (arr2[j] <= arr1[i] && arr2[j] <= arr3[k]) {
- j++;
- } else {
- k++;
- }
- }
- }
-
- return result;
-}
-
-
-```
-
-```java
-import java.util.ArrayList;
-import java.util.List;
-
-public class Main {
- public static List commonElements(List arr1, List arr2, List arr3) {
- List result = new ArrayList<>();
- int i = 0, j = 0, k = 0;
- while (i < arr1.size() && j < arr2.size() && k < arr3.size()) {
- if (arr1.get(i) == arr2.get(j) && arr2.get(j) == arr3.get(k)) {
- result.add(arr1.get(i));
- i++;
- j++;
- k++;
- } else {
- if (arr1.get(i) <= arr2.get(j) && arr1.get(i) <= arr3.get(k)) {
- i++;
- } else if (arr2.get(j) <= arr1.get(i) && arr2.get(j) <= arr3.get(k)) {
- j++;
- } else {
- k++;
- }
- }
- }
-
- return result;
- }
-}
-
-
-
-
-```
-
-```python
-
-def commonElements(arr1, arr2, arr3):
- result = []
- i = j = k = 0
-
- while i < len(arr1) and j < len(arr2) and k < len(arr3):
- if arr1[i] == arr2[j] == arr3[k]:
- result.append(arr1[i])
- i += 1
- j += 1
- k += 1
- else:
- if arr1[i] <= arr2[j] and arr1[i] <= arr3[k]:
- i += 1
- elif arr2[j] <= arr1[i] and arr2[j] <= arr3[k]:
- j += 1
- else:
- k += 1
-
- return result
-
-
-```
-
-```javascript
-function commonElements(arr1, arr2, arr3) {
- const result = [];
- const i = j = k = 0;
-
- while (i < arr1.length && j < arr2.length && k < arr3.length) {
- if (arr1[i] === arr2[j] && arr2[j] === arr3[k]) {
- result.push(arr1[i]);
- i++;
- j++;
- k++;
- } else {
- if (arr1[i] <= arr2[j] && arr1[i] <= arr3[k]) {
- i++;
- } else if (arr2[j] <= arr1[i] && arr2[j] <= arr3[k]) {
- j++;
- } else {
- k++;
- }
- }
- }
-
- return result.length ? result : [-1];
-}
-
-
-```
-
-## Solution Logic:
-
-1. Initialize three pointers, one for each array, at the beginning of the arrays.
-2. Compare the elements at the current pointers. If they are equal, add the element to the result array and increment all three pointers.
-3. If the elements are not equal, increment the pointer of the array with the smallest current element.
-4. Repeat steps 2-3 until one of the arrays is exhausted.
-5. Return the result array.
-
-
-
-## Time Complexity
-
-* The time complexity is $O(N^2)$ where n is the length of the shortest array. This is because in the worst case, we need to iterate through all elements of the shortest array.
-
-
-## Space Complexity
-
-* The auxiliary space complexity is $O(m)$ where m is the number of common elements found. This is because we store the common elements in the result array.
-
diff --git a/dsa-solutions/gfg-solutions/Easy problems/Count-Digits.md b/dsa-solutions/gfg-solutions/Easy problems/Count-Digits.md
deleted file mode 100644
index b4bbe409b..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/Count-Digits.md
+++ /dev/null
@@ -1,134 +0,0 @@
----
-id: count-digits
-title: Count Digits
-sidebar_label: Count-Digits
-tags:
- - Modular Arithmetic
- - Algorithms
-description: "This tutorial covers the solution to the Count Digits problem from the GeeksforGeeks."
----
-## Problem Description
-
-Given a number `n`. Count the number of digits in `n` which evenly divide n. Return an integer, total number of digits of n which divides n evenly.
-
-Note :- Evenly divides means whether `n` is divisible by a digit i.e. leaves a remainder `0` when divided.
-
-## Examples
-
-**Example 1:**
-
-```
-Input: n = 12
-Output: 2
-Explanation: 1, 2 when both divide 12 leaves remainder 0.
-```
-
-**Example 2:**
-
-```
-Input: n = 2446
-Output: 1
-Explanation: Here among 2, 4, 6 only 2 divides 2446 evenly while 4 and 6 do not.
-```
-
-
-Expected Time Complexity: O(N)
-
-Expected Auxiliary Space: O(1)
-
-## Constraints
-
-* `1 ≤ N ≤ 10^5`
-
-## Problem Explanation
-
-The task is to traverse the number and count the digits.
-
-## Code Implementation
-
-### C++ Solution
-
-```cpp
-int countDigits(int n) {
- int count = 0;
- int temp = n;
- while (temp != 0) {
- int digit = temp % 10;
- if (n % digit == 0) {
- count++;
- }
- temp /= 10;
- }
- return count;
-}
-
-
-```
-
-```java
-
-public int countDigits(int n) {
- int count = 0;
- int temp = n;
- while (temp != 0) {
- int digit = temp % 10;
- if (n % digit == 0) {
- count++;
- }
- temp /= 10;
- }
- return count;
-}
-
-
-```
-
-```python
-def count_digits(n):
- count = 0
- temp = n
- while temp != 0:
- digit = temp % 10
- if n % digit == 0:
- count += 1
- temp //= 10
- return count
-
-```
-
-```javascript
-function countDigits(n) {
- let count = 0;
- let temp = n;
- while (temp !== 0) {
- const digit = temp % 10;
- if (n % digit === 0) {
- count++;
- }
- temp = Math.floor(temp / 10);
- }
- return count;
-}
-
-
-```
-
-## Solution Logic:
-1. Initialize a variable count to 0, which will store the number of digits that evenly divide n.
-2. Initialize a variable temp to n, which will be used to iterate through each digit of n.
-3. Use a while loop to iterate through each digit of n. In each iteration, do the following:
- - Calculate the current digit by taking the remainder of temp divided by 10 (temp % 10).
- - Check if n is divisible by the current digit by checking if n % digit == 0. If it is, increment count.
- - Update temp by dividing it by 10 (temp /= 10).
-4. Return count at the end of the function.
-
-
-
-## Time Complexity
-
-* The time complexity is $O(log(n))$ where n is the input number. This is because we are iterating through each digit of n using a while loop, and the number of digits in n is proportional to the logarithm of n.
-
-
-## Space Complexity
-
-* The auxiliary space complexity is $O(1)$ due to the only extra memory used is for temporary variables while swapping two values in Array.
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Easy problems/Dfs-of-graph.md b/dsa-solutions/gfg-solutions/Easy problems/Dfs-of-graph.md
deleted file mode 100644
index b6fffd820..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/Dfs-of-graph.md
+++ /dev/null
@@ -1,163 +0,0 @@
----
-id: dfs-of-graph
-title: DFS of Graph
-sidebar_label: 0022 - DFS of Graph
-tags:
- - Easy
- - Graph
- - DFS
- - GeeksforGeeks
- - CPP
- - DSA
-description: "This tutorial covers the solution to the DFS of Graph problem from the GeeksforGeeks website, featuring implementations in C++."
----
-## Problem Description
-
-You are given a connected undirected graph. Perform a Depth First Traversal of the graph.
-Note: Use the recursive approach to find the DFS traversal of the graph starting from the 0th vertex from left to right according to the graph.
-
-## Examples
-
-**Example 1:**
-
-```
-Input:
-Graph:
-0->1, 0->2, 1->2, 2->0, 2->3, 3->3
-Output: 0 1 2 3
-Explanation:
-0 is connected to 1, 2.
-1 is connected to 2.
-2 is connected to 0, 3.
-3 is connected to 3.
-```
-
-**Example 2:**
-
-```
-Input:
-Graph:
-0->1, 0->2, 1->2, 2->0, 2->3, 3->3
-Output: 0 1 2 3
-Explanation:
-0 is connected to 1, 2.
-1 is connected to 2.
-2 is connected to 0, 3.
-3 is connected to 3.
-```
-
-## Your Task
-
-You don't need to read input or print anything. Your task is to complete the function `dfsOfGraph()` which takes the number of vertices `V` and an adjacency list `adj` as input parameters and returns a list containing the DFS traversal of the graph starting from the 0th vertex.
-
-Expected Time Complexity: O(V + E)
-
-Expected Auxiliary Space: O(V)
-
-## Constraints
-
-* `1 ≤ V, E ≤ 10^4`
-
-## Problem Explanation
-
-The task is to traverse a given connected undirected graph using Depth First Search (DFS). DFS is a traversal algorithm that starts at a source node and explores as far as possible along each branch before backtracking. This recursive approach uses a stack data structure for its implementation.
-
-## Code Implementation
-
-### C++ Solution
-
-```cpp
-//{ Driver Code Starts
-#include
-using namespace std;
-
-// } Driver Code Ends
-class Solution {
- public:
- // Function to return a list containing the DFS traversal of the graph.
- void dfsUtil(int node, vector adj[], vector& visited, vector& result) {
- visited[node] = true;
- result.push_back(node);
-
- for (int neighbor : adj[node]) {
- if (!visited[neighbor]) {
- dfsUtil(neighbor, adj, visited, result);
- }
- }
- }
-
- vector dfsOfGraph(int V, vector adj[]) {
- vector result;
- vector visited(V, false);
-
- dfsUtil(0, adj, visited, result);
-
- return result;
- }
-};
-
-//{ Driver Code Starts.
-int main() {
- int tc;
- cin >> tc;
- while (tc--) {
- int V, E;
- cin >> V >> E;
-
- vector adj[V];
-
- for (int i = 0; i < E; i++) {
- int u, v;
- cin >> u >> v;
- adj[u].push_back(v);
- adj[v].push_back(u);
- }
- Solution obj;
- vector ans = obj.dfsOfGraph(V, adj);
- for (int i = 0; i < ans.size(); i++) {
- cout << ans[i] << " ";
- }
- cout << endl;
- }
- return 0;
-}
-// } Driver Code Ends
-```
-
-## Example Walkthrough
-
-**Example 1:**
-
-For the input:
-```
-Graph:
-0->1, 0->2, 1->2, 2->0, 2->3, 3->3
-Output: 0 1 2 3
-```
-1. Start DFS from node 0.
-2. Visit node 1 from node 0.
-3. Visit node 2 from node 1.
-4. Visit node 3 from node 2.
-5. Backtrack to node 2, then to node 1, and finally to node 0.
-
-The result of the traversal is [0, 1, 2, 3].
-
-## Solution Logic:
-
-1. Use a recursive helper function `dfsUtil` to perform DFS starting from a given node.
-2. Mark the node as visited and add it to the result list.
-3. Recursively visit all unvisited neighbors of the current node.
-4. The main function initializes the visited list and starts the DFS from node 0.
-
-## Time Complexity
-
-* The time complexity is $O(V + E)$ where $V$ is the number of vertices and $E$ is the number of edges, as each vertex and edge is visited once.
-
-## Space Complexity
-
-* The auxiliary space complexity is $O(V)$ due to the visited list and the recursive stack.
-
-## References
-
-- **GeeksforGeeks Problem:** [DFS of Graph](https://www.geeksforgeeks.org/problems/depth-first-traversal-for-a-graph/1?page=2&difficulty=Easy&sortBy=submissions)
-- **Solution Author:** [arunimad6yuq](https://www.geeksforgeeks.org/user/arunimad6yuq/)
diff --git a/dsa-solutions/gfg-solutions/Easy problems/Faithful-Numbers.md b/dsa-solutions/gfg-solutions/Easy problems/Faithful-Numbers.md
deleted file mode 100644
index 756c1c0e2..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/Faithful-Numbers.md
+++ /dev/null
@@ -1,213 +0,0 @@
----
-id: faithful-numbers
-title: Faithful Numbers
-sidebar_label: Faithful-Numbers
-tags:
- - Array
- - Data Structure
-description: "This tutorial covers the solution to the Faithful Numbers problem from the GeeksforGeeks website."
----
-## Problem Description
-
-A number is called faithful if you can write it as the sum of distinct powers of 7.
-e.g., `2457 = 7 + 72 + 74` . If we order all the faithful numbers, we get the sequence `1 = 70`, `7 = 71`, `8 = 70 + 71`, `49 = 72`, `50 = 70 + 72` . . . and so on.
-Given some value of `N`, you have to find the N'th faithful number.
-
-## Examples
-
-**Example 1:**
-
-```
-Input:
-N = 3
-Output:
-8
-Explanation:
-8 is the 3rd Faithful number.
-```
-
-**Example 2:**
-
-```
-Input:
-N = 7
-Output:
-57
-Explanation:
-57 is the 7th Faithful number.
-```
-
-## Your Task
-You don't need to read input or print anything. Your task is to complete the function `nthFaithfulNum()` which takes an Integer N as input and returns the answer.
-
-
-Expected Time Complexity: $O(log(n))$
-
-Expected Auxiliary Space: $O(log(n))$
-
-## Constraints
-
-* `1 ≤ n ≤ 10^5`
-
-## Problem Explanation
-A number is called faithful if you can write it as the sum of distinct powers of 7.
-e.g., `2457 = 7 + 72 + 74` . If we order all the faithful numbers, we get the sequence `1 = 70`, `7 = 71`, `8 = 70 + 71`, `49 = 72`, `50 = 70 + 72` . . . and so on.
-Given some value of `N`, you have to find the N'th faithful number.
-
-
-## Code Implementation
-
-
-
-
-
- ```python
-
-def get_nth_faithful_number(n):
- faithful_numbers = []
- power = 0
- while len(faithful_numbers) < n:
- num = 7 ** power
- faithful_numbers.append(num)
- for i in range(len(faithful_numbers) - 1):
- faithful_numbers.append(num + faithful_numbers[i])
- power += 1
- return faithful_numbers[n - 1]
-
-n = int(input("Enter the value of N: "))
-print("The {}th faithful number is: {}".format(n, get_nth_faithful_number(n)))
-
- ```
-
-
-
-
-
- ```cpp
-#include
-#include
-#include
-
-int getNthFaithfulNumber(int n) {
- std::vector faithfulNumbers;
- int power = 0;
- while (faithfulNumbers.size() < n) {
- int num = pow(7, power);
- faithfulNumbers.push_back(num);
- for (int i = 0; i < faithfulNumbers.size() - 1; i++) {
- faithfulNumbers.push_back(num + faithfulNumbers[i]);
- }
- power++;
- }
- return faithfulNumbers[n - 1];
-}
-int main() {
- int n;
- std::cout << "Enter the value of N: ";
- std::cin >> n;
- std::cout << "The " << n << "th faithful number is: " << getNthFaithfulNumber(n) << std::endl;
- return 0;
-}
-
- ```
-
-
-
-
-
-
- ```javascript
- function getNthFaithfulNumber(n) {
- let faithfulNumbers = [];
- let power = 0;
- while (faithfulNumbers.length < n) {
- let num = Math.pow(7, power);
- faithfulNumbers.push(num);
- for (let i = 0; i < faithfulNumbers.length - 1; i++) {
- faithfulNumbers.push(num + faithfulNumbers[i]);
- }
- power++;
- }
- return faithfulNumbers[n - 1];
-}
-let n = parseInt(prompt("Enter the value of N:"));
-alert("The " + n + "th faithful number is: " + getNthFaithfulNumber(n));
-
-
- ```
-
-
-
-
-
-
- ```typescript
-
-function getNthFaithfulNumber(n: number): number {
- let faithfulNumbers: number[] = [];
- let power: number = 0;
- while (faithfulNumbers.length < n) {
- let num: number = Math.pow(7, power);
- faithfulNumbers.push(num);
- for (let i: number = 0; i < faithfulNumbers.length - 1; i++) {
- faithfulNumbers.push(num + faithfulNumbers[i]);
- }
- power++;
- }
- return faithfulNumbers[n - 1];
-}
-
-let n: number = parseInt(prompt("Enter the value of N:"));
-alert("The " + n + "th faithful number is: " + getNthFaithfulNumber(n));
-
-
- ```
-
-
-
-
-
-
- ```java
-import java.util.*;
-
-public class Main {
- public static int getNthFaithfulNumber(int n) {
- List faithfulNumbers = new ArrayList<>();
- int power = 0;
- while (faithfulNumbers.size() < n) {
- int num = (int) Math.pow(7, power);
- faithfulNumbers.add(num);
- for (int i = 0; i < faithfulNumbers.size() - 1; i++) {
- faithfulNumbers.add(num + faithfulNumbers.get(i));
- }
- power++;
- }
- return faithfulNumbers.get(n - 1);
- }
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- System.out.print("Enter the value of N: ");
- int n = scanner.nextInt();
- System.out.println("The " + n + "th faithful number is: " + getNthFaithfulNumber(n));
- }
-}
-
-
- ```
-
-
-
-
-
-## Solution Logic:
-This solution works by generating faithful numbers on the fly and storing them in a vector. It starts with the smallest faithful number, 1 (which is 7^0), and then generates larger faithful numbers by adding powers of 7 to the previously generated numbers.
-
-
-## Time Complexity
-
-* The function iterates through the array once, so the time complexity is $O(n log n)$.
-
-## Space Complexity
-
-* The function uses additional space for the result list, so the auxiliary space complexity is $O(n)$.
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Easy problems/Insertion-Sort.md b/dsa-solutions/gfg-solutions/Easy problems/Insertion-Sort.md
deleted file mode 100644
index 65123602a..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/Insertion-Sort.md
+++ /dev/null
@@ -1,243 +0,0 @@
----
-id: insertion-sort
-title: Insertion Sort
-sidebar_label: Insertion-Sort
-tags:
- - Sorting
- - Algorithms
-description: "This tutorial covers the solution to the Insertion Sort problem from the GeeksforGeeks."
----
-## Problem Description
-
-The task is to complete the `insert()` function which is used to implement Insertion Sort.
-
-## Examples
-
-**Example 1:**
-
-```
-Input:
-N = 5
-arr[] = { 4, 1, 3, 9, 7}
-Output:
-1 3 4 7 9
-```
-
-**Example 2:**
-
-```
-Input:
-N = 10
-arr[] = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1}
-Output:
-1 2 3 4 5 6 7 8 9 10
-```
-
-## Your Task
-You don't have to read input or print anything. Your task is to complete the function insert() and insertionSort() where insert() takes the array, it's size and an index i and insertionSort() uses insert function to sort the array in ascending order using insertion sort algorithm.
-
-Expected Time Complexity: O(N^2)
-
-Expected Auxiliary Space: O(1)
-
-## Constraints
-
-* `1 ≤ N ≤ 10^3`
-
-## Problem Explanation
-
-The task is to traverse the array and sort the array using insertion sort.
-
-## Code Implementation
-
-### C++ Solution
-
-```cpp
-// C++ program for insertion sort
-
-#include
-using namespace std;
-
-// Function to sort an array using
-// insertion sort
-void insertionSort(int arr[], int n)
-{
- int i, key, j;
- for (i = 1; i < n; i++) {
- key = arr[i];
- j = i - 1;
-
- // Move elements of arr[0..i-1],
- // that are greater than key,
- // to one position ahead of their
- // current position
- while (j >= 0 && arr[j] > key) {
- arr[j + 1] = arr[j];
- j = j - 1;
- }
- arr[j + 1] = key;
- }
-}
-
-// A utility function to print an array
-// of size n
-void printArray(int arr[], int n)
-{
- int i;
- for (i = 0; i < n; i++)
- cout << arr[i] << " ";
- cout << endl;
-}
-
-// Driver code
-int main()
-{
- int arr[] = { 12, 11, 13, 5, 6 };
- int N = sizeof(arr) / sizeof(arr[0]);
-
- insertionSort(arr, N);
- printArray(arr, N);
-
- return 0;
-}
-```
-
-```java
-// Java program for implementation of Insertion Sort
-public class InsertionSort {
- /*Function to sort array using insertion sort*/
- void sort(int arr[])
- {
- int n = arr.length;
- for (int i = 1; i < n; ++i) {
- int key = arr[i];
- int j = i - 1;
-
- /* Move elements of arr[0..i-1], that are
- greater than key, to one position ahead
- of their current position */
- while (j >= 0 && arr[j] > key) {
- arr[j + 1] = arr[j];
- j = j - 1;
- }
- arr[j + 1] = key;
- }
- }
-
- /* A utility function to print array of size n*/
- static void printArray(int arr[])
- {
- int n = arr.length;
- for (int i = 0; i < n; ++i)
- System.out.print(arr[i] + " ");
-
- System.out.println();
- }
-
- // Driver method
- public static void main(String args[])
- {
- int arr[] = { 12, 11, 13, 5, 6 };
-
- InsertionSort ob = new InsertionSort();
- ob.sort(arr);
-
- printArray(arr);
- }
-};
-```
-
-```python
-# Python program for implementation of Insertion Sort
-
-# Function to do insertion sort
-def insertionSort(arr):
-
- # Traverse through 1 to len(arr)
- for i in range(1, len(arr)):
-
- key = arr[i]
-
- # Move elements of arr[0..i-1], that are
- # greater than key, to one position ahead
- # of their current position
- j = i-1
- while j >= 0 and key < arr[j] :
- arr[j + 1] = arr[j]
- j -= 1
- arr[j + 1] = key
-
-
-# Driver code to test above
-arr = [12, 11, 13, 5, 6]
-insertionSort(arr)
-for i in range(len(arr)):
- print ("% d" % arr[i])
-
-```
-
-```javascript
-
-
-```
-
-## Solution Logic:
-
-1. We have to start with second element of the array as first element in the array is assumed to be sorted.
-
-2. Compare second element with the first element and check if the second element is smaller then swap them.
-
-3. Move to the third element and compare it with the second element, then the first element and swap as necessary to put it in the correct position among the first three elements.
-
-4. Continue this process, comparing each element with the ones before it and swapping as needed to place it in the correct position among the sorted elements.
-
-5. Repeat until the entire array is sorted.
-
-## Time Complexity
-
-* The time complexity is $O(N^2)$ as there are two nested loops
-
-## Space Complexity
-
-* The auxiliary space complexity is $O(1)$ due to the only extra memory used is for temporary variables while swapping two values in Array. The selection sort never makes more than $O(N)$ swaps and can be useful when memory writing is costly.
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Easy problems/Kth-Smallest.md b/dsa-solutions/gfg-solutions/Easy problems/Kth-Smallest.md
deleted file mode 100644
index 13b8610e6..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/Kth-Smallest.md
+++ /dev/null
@@ -1,128 +0,0 @@
----
-id: kth-smallest
-title: Kth Smallest
-sidebar_label: Kth-Smallest
-tags:
- - Sorting
- - Algorithms
- - Arrays
- - Searching
-description: "This tutorial covers the solution to the Kth Smallest problem from the GeeksforGeeks."
----
-## Problem Description
-
-Given an array `arr[]` and an integer `k` where `k` is smaller than the size of the array, the task is to find the `kth` smallest element in the given array. It is given that all array elements are distinct.
-
-Note:- `l` and `r` denotes the starting and ending index of the array.
-
-## Examples
-
-**Example 1:**
-
-```
-Input:
-n = 6
-arr[] = 7 10 4 3 20 15
-k = 3
-l=0 r=5
-
-Output :
-7
-
-Explanation :
-3rd smallest element in the given
-array is 7.
-```
-
-**Example 2:**
-```
-Input:
-n = 5
-arr[] = 7 10 4 20 15
-k = 4
-l=0 r=4
-
-Output :
-15
-
-Explanation :
-4th smallest element in the given
-array is 15.
-```
-
-### Your Task
-You don't have to read input or print anything. Your task is to complete the function kthSmallest() which takes the array arr[], integers l and r denoting the starting and ending index of the array and an integer k as input and returns the kth smallest element.
-
-Expected Time Complexity: O(n*log(n))
-
-Expected Auxiliary Space: O(1)
-
-## Constraints
-
-* `1 ≤ N ≤ 10^5`
-
-## Problem Explanation
-
-Given an array `arr[]` and an integer `k` where `k` is smaller than the size of the array, the task is to find the `kth` smallest element in the given array. It is given that all array elements are distinct.
-
-Note:- `l` and `r` denotes the starting and ending index of the array.
-
-## Code Implementation
-
-### C++ Solution
-
-```cpp
-int kthSmallest(int arr[], int l, int r, int k) {
- sort(arr + l, arr + r + 1);
- return arr[l + k - 1];
-}
-
-
-```
-
-```java
-
-int kthSmallest(int arr[], int l, int r, int k) {
- Arrays.sort(arr, l, r + 1);
- return arr[l + k - 1];
-}
-
-
-```
-
-```python
-def kthSmallest(arr, l, r, k):
- arr.sort()
- return arr[l + k - 1]
-
-
-```
-
-```javascript
-function kthSmallest(arr, l, r, k) {
- arr.sort((a, b) => a - b);
- return arr[l + k - 1];
-}
-
-
-```
-
-## Solution Logic:
-
-1. sort(arr + l, arr + r + 1) (C++), arr.sort() (Python, JavaScript, TypeScript):
- - Sort the array in ascending order.
- - This step is necessary to ensure that the array is in a sorted state, allowing us to easily access the kth smallest element.
-2. return arr[l + k - 1]:
- - Return the element at the index l + k - 1.
- - l is the starting index of the array, k is the position of the element to be found, and -1 is to adjust for zero-based indexing.
- - Since the array is sorted in ascending order, the element at this index will be the kth smallest element.
-
-
-
-## Time Complexity
-
-* The time complexity is $O(n*log(n))$ due to the sorting step, where n is the length of the array.
-
-## Space Complexity
-
-* The auxiliary space complexity is $O(1)$ due to the only extra memory used is for temporary variables while swapping two values in Array.
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Easy problems/Kth_from_End_of_Linked_List.md b/dsa-solutions/gfg-solutions/Easy problems/Kth_from_End_of_Linked_List.md
deleted file mode 100644
index 7af6eaa9b..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/Kth_from_End_of_Linked_List.md
+++ /dev/null
@@ -1,199 +0,0 @@
----
-id: kth-from-end-of-linked-list
-title: Kth from End of Linked List
-sidebar_label: 0016 - Kth from End of Linked List
-tags:
- - Easy
- - Linked List
- - GeeksforGeeks
- - CPP
- - Python
- - DSA
-description: "This tutorial covers the solution to the Kth from End of Linked List problem from the GeeksforGeeks website, featuring implementations in Python and C++."
----
-## Problem Description
-
-Given the head of a linked list and a number `k`, your task is to find the kth node from the end. If `k` is more than the number of nodes, then the output should be -1.
-
-## Examples
-
-**Example 1:**
-
-```
-Input:
-n = 5, k = 2
-value[] = [1, 2, 3, 4, 5]
-Output: 4
-Explanation: The 2nd node from the end is 4.
-```
-
-**Example 2:**
-
-```
-Input:
-n = 3, k = 4
-value[] = [10, 20, 30]
-Output: -1
-Explanation: There are only 3 nodes in the linked list, so the 4th node from the end does not exist.
-```
-
-## Your Task
-
-You don't need to read input or print anything. Your task is to complete the function `getKthFromLast()` which takes the head of the linked list and `k` as input parameters and returns the data of the kth node from the end of the linked list.
-
-Expected Time Complexity: $O(N)$
-
-Expected Auxiliary Space: $O(1)$
-
-## Constraints
-
-* `1 ≤ n ≤ 10^5`
-* `1 ≤ value[i] ≤ 10^7`
-* `1 ≤ k ≤ 10^5`
-
-## Problem Explanation
-
-The task is to find the kth node from the end of a linked list. If `k` is greater than the number of nodes in the list, return -1.
-
-## Code Implementation
-
-
-
-
-
- ```py
- class ListNode:
- def __init__(self, x):
- self.val = x
- self.next = None
-
- class Solution:
- def getKthFromLast(self, head: ListNode, k: int) -> int:
- fast = slow = head
- for _ in range(k):
- if not fast:
- return -1
- fast = fast.next
-
- while fast:
- slow = slow.next
- fast = fast.next
-
- return slow.val if slow else -1
-
- # Example usage
- if __name__ == "__main__":
- head = ListNode(1)
- head.next = ListNode(2)
- head.next.next = ListNode(3)
- head.next.next.next = ListNode(4)
- head.next.next.next.next = ListNode(5)
- solution = Solution()
- print(solution.getKthFromLast(head, 2)) # Expected output: 4
- ```
-
-
-
-
-
- ```cpp
- //{ Driver Code Starts
- #include
- using namespace std;
-
- struct Node {
- int data;
- struct Node *next;
-
- Node(int x) {
- data = x;
- next = NULL;
- }
- };
-
- // } Driver Code Ends
- class Solution {
- public:
- int getKthFromLast(Node *head, int k) {
- Node *fast = head, *slow = head;
- for (int i = 0; i < k; ++i) {
- if (!fast) return -1;
- fast = fast->next;
- }
- while (fast) {
- slow = slow->next;
- fast = fast->next;
- }
- return slow ? slow->data : -1;
- }
- };
-
- //{ Driver Code Starts.
-
- int main() {
- int T, i, n, l, k;
-
- cin >> T;
-
- while (T--) {
- struct Node *head = NULL, *tail = NULL;
-
- cin >> n >> k;
- int firstdata;
- cin >> firstdata;
- head = new Node(firstdata);
- tail = head;
- for (i = 1; i < n; i++) {
- cin >> l;
- tail->next = new Node(l);
- tail = tail->next;
- }
- Solution obj;
- cout << obj.getKthFromLast(head, k) << endl;
- }
- return 0;
- }
- // } Driver Code Ends
- ```
-
-
-
-
-## Example Walkthrough
-
-**Example 1:**
-
-For the linked list:
-```
-1 -> 2 -> 3 -> 4 -> 5
-```
-1. The 2nd node from the end is 4.
-
-**Example 2:**
-
-For the linked list:
-```
-10 -> 20 -> 30
-```
-1. There are only 3 nodes in the linked list, so the 4th node from the end does not exist, thus the output is -1.
-
-## Solution Logic:
-
-1. Use two pointers `fast` and `slow`.
-2. Move `fast` pointer `k` steps ahead.
-3. Move both pointers until `fast` reaches the end.
-4. The `slow` pointer will be at the kth node from the end.
-5. Return the value of the `slow` pointer or -1 if `k` is greater than the number of nodes.
-
-## Time Complexity
-
-* The function traverses the linked list once, so the time complexity is $O(N)$.
-
-## Space Complexity
-
-* The function uses constant space, so the auxiliary space complexity is $O(1)$.
-
-## References
-
-- **GeeksforGeeks Problem:** [Kth from End of Linked List](https://www.geeksforgeeks.org/problems/nth-node-from-end-of-linked-list/1)
-- **Solution Author:** [arunimad6yuq](https://www.geeksforgeeks.org/user/arunimad6yuq/)
diff --git a/dsa-solutions/gfg-solutions/Easy problems/Largest-Element-In-Array.md b/dsa-solutions/gfg-solutions/Easy problems/Largest-Element-In-Array.md
deleted file mode 100644
index 06e094ba5..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/Largest-Element-In-Array.md
+++ /dev/null
@@ -1,122 +0,0 @@
----
-id: largest-element-in-array
-title: Largest Element In Array
-sidebar_label: Largest-Element-In-Array
-tags:
- - Arrays
- - Data Structure
-description: "This tutorial covers the solution to the Largest Element In Array problem from the GeeksforGeeks website, featuring implementations in C++."
----
-## Problem Description
-Given an array `arr`, the task is to find the largest element in it.
-
-## Examples
-
-**Example 1:**
-
-```
-Input: arr= [1, 8, 7, 56, 90]
-Output: 90
-Explanation: The largest element of given array is 90.
-```
-
-**Example 2:**
-
-```
-Input: arr = [5, 5, 5, 5]
-Output: 5
-Explanation: The largest element of given array is 5.
-```
-
-## Your Task
-
-You don't need to read input anything. Your task is to complete the function `largest()` which takes the array `arr` and an size of array as `n` as input parameters and returns the largest number.
-
-Expected Time Complexity: O(n)
-
-Expected Auxiliary Space: O(1)
-
-## Constraints
-
-* `1 <= arr.size()<= 10^5`
-
-## Problem Explanation
-
-The task is to traverse the whole array and find the largest element of that array.
-
-## Code Implementation
-
-### C++ Solution
-
-
-```cpp
-class Solution
-{
-public:
- int largest(vector &arr, int n)
- {
- int maxi = INT_MIN;
- for(int i=0; i
-
-
-
-```py
-def is_lucky(N):
- lucky_numbers = list(range(1, N + 1))
- delete_step = 2
- while delete_step <= len(lucky_numbers):
- lucky_numbers = [num for i, num in enumerate(lucky_numbers) if (i + 1) % delete_step != 0]
- delete_step += 1
- return 1 if N in lucky_numbers else 0
-
-```
-
-
-
-
-
-```cpp
-int isLucky(int N) {
- vector luckyNumbers;
- for (int i = 1; i <= N; i++) {
- luckyNumbers.push_back(i);
- }
- int deleteStep = 2;
- while (deleteStep <= luckyNumbers.size()) {
- for (int i = deleteStep - 1; i < luckyNumbers.size(); i += deleteStep) {
- luckyNumbers.erase(luckyNumbers.begin() + i);
- }
- deleteStep++;
- }
- for (int num : luckyNumbers) {
- if (num == N) {
- return 1;
- }
- }
- return 0;
-}
-
-```
-
-
-
-
-
-
-```javascript
-function isLucky(N) {
- let luckyNumbers = Array.from({ length: N }, (_, i) => i + 1);
- let deleteStep = 2;
- while (deleteStep <= luckyNumbers.length) {
- luckyNumbers = luckyNumbers.filter((_, i) => (i + 1) % deleteStep !== 0);
- deleteStep++;
- }
- return luckyNumbers.includes(N) ? 1 : 0;
-}
-```
-
-
-
-
-
-
-```typescript
-function isLucky(N) {
- let luckyNumbers = Array.from({ length: N }, (_, i) => i + 1);
- let deleteStep = 2;
- while (deleteStep <= luckyNumbers.length) {
- luckyNumbers = luckyNumbers.filter((_, i) => (i + 1) % deleteStep !== 0);
- deleteStep++;
- }
- return luckyNumbers.includes(N) ? 1 : 0;
-}
-```
-
-
-
-
-
-
-```java
-public int isLucky(int N) {
- List luckyNumbers = new ArrayList<>();
- for (int i = 1; i <= N; i++) {
- luckyNumbers.add(i);
- }
- int deleteStep = 2;
- while (deleteStep <= luckyNumbers.size()) {
- for (int i = deleteStep - 1; i < luckyNumbers.size(); i += deleteStep) {
- luckyNumbers.remove(i);
- }
- deleteStep++;
- }
- for (int num : luckyNumbers) {
- if (num == N) {
- return 1;
- }
- }
- return 0;
-}
-
-
-```
-
-
-
-
-## Time Complexity
-
-- The iterative approach has a time complexity of $O(n^2)$.
-
-## Space Complexity
-
-- The space complexity is $O(n)$ since we are using only a fixed amount of extra space.
diff --git a/dsa-solutions/gfg-solutions/Easy problems/Magic-Numbers.md b/dsa-solutions/gfg-solutions/Easy problems/Magic-Numbers.md
deleted file mode 100644
index ca2e6f9f7..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/Magic-Numbers.md
+++ /dev/null
@@ -1,202 +0,0 @@
----
-id: magic-number
-title: Magic Number
-sidebar_label: Magic-Number
-tags:
- - Easy
- - Dynamic Programming
- - Math
-description: "This tutorial covers the solution to the Magic Number problem from the GeeksforGeeks."
----
-## Problem Description
-A magic number is defined as a number that can be expressed as a power of 5 or sum of unique powers of `5`. First few magic numbers are `5`, `25`, `30(5 + 25)`, `125`, `130(125 + 5)`, …
-Given the value of `n`, find the `n`'th Magic number modulo `109+7`.
-
-## Examples
-
-**Example 1:**
-
-```
-Input: n = 1
-Output: 5
-Explanation: 1'st Magic number is 5.
-```
-
-**Example 2:**
-
-```
-Input: n = 2
-Output: 25
-Explanation: 2'nd Magic number is 25.
-```
-
-## Your Task
-
-You don't need to read input or print anything. Your task is to complete the function `nthMagicNo()` which takes n input and returns the answer with modulo `10^9+7`.
-
-Expected Time Complexity: $O(log(n))$
-
-Expected Auxiliary Space: $O(1)$ for iterative approach.
-
-## Constraints
-
-* `1 ≤ n ≤ 10^5`
-
-## Problem Explanation
-A magic number is defined as a number that can be expressed as a power of 5 or sum of unique powers of `5`. First few magic numbers are `5`, `25`, `30(5 + 25)`, `125`, `130(125 + 5)`, …
-Given the value of `n`, find the `n`'th Magic number modulo `109+7`.
-
-## Code Implementation
-
-
-
-
-
- ```py
- def get_nth_magic_number(n):
- magic_numbers = []
- power = 0
- while len(magic_numbers) < n:
- num = 5 ** power
- magic_numbers.append(num)
- for i in range(len(magic_numbers) - 1):
- magic_numbers.append(num + magic_numbers[i])
- power += 1
- return magic_numbers[n - 1] % (10**9 + 7)
-
-n = int(input("Enter the value of N: "))
-print("The {}th magic number is: {}".format(n, get_nth_magic_number(n)))
-
-
- ```
-
-
-
-
-
- ```cpp
- #include
-#include
-
-const int MOD = 1e9 + 7;
-
-int getNthMagicNumber(int n) {
- std::vector magicNumbers;
- int power = 0;
- while (magicNumbers.size() < n) {
- int num = pow(5, power);
- magicNumbers.push_back(num);
- for (int i = 0; i < magicNumbers.size() - 1; i++) {
- magicNumbers.push_back(num + magicNumbers[i]);
- }
- power++;
- }
- return magicNumbers[n - 1] % MOD;
-}
-int main() {
- int n;
- std::cout << "Enter the value of N: ";
- std::cin >> n;
- std::cout << "The " << n << "th magic number is: " << getNthMagicNumber(n) << std::endl;
- return 0;
-}
-
-
- ```
-
-
-
-
-
-
- ```javascript
-function getNthMagicNumber(n) {
- let magicNumbers = [];
- let power = 0;
- while (magicNumbers.length < n) {
- let num = Math.pow(5, power);
- magicNumbers.push(num);
- for (let i = 0; i < magicNumbers.length - 1; i++) {
- magicNumbers.push(num + magicNumbers[i]);
- }
- power++;
- }
- return magicNumbers[n - 1] % (10**9 + 7);
-}
-
-let n = parseInt(prompt("Enter the value of N:"));
-alert("The " + n + "th magic number is: " + getNthMagicNumber(n));
-
-
- ```
-
-
-
-
-
-
- ```typescript
-function getNthMagicNumber(n: number): number {
- let magicNumbers: number[] = [];
- let power: number = 0;
- while (magicNumbers.length < n) {
- let num: number = Math.pow(5, power);
- magicNumbers.push(num);
- for (let i: number = 0; i < magicNumbers.length - 1; i++) {
- magicNumbers.push(num + magicNumbers[i]);
- }
- power++;
- }
- return magicNumbers[n - 1] % (10**9 + 7);
-}
-
-let n: number = parseInt(prompt("Enter the value of N:"));
-alert("The " + n + "th magic number is: " + getNthMagicNumber(n));
-
- ```
-
-
-
-
-
-
- ```java
-
-import java.util.*;
-
-public class Main {
- public static int getNthMagicNumber(int n) {
- List magicNumbers = new ArrayList<>();
- int power = 0;
- while (magicNumbers.size() < n) {
- int num = (int) Math.pow(5, power);
- magicNumbers.add(num);
- for (int i = 0; i < magicNumbers.size() - 1; i++) {
- magicNumbers.add(num + magicNumbers.get(i));
- }
- power++;
- }
- return magicNumbers.get(n - 1) % (int) (1e9 + 7);
- }
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- System.out.print("Enter the value of N: ");
- int n = scanner.nextInt();
- System.out.println("The " + n + "th magic number is: " + getNthMagicNumber(n));
- }
-}
-
-
- ```
-
-
-
-
-
-## Time Complexity
-
-* The iterative approach has a time complexity of $O(n log n)$.
-
-## Space Complexity
-
-* The space complexity is $O(n)$ since we are using only a fixed amount of extra space.
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Easy problems/Majority-Element.md b/dsa-solutions/gfg-solutions/Easy problems/Majority-Element.md
deleted file mode 100644
index 2ba2c4995..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/Majority-Element.md
+++ /dev/null
@@ -1,168 +0,0 @@
----
-id: majority-element
-title: Majority Element
-sidebar_label: Majority-Element
-tags:
- - Beginner
- - Geeks for Geeks
- - CPP
- - Python
- - DSA
-description: "This is a solution to the Majority Element Problem on Geeks for Geeks."
----
-
-This tutorial contains a complete walk-through of the Majority Element problem from the Geeks for Geeks website. It features the implementation of the solution code in two programming languages: Python and C++.
-
-## Problem Description
-Given an array `A` of `N` elements. Find the majority element in the array. A majority element in an array `A` of size `N` is an element that appears strictly more than `N/2` times in the array.
-
-## Examples
-
-**Example 1:**
-
-```
-Input:
-N = 3
-A[] = {1,2,3}
-Output:
--1
-Explanation:
-Since, each element in
-{1,2,3} appears only once so there
-is no majority element.
-```
-
-**Example 2:**
-
-```
-Input:
-N = 5
-A[] = {3,1,3,3,2}
-Output:
-3
-Explanation:
-Since, 3 is present more
-than N/2 times, so it is
-the majority element.
-```
-
-## Your Task
-The task is to complete the function majorityElement() which returns the majority element in the array. If no majority exists, return -1.
-
-Expected Time Complexity: $O(n)$
-Expected Auxiliary Space: $O(1)$
-
-## Constraints
-
-`100 <= N <= 2*10^9`
-
-
-## Code Implementation
-
-
-
-
- ```py
- class Solution:
-
-
-def majority_element(A):
- count = 0
- candidate = None
- for num in A:
- if count == 0:
- candidate = num
- count = 1
- elif candidate == num:
- count += 1
- else:
- count -= 1
- return candidate
-
- ```
-
-
-
-
-
- ```cpp
- int majorityElement(vector& A) {
- int count = 0;
- int candidate;
- for (int num : A) {
- if (count == 0) {
- candidate = num;
- count = 1;
- } else if (candidate == num) {
- count++;
- } else {
- count--;
- }
- }
- return candidate;
-}
-
-```
-
-
-
-
-
- ```java
- public int majorityElement(int[] A) {
- int count = 0;
- int candidate = 0;
- for (int num : A) {
- if (count == 0) {
- candidate = num;
- count = 1;
- } else if (candidate == num) {
- count++;
- } else {
- count--;
- }
- }
- return candidate;
-}
-
-
- ```
-
-
-
-
-
- ```js
-
-function majorityElement(A) {
- let count = 0;
- let candidate;
- for (let num of A) {
- if (count === 0) {
- candidate = num;
- count = 1;
- } else if (candidate === num) {
- count++;
- } else {
- count--;
- }
- }
- return candidate;
-}
-
-
- ```
-
-
-
-
-
-
-
-## Time Complexity
-
-The time complexity is $O(n)$ because the operations involve a fixed number of steps regardless of the size of N:
-
-## Space Complexity
-
-The space complexity is $O(1)$ as well since the operations use a constant amount of extra space for storing the products and concatenated strings.
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Easy problems/Merge-K-Sorted-Arrays.md b/dsa-solutions/gfg-solutions/Easy problems/Merge-K-Sorted-Arrays.md
deleted file mode 100644
index 5743d6c8a..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/Merge-K-Sorted-Arrays.md
+++ /dev/null
@@ -1,130 +0,0 @@
----
-id: merge-k-sorted-arrays
-title: Merge K Sorted Arrays
-sidebar_label: Merge-K-Sorted-Arrays
-tags:
- - Sorting
- - Algorithms
-description: "This tutorial covers the solution to the Merge K Sorted Arrays problem from the GeeksforGeeks."
----
-## Problem Description
-Given `k` sorted arrays arranged in the form of a matrix of size `k * k`. The task is to merge them into one sorted array. Return the merged sorted array
-
-## Examples
-
-**Example 1:**
-
-```
-Input: k = 3, arr[][] = {{1,2,3},{4,5,6},{7,8,9}}
-Output: 1 2 3 4 5 6 7 8 9
-Explanation: Above test case has 3 sorted arrays of size 3, 3, 3 arr[][] = [[1, 2, 3],[4, 5, 6],[7, 8, 9]]. The merged list will be [1, 2, 3, 4, 5, 6, 7, 8, 9].
-```
-
-**Example 2:**
-
-```
-Input: k = 4, arr[][]={{1,2,3,4},{2,2,3,4},{5,5,6,6},{7,8,9,9}}
-Output: 1 2 2 2 3 3 4 4 5 5 6 6 7 8 9 9
-Explanation: Above test case has 4 sorted arrays of size 4, 4, 4, 4 arr[][] = [[1, 2, 2, 2], [3, 3, 4, 4], [5, 5, 6, 6], [7, 8, 9, 9 ]]. The merged list will be [1, 2, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 8, 9, 9].
-```
-
-## Constraints
-
-* `1 <= k <= 100`
-
-## Problem Explanation
-Given k sorted arrays arranged in the form of a matrix of size k * k. The task is to merge them into one sorted array. Return the merged sorted array
-
-## Code Implementation
-
-### C++ Solution
-
-```cpp
-#include
-#include
-#include
-
-std::vector mergeSortedArrays(std::vector> arrays) {
- std::vector result;
- for (const auto& array : arrays) {
- result.insert(result.end(), array.begin(), array.end());
- }
- std::sort(result.begin(), result.end());
- return result;
-}
-
-int main() {
- std::vector> arrays = { { 1, 3, 5 }, { 2, 4, 6 }, { 0, 7, 8 } };
- std::vector result = mergeSortedArrays(arrays);
- for (int num : result) {
- std::cout << num << " ";
- }
- return 0;
-}
-
-
-```
-
-```java
-
-
-import java.util.Arrays;
-
-public class Main {
- public static void main(String[] args) {
- int[][] arrays = { { 1, 3, 5 }, { 2, 4, 6 }, { 0, 7, 8 } };
- int[] result = mergeSortedArrays(arrays);
- System.out.println(Arrays.toString(result));
- }
-
- public static int[] mergeSortedArrays(int[][] arrays) {
- int[] result = new int[arrays.length * arrays[0].length];
- int index = 0;
- for (int[] array : arrays) {
- for (int num : array) {
- result[index++] = num;
- }
- }
- Arrays.sort(result);
- return result;
- }
-}
-
-
-```
-
-```python
-import itertools
-
-def merge_sorted_arrays(arrays):
- return sorted(itertools.chain(*arrays))
-
-```
-
-```javascript
-
-function mergeSortedArrays(arrays) {
- return arrays.flat().sort((a, b) => a - b);
-}
-
-
-```
-
-## Solution Logic:
-
-
-1. Flatten the 2D array:
- - Iterate through each subarray in the 2D array.
- - Concatenate each subarray to a single array.
-2. Sort the 1D array:
- - Use a sorting algorithm (e.g. quicksort, mergesort) to sort the array in ascending order.
-3. Return the sorted 1D array:
- - Return the sorted array as the final result.
-
-## Time Complexity
-
-* The time complexity is $O(n*log(n))$ where n is the total number of elements in the arrays.
-
-## Space Complexity
-
-* $O(n)$ where n is the total number of elements in the arrays.
diff --git a/dsa-solutions/gfg-solutions/Easy problems/Parenthesis-checker.md b/dsa-solutions/gfg-solutions/Easy problems/Parenthesis-checker.md
deleted file mode 100644
index 61aebbed7..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/Parenthesis-checker.md
+++ /dev/null
@@ -1,173 +0,0 @@
----
-id: parenthesis-checker
-title: Parenthesis Checker
-sidebar_label: 0017 - Parenthesis Checker
-tags:
- - Easy
- - Stack
- - GeeksforGeeks
- - CPP
- - DSA
-description: "This tutorial covers the solution to the Parenthesis Checker problem from the GeeksforGeeks website, featuring implementations in Python and C++."
----
-## Problem Description
-
-Given an expression string `x`, examine whether the pairs and the orders of `{}`, `()`, `[]` are correct in the expression.
-
-## Examples
-
-**Example 1:**
-
-```
-Input:
-x = "[()]{}{[()()]()}"
-Output: true
-Explanation: All the brackets are well-formed and properly nested.
-```
-
-**Example 2:**
-
-```
-Input:
-x = "[(])"
-Output: false
-Explanation: The brackets are not properly nested.
-```
-
-## Your Task
-
-You don't need to read input or print anything. Your task is to complete the function `ispar()` which takes the string `x` as input and returns a boolean indicating whether the string has balanced parentheses.
-
-Expected Time Complexity: $O(N)$
-
-Expected Auxiliary Space: $O(N)$
-
-## Constraints
-
-* `1 ≤ |x| ≤ 10^5`
-
-## Problem Explanation
-
-The task is to check whether the input string `x` has balanced parentheses. Balanced parentheses mean that each opening bracket has a corresponding closing bracket and the brackets are properly nested.
-
-## Code Implementation
-
-
-
-
-
- ```py
- class Solution:
- def ispar(self, x: str) -> bool:
- stack = []
- pair = {')': '(', '}': '{', ']': '['}
-
- for char in x:
- if char in '({[':
- stack.append(char)
- elif char in ')}]':
- if not stack or stack.pop() != pair[char]:
- return False
-
- return not stack
-
- # Example usage
- if __name__ == "__main__":
- solution = Solution()
- print(solution.ispar("[()]{}{[()()]()}")) # Expected output: True
- print(solution.ispar("[(])")) # Expected output: False
- ```
-
-
-
-
-
- ```cpp
- //{ Driver Code Starts
- #include
- using namespace std;
-
- // } Driver Code Ends
- class Solution {
- public:
- // Function to check if brackets are balanced or not.
- bool ispar(string x) {
- stack s;
- for (char ch : x) {
- if (ch == '(' || ch == '{' || ch == '[') {
- s.push(ch);
- } else {
- if (s.empty()) return false;
- char top = s.top();
- if ((ch == ')' && top == '(') ||
- (ch == '}' && top == '{') ||
- (ch == ']' && top == '[')) {
- s.pop();
- } else {
- return false;
- }
- }
- }
- return s.empty();
- }
- };
-
- //{ Driver Code Starts.
- int main() {
- int t;
- string a;
- cin >> t;
- while (t--) {
- cin >> a;
- Solution obj;
- if (obj.ispar(a)) {
- cout << "balanced" << endl;
- } else {
- cout << "not balanced" << endl;
- }
- }
- }
- // } Driver Code Ends
- ```
-
-
-
-
-## Example Walkthrough
-
-**Example 1:**
-
-For the input string:
-```
-x = "[()]{}{[()()]()}"
-```
-1. The string contains properly nested and balanced parentheses, so the output is true.
-
-**Example 2:**
-
-For the input string:
-```
-x = "[(])"
-```
-1. The brackets are not properly nested, so the output is false.
-
-## Solution Logic:
-
-1. Use a stack to keep track of opening brackets.
-2. Traverse the string character by character:
- - If the character is an opening bracket, push it onto the stack.
- - If the character is a closing bracket, check if it matches the top of the stack.
-3. If the stack is empty at the end, the parentheses are balanced; otherwise, they are not.
-
-## Time Complexity
-
-* The function traverses the string once, so the time complexity is $O(N)$.
-
-## Space Complexity
-
-* The function uses a stack to store opening brackets, so the auxiliary space complexity is $O(N)$.
-
-## References
-
-- **GeeksforGeeks Problem:** [Parenthesis Checker](https://www.geeksforgeeks.org/problems/parenthesis-checker2744/1)
-- **Solution Author:** [arunimad6yuq](https://www.geeksforgeeks.org/user/arunimad6yuq/)
diff --git a/dsa-solutions/gfg-solutions/Easy problems/Peak-Element.md b/dsa-solutions/gfg-solutions/Easy problems/Peak-Element.md
deleted file mode 100644
index b4a26863d..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/Peak-Element.md
+++ /dev/null
@@ -1,190 +0,0 @@
----
-id: peak-element
-title: Peak Element
-sidebar_label: Peak-Element
-tags:
- - Modular Arithmetic
- - Algorithms
-description: "This tutorial covers the solution to the Peak Element problem from the GeeksforGeeks."
----
-## Problem Description
-Given an `0`-indexed array of integers `arr[]` of size n, find its peak element and return it's index. An element is considered to be peak if it's value is greater than or equal to the values of its adjacent elements (if they exist).
-
-Note: The output will be `1` if the index returned by your function is correct; otherwise, it will be `0`.
-
-## Examples
-
-**Example 1:**
-
-```
-Input: n = 3, arr[] = {1, 2, 3}
-Output: 1
-Explanation: If the index returned is 2, then the output printed will be 1. Since arr[2] = 3 is greater than its adjacent elements, and there is no element after it, we can consider it as a peak element. No other index satisfies the same property, so answer will be printed as 0.
-```
-
-**Example 2:**
-
-```
-Input: n = 7, arr[] = {1, 1, 1, 2, 1, 1, 1}
-Output: 1
-Explanation: In this case there are 5 peak elements with indices as {0,1,3,5,6}. Returning any of them will give you correct answer.
-```
-
-
-Expected Time Complexity: O(logn)
-
-Expected Auxiliary Space: O(1)
-
-## Constraints
-
-* `1 ≤ N ≤ 10^5`
-
-## Problem Explanation
-
-The task is to traverse the array and find the peak element.
-
-## Code Implementation
-
-### C++ Solution
-
-```cpp
-#include
-#include
-
-int findPeakElement(const std::vector& arr) {
- int n = arr.size();
- if (n == 1) {
- return 0;
- }
- if (arr[0] >= arr[1]) {
- return 0;
- }
- if (arr[n - 1] >= arr[n - 2]) {
- return n - 1;
- }
- for (int i = 1; i < n - 1; i++) {
- if (arr[i] >= arr[i - 1] && arr[i] >= arr[i + 1]) {
- return i;
- }
- }
- return -1; // return -1 if no peak element is found
-}
-int main() {
- std::vector arr = {1, 3, 20, 4, 1, 0};
- int peakIndex = findPeakElement(arr);
- if (peakIndex != -1) {
- std::cout << "Peak element is at index " << peakIndex << std::endl;
- } else {
- std::cout << "No peak element found" << std::endl;
- }
- return 0;
-}
-
-
-```
-
-```java
-import java.util.*;
-
-public class Main {
- public static int findPeakElement(int[] arr) {
- int n = arr.length;
- if (n == 1) {
- return 0;
- }
- if (arr[0] >= arr[1]) {
- return 0;
- }
- if (arr[n - 1] >= arr[n - 2]) {
- return n - 1;
- }
- for (int i = 1; i < n - 1; i++) {
- if (arr[i] >= arr[i - 1] && arr[i] >= arr[i + 1]) {
- return i;
- }
- }
- return -1; // return -1 if no peak element is found
- }
- public static void main(String[] args) {
- int[] arr = {1, 3, 20, 4, 1, 0};
- int peakIndex = findPeakElement(arr);
- if (peakIndex != -1) {
- System.out.println("Peak element is at index " + peakIndex);
- } else {
- System.out.println("No peak element found");
- }
- }
-}
-
-
-```
-
-```python
-
-def find_peak_element(arr):
- n = len(arr)
- if n == 1:
- return 0
- if arr[0] >= arr[1]:
- return 0
- if arr[n - 1] >= arr[n - 2]:
- return n - 1
- for i in range(1, n - 1):
- if arr[i] >= arr[i - 1] and arr[i] >= arr[i + 1]:
- return i
- return -1 # return -1 if no peak element is found
-
-arr = [1, 3, 20, 4, 1, 0]
-peak_index = find_peak_element(arr)
-if peak_index != -1:
- print("Peak element is at index", peak_index)
-else:
- print("No peak element found")
-
-
-```
-
-```javascript
-function findPeakElement(arr) {
- let n = arr.length;
- if (n === 1) {
- return 0;
- }
- if (arr[0] >= arr[1]) {
- return 0;
- }
- if (arr[n - 1] >= arr[n - 2]) {
- return n - 1;
- }
- for (let i = 1; i < n - 1; i++) {
- if (arr[i] >= arr[i - 1] && arr[i] >= arr[i + 1]) {
- return i;
- }
- }
- return -1; // return -1 if no peak element is found
-}
-
-let arr = [1, 3, 20, 4, 1, 0];
-let peakIndex = findPeakElement(arr);
-if (peakIndex !== -1) {
- console.log(`Peak element is at index ${peakIndex}`);
-} else {
- console.log("No peak element found");
-}
-
-```
-
-## Solution Logic:
-This solution iterates through the array and checks each element to see if it's greater than or equal to its adjacent elements. If it finds such an element, it returns its index. If no such element is found, it returns -1.
-
-
-
-
-## Time Complexity
-
-* The time complexity is $O(n)$ where n is the input number.
-
-
-## Space Complexity
-
-* The auxiliary space complexity is $O(1)$ due to the only extra memory used is for temporary variables while swapping two values in Array.
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Easy problems/Perfect-Numbers.md b/dsa-solutions/gfg-solutions/Easy problems/Perfect-Numbers.md
deleted file mode 100644
index a1f754249..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/Perfect-Numbers.md
+++ /dev/null
@@ -1,164 +0,0 @@
----
-id: perfect-numbers
-title: Perfect Numbers
-tags:
- - Easy
- - GeeksforGeeks
- - CPP
- - Python
- - DSA
-description: "This tutorial covers the solution to the Perfect Numbers problem from the GeeksforGeeks."
----
-
-## Problem Description
-
-Given a number `N`, check if a number is perfect or not. A number is said to be perfect if sum of all its factors excluding the number itself is equal to the number. Return `1` if the number is Perfect otherwise return `0`.
-
-## Examples
-
-**Example 1:**
-
-```
-Input:
-N = 6
-Output:
-1
-Explanation:
-Factors of 6 are 1, 2, 3 and 6.
-Excluding 6 their sum is 6 which
-is equal to N itself. So, it's a
-Perfect Number.
-```
-
-**Example 2:**
-
-```
-Input:
-N = 10
-Output:
-0
-Explanation:
-Factors of 10 are 1, 2, 5 and 10.
-Excluding 10 their sum is 8 which
-is not equal to N itself. So, it's
-not a Perfect Number.
-```
-
-
-## Your Task
-
-You don't need to read input or print anything. Your task is to complete the function `isPerfectNumber()` which takes an Integer `N` as input and returns `1` if `N` is a Perfect number else returns `0`.
-
-Expected Time Complexity: $O(sqrt(N))$
-
-Expected Auxiliary Space: $O(1)$
-
-## Constraints
-
-- `1 ≤ n ≤ 10^12`
-
-## Problem Explanation
-Given a number `N`, check if a number is perfect or not. A number is said to be perfect if sum of all its factors excluding the number itself is equal to the number. Return `1` if the number is Perfect otherwise return `0`.
-
-
-## Code Implementation
-
-
-
-
-
- ```python
- def is_perfect(N):
- sum = 0
- for i in range(1, N):
- if N % i == 0:
- sum += i
- return (sum == N) and 1 or 0
-
- ```
-
-
-
-
-
- ```cpp
- int isPerfect(int N) {
- int sum = 0;
- for (int i = 1; i < N; i++) {
- if (N % i == 0) {
- sum += i;
- }
- }
- return (sum == N) ? 1 : 0;
-}
-
- ```
-
-
-
-
-
-
- ```javascript
-function isPerfect(N) {
- let sum = 0;
- for (let i = 1; i < N; i++) {
- if (N % i === 0) {
- sum += i;
- }
- }
- return (sum === N) ? 1 : 0;
-}
-
- ```
-
-
-
-
-
- ```typescript
-function isPerfect(N) {
- let sum = 0;
- for (let i = 1; i < N; i++) {
- if (N % i === 0) {
- sum += i;
- }
- }
- return (sum === N) ? 1 : 0;
-}
-
- ```
-
-
-
-
-
-
-
- ```java
-public int isPerfect(int N) {
- int sum = 0;
- for (int i = 1; i < N; i++) {
- if (N % i == 0) {
- sum += i;
- }
- }
- return (sum == N) ? 1 : 0;
-}
-
- ```
-
-
-
-
-## Solution Logic:
-The solution iterates through all numbers from 1 to N-1 and checks if the current number is a factor of N. If it is, it adds the number to the sum. Finally, it checks if the sum is equal to N. If it is, the number is perfect, and the function returns 1. Otherwise, it returns 0.
-
-
-## Time Complexity
-
-- The function operates in constant time, $O(N)$ where N is the input number. This is because the solution iterates through all numbers from 1 to N-1.
-
-## Space Complexity
-
-- The function uses constant space, $O(1)$, because it only uses a few extra variables to store the sum and the current number.
diff --git a/dsa-solutions/gfg-solutions/Easy problems/Plus-One.md b/dsa-solutions/gfg-solutions/Easy problems/Plus-One.md
deleted file mode 100644
index 17be81b61..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/Plus-One.md
+++ /dev/null
@@ -1,175 +0,0 @@
----
-id: plus-one
-title: Plus One
-sidebar_label: Plus-One
-tags:
- - Arrays
- - STL
-description: "This tutorial covers the solution to the Plus One problem from the GeeksforGeeks."
----
-## Problem Description
-Given a non-negative number represented as a list of digits, add `1` to the number (increment the number represented by the digits). The digits are stored such that the most significant digit is first element of array.
-
-
-
-## Examples
-
-**Example 1:**
-
-```
-Input:
-N = 3
-arr[] = {1, 2, 4}
-Output:
-1 2 5
-Explanation:
-124+1 = 125, and so the Output
-```
-
-**Example 2:**
-
-```
-Input:
-N = 3
-arr[] = {9,9,9}
-Output:
-1 0 0 0
-Explanation:
-999+1 = 1000, and so the output
-```
-
-## Your Task
-
-You don't need to read input or print anything. You only need to complete the function `increment()` that takes an integer N, and an array arr of size N as input and returns a list of integers denoting the new number which we get after adding one to the number denoted by the array arr.
-
-Expected Time Complexity: $O(n)$
-
-Expected Auxiliary Space: $O(1)$ for iterative approach.
-
-## Constraints
-
-* `1 ≤ n ≤ 10^5`
-
-## Problem Explanation
-
-Given a non-negative number represented as a list of digits, add `1` to the number (increment the number represented by the digits). The digits are stored such that the most significant digit is first element of array.
-
-## Code Implementation
-
-
-
-
-
- ```py
- def increment(digits):
- for i in range(len(digits) - 1, -1, -1):
- if digits[i] == 9:
- digits[i] = 0
- else:
- digits[i] += 1
- return digits
- digits.insert(0, 1)
- return digits
-
- ```
-
-
-
-
-
- ```cpp
-vector increment(vector& digits) {
- for (int i = digits.size() - 1; i >= 0; --i) {
- if (digits[i] == 9) {
- digits[i] = 0;
- } else {
- digits[i]++;
- return digits;
- }
- }
- digits.insert(digits.begin(), 1);
- return digits;
-}
-
- ```
-
-
-
-
-
-
- ```javascript
-function increment(digits) {
- for (let i = digits.length - 1; i >= 0; --i) {
- if (digits[i] === 9) {
- digits[i] = 0;
- } else {
- digits[i]++;
- return digits;
- }
- }
- digits.unshift(1);
- return digits;
-}
-
-
-
- ```
-
-
-
-
-
-
- ```typescript
-function increment(digits) {
- for (let i = digits.length - 1; i >= 0; --i) {
- if (digits[i] === 9) {
- digits[i] = 0;
- } else {
- digits[i]++;
- return digits;
- }
- }
- digits.unshift(1);
- return digits;
-}
-
-
-
- ```
-
-
-
-
-
-
- ```java
-public List increment(List digits) {
- for (int i = digits.size() - 1; i >= 0; --i) {
- if (digits.get(i) == 9) {
- digits.set(i, 0);
- } else {
- digits.set(i, digits.get(i) + 1);
- return digits;
- }
- }
- digits.add(0, 1);
- return digits;
-}
-
-
-
- ```
-
-
-
-
-
-## Time Complexity
-
-* The iterative approach has a time complexity of $O(n)$.
-
-## Space Complexity
-
-* The space complexity is $O(1)$ since we are using only a fixed amount of extra space.
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Easy problems/Power-Of-Two.md b/dsa-solutions/gfg-solutions/Easy problems/Power-Of-Two.md
deleted file mode 100644
index e317e806e..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/Power-Of-Two.md
+++ /dev/null
@@ -1,204 +0,0 @@
----
-id: power-of-2
-title: Power of 2
-tags:
- - Easy
- - Bit Manipulation
- - GeeksforGeeks
- - CPP
- - Python
- - DSA
-description: "This tutorial covers the solution to the Power of 2 problem from the GeeksforGeeks."
----
-
-## Problem Description
-
-Given a non-negative integer `n`, the task is to check if it is a power of 2.
-
-## Examples
-
-**Example 1:**
-
-```
-Input: n = 1
-Output: true
-Explanation: 2^0 = 1
-```
-
-**Example 2:**
-
-```
-Input: n = 16
-Output: true
-Explanation: 2^4 = 16
-```
-
-**Example 3:**
-
-```
-Input: n = 3
-Output: false
-Explanation: 3 is not a power of 2
-```
-
-## Your Task
-
-You don't need to read input or print anything. Your task is to complete the function `isPowerofTwo()` which takes an integer `n` as input and returns `true` if `n` is a power of 2, otherwise `false`.
-
-Expected Time Complexity: $O(1)$
-
-Expected Auxiliary Space: $O(1)$
-
-## Constraints
-
-- `0 ≤ n ≤ 10^18`
-
-## Problem Explanation
-
-A number is a power of 2 if there exists an integer `x` such that `n = 2^x`.
-
-## Code Implementation
-
-
-
-
-
- ```python
- class Solution:
- def isPowerofTwo(self, n: int) -> bool:
- if n <= 0:
- return False
- # A power of two has exactly one bit set in binary representation
- return (n & (n - 1)) == 0
-
- # Example usage
- if __name__ == "__main__":
- solution = Solution()
- print(solution.isPowerofTwo(16)) # Expected output: True
- print(solution.isPowerofTwo(3)) # Expected output: False
- ```
-
-
-
-
-
- ```cpp
- #include
- using namespace std;
-
- class Solution {
- public:
- // Function to check if given number n is a power of two.
- bool isPowerofTwo(long long n) {
- if (n <= 0) return false;
- // A power of two has exactly one bit set in binary representation
- return (n & (n - 1)) == 0;
- }
- };
-
- int main() {
- int t;
- cin >> t; // testcases
-
- for (int i = 0; i < t; i++) {
- long long n; // input a number n
- cin >> n;
- Solution ob;
- if (ob.isPowerofTwo(n))
- cout << "true" << endl;
- else
- cout << "false" << endl;
- }
- return 0;
- }
- ```
-
-
-
-
-
-
- ```javascript
-class Solution {
- isPowerofTwo(n) {
- if (n <= 0) return false;
- return (n & (n - 1)) == 0;
- }
-}
-
-let t = parseInt(prompt("Enter number of testcases"));
-for (let i = 0; i < t; i++) {
- let n = parseInt(prompt("Enter a number"));
- let sol = new Solution();
- console.log(sol.isPowerofTwo(n));
-}
-
- ```
-
-
-
-
-
- ```typescript
-class Solution {
- isPowerofTwo(n: number): boolean {
- if (n <= 0) return false;
- return (n & (n - 1)) == 0;
- }
-}
-
-let t: number = parseInt(prompt("Enter number of testcases"));
-for (let i: number = 0; i < t; i++) {
- let n: number = parseInt(prompt("Enter a number"));
- let sol: Solution = new Solution();
- console.log(sol.isPowerofTwo(n));
-}
-
- ```
-
-
-
-
-
-
-
- ```java
-import java.util.Scanner;
-
-class Solution {
- boolean isPowerofTwo(long n) {
- if (n <= 0) return false;
- return (n & (n - 1)) == 0;
- }
-}
-
-public class Main {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- int t = sc.nextInt();
- for (int i = 0; i < t; i++) {
- long n = sc.nextLong();
- Solution sol = new Solution();
- System.out.println(sol.isPowerofTwo(n));
- }
- }
-}
-
- ```
-
-
-
-
-## Solution Logic:
-
-1. A number `n` is a power of 2 if it has exactly one bit set in its binary representation.
-2. To check this, you can use the property: `n & (n - 1) == 0`.
-3. This expression is true only for powers of 2.
-
-## Time Complexity
-
-- The function operates in constant time, $O(1)$.
-
-## Space Complexity
-
-- The function uses constant space, $O(1)$.
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Easy problems/Print-Pattern.md b/dsa-solutions/gfg-solutions/Easy problems/Print-Pattern.md
deleted file mode 100644
index 0f42e4752..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/Print-Pattern.md
+++ /dev/null
@@ -1,119 +0,0 @@
----
-id: print-pattern
-title: Print Pattern
-sidebar_label: Print-Pattern
-tags:
- - Recursion
- - Algorithms
-description: "This tutorial covers the solution to the Print Pattern problem from the GeeksforGeeks."
----
-## Problem Description
-Print a sequence of numbers starting with nn, without using a loop. Replace `nn` with `n−5n - 5n−5` until `n≤0n` `\leq 0n≤0`. Then, replace n with `n+5n + 5n+5` until `nn` regains its initial value. Complete the function pattern(n) which takes n as input and returns a list containing the pattern.
-
-## Examples
-
-**Example 1:**
-
-```
-Input: n = 16
-Output: 16 11 6 1 -4 1 6 11 16
-Explanation: The value decreases until it is greater than 0. After that it increases and stops when it becomes 16 again.
-```
-
-**Example 2:**
-
-```
-Input: n = 10
-Output: 10 5 0 5 10
-Explanation: It follows the same logic as per the above example.
-```
-
-
-
-Expected Time Complexity: $O(n)$
-
-Expected Auxiliary Space: $O(n)$ for dynamic programming
-
-## Constraints
-
-* `-10^5 ≤ n ≤ 10^5`
-
-## Problem Explanation
-Print a sequence of numbers starting with nn, without using a loop. Replace `nn` with `n−5n - 5n−5` until `n≤0n` `\leq 0n≤0`. Then, replace n with `n+5n + 5n+5` until nn regains its initial value. Complete the function pattern(n) which takes n as input and returns a list containing the pattern.
-
-## Code Implementation
-
-
-
-
-
- ```py
- def pattern(n, initial=None, result=None):
- if result is None:
- result = []
- if initial is None:
- initial = n
- if n > 0:
- result.append(n)
- return pattern(n - 5, initial, result)
- elif n < initial:
- result.append(n)
- return pattern(n + 5, initial, result)
- return result
-
- ```
-
-
-
-
-
- ```cpp
- vector pattern(int n) {
- vector result;
- while (n > 0) {
- result.push_back(n);
- n -= 5;
- }
- while (n < result[0]) {
- result.push_back(n);
- n += 5;
- }
- return result;
-}
-
-
- ```
-
-
-
-
-
-
-
- ```java
-public List pattern(int n) {
- List result = new ArrayList<>();
- while (n > 0) {
- result.add(n);
- n -= 5;
- }
- while (n < result.get(0)) {
- result.add(n);
- n += 5;
- }
- return result;
-}
-
- ```
-
-
-
-
-
-## Time Complexity
-
-* The iterative approach has a time complexity of $O(n)$ because we are iterating through the sequence of numbers twice: once from n to 0, and once from 0 to n.
-
-## Space Complexity
-
-* The space complexity is O(n) because we are storing the sequence of numbers in the result list.
diff --git a/dsa-solutions/gfg-solutions/Easy problems/Selection-Sort.md b/dsa-solutions/gfg-solutions/Easy problems/Selection-Sort.md
deleted file mode 100644
index cc178a070..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/Selection-Sort.md
+++ /dev/null
@@ -1,267 +0,0 @@
----
-id: selection-sort
-title: Selection Sort
-sidebar_label: Selection-Sort
-tags:
- - Sorting
- - Algorithms
-description: "This tutorial covers the solution to the SelectionSort problem from the GeeksforGeeks."
----
-## Problem Description
-
-Given an unsorted array of size `N`, use selection sort to sort `arr[]` in increasing order.
-
-## Examples
-
-**Example 1:**
-
-```
-Input:
-N = 5
-arr[] = {4, 1, 3, 9, 7}
-Output:
-1 3 4 7 9
-Explanation:
-Maintain sorted (in bold) and unsorted subarrays.
-Select 1. Array becomes 1 4 3 9 7.
-Select 3. Array becomes 1 3 4 9 7.
-Select 4. Array becomes 1 3 4 9 7.
-Select 7. Array becomes 1 3 4 7 9.
-Select 9. Array becomes 1 3 4 7 9.
-```
-
-**Example 2:**
-
-```
-Input:
-N = 10
-arr[] = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1}
-Output:
-1 2 3 4 5 6 7 8 9 10
-```
-
-## Your Task
-You dont need to read input or print anything. Complete the functions select() and selectionSort() ,where select() takes arr[] and starting point of unsorted array i as input parameters and returns the selected element for each iteration in selection sort, and selectionSort() takes the array and it's size and sorts the array.
-
-Expected Time Complexity: O(N^2)
-
-Expected Auxiliary Space: O(1)
-
-## Constraints
-
-* `1 ≤ N ≤ 10^3`
-
-## Problem Explanation
-
-The task is to traverse the array and sort the array using selection sort.
-
-## Code Implementation
-
-### C++ Solution
-
-```cpp
-
-// C++ program for implementation of
-// selection sort
-#include
-using namespace std;
-
-// Function for Selection sort
-void selectionSort(int arr[], int n)
-{
- int i, j, min_idx;
-
- // One by one move boundary of
- // unsorted subarray
- for (i = 0; i < n - 1; i++) {
-
- // Find the minimum element in
- // unsorted array
- min_idx = i;
- for (j = i + 1; j < n; j++) {
- if (arr[j] < arr[min_idx])
- min_idx = j;
- }
-
- // Swap the found minimum element
- // with the first element
- if (min_idx != i)
- swap(arr[min_idx], arr[i]);
- }
-}
-
-// Function to print an array
-void printArray(int arr[], int size)
-{
- int i;
- for (i = 0; i < size; i++) {
- cout << arr[i] << " ";
- cout << endl;
- }
-}
-
-// Driver program
-int main()
-{
- int arr[] = { 64, 25, 12, 22, 11 };
- int n = sizeof(arr) / sizeof(arr[0]);
-
- // Function Call
- selectionSort(arr, n);
- cout << "Sorted array: \n";
- printArray(arr, n);
- return 0;
-}
-
-```
-
-```java
-// Java program for implementation of Selection Sort
-import java.io.*;
-public class SelectionSort
-{
- void sort(int arr[])
- {
- int n = arr.length;
-
- // One by one move boundary of unsorted subarray
- for (int i = 0; i < n-1; i++)
- {
- // Find the minimum element in unsorted array
- int min_idx = i;
- for (int j = i+1; j < n; j++)
- if (arr[j] < arr[min_idx])
- min_idx = j;
-
- // Swap the found minimum element with the first
- // element
- int temp = arr[min_idx];
- arr[min_idx] = arr[i];
- arr[i] = temp;
- }
- }
-
- // Prints the array
- void printArray(int arr[])
- {
- int n = arr.length;
- for (int i=0; i A[j]:
- min_idx = j
-
- # Swap the found minimum element with
- # the first element
- A[i], A[min_idx] = A[min_idx], A[i]
-
-# Driver code to test above
-print ("Sorted array")
-for i in range(len(A)):
- print(A[i],end=" ")
-
-```
-
-```javascript
-
-
-```
-
-## Solution Logic:
-
-1. For the first position in the sorted array, the whole array is traversed from index 0 to 4 sequentially. The first position where 64 is stored presently, after traversing whole array it is clear that 11 is the lowest value.
-
-2. Thus, replace 64 with 11. After one iteration 11, which happens to be the least value in the array, tends to appear in the first position of the sorted list.
-
-3. For the second position, where 25 is present, again traverse the rest of the array in a sequential manner.
-
-4. After traversing, we found that 12 is the second lowest value in the array and it should appear at the second place in the array, thus swap these values.
-
-5. Now, for third place, where 25 is present again traverse the rest of the array and find the third least value present in the array.
-
-6. While traversing, 22 came out to be the third least value and it should appear at the third place in the array, thus swap 22 with element present at third position.
-
-7. Similarly, for fourth position traverse the rest of the array and find the fourth least element in the array
-
-8. As 25 is the 4th lowest value hence, it will place at the fourth position.
-
-9. At last the largest value present in the array automatically get placed at the last position in the array
-
-10. The resulted array is the sorted array.
-
-## Time Complexity
-
-* The time complexity is $O(N^2)$ as there are two nested loops
-
-## Space Complexity
-
-* The auxiliary space complexity is $O(1)$ due to the only extra memory used is for temporary variables while swapping two values in Array. The selection sort never makes more than $O(N)$ swaps and can be useful when memory writing is costly.
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Easy problems/Sort-0s-1s-2s.md b/dsa-solutions/gfg-solutions/Easy problems/Sort-0s-1s-2s.md
deleted file mode 100644
index 744199276..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/Sort-0s-1s-2s.md
+++ /dev/null
@@ -1,176 +0,0 @@
----
-id: sort-0s-1s-2s
-title: Sort 0s, 1s And 2s
-sidebar_label: Sort-0s-1s-and-2s
-tags:
- - Arrays
- - Sorting
-description: "This tutorial covers the solution to the SSort 0s, 1s and 2s problem from the GeeksforGeeks website."
----
-## Problem Description
-Given an array of size `N` containing only `0s`, `1s`, and `2s`; sort the array in ascending order.
-
-## Examples
-
-**Example 1:**
-
-```
-Input:
-N = 5
-arr[]= {0 2 1 2 0}
-Output:
-0 0 1 2 2
-Explanation:
-0s 1s and 2s are segregated
-into ascending order.
-```
-
-**Example 2:**
-
-```
-Input:
-N = 3
-arr[] = {0 1 0}
-Output:
-0 0 1
-Explanation:
-0s 1s and 2s are segregated
-into ascending order.
-```
-
-## Your Task
-You don't need to read input or print anything. Your task is to complete the function sort012() that takes an array arr and N as input parameters and sorts the array in-place.
-
-
-
-Expected Time Complexity: O(N)
-
-Expected Auxiliary Space: O(1)
-
-## Constraints
-
-* `1 <= N <= 10^6`
-
-## Problem Explanation
-
-The task is to traverse the array and sort 0s, 1s, 2s.
-
-## Code Implementation
-
-### C++ Solution
-
-```cpp
-void sortArray(vector& arr) {
- int low = 0, mid = 0, high = arr.size() - 1;
- while (mid <= high) {
- if (arr[mid] == 0) {
- swap(arr[low], arr[mid]);
- low++;
- mid++;
- } else if (arr[mid] == 1) {
- mid++;
- } else {
- swap(arr[mid], arr[high]);
- high--;
- }
- }
-}
-```
-
-```java
-public void sortArray(int[] arr) {
- int low = 0, mid = 0, high = arr.length - 1;
- while (mid <= high) {
- if (arr[mid] == 0) {
- swap(arr, low, mid);
- low++;
- mid++;
- } else if (arr[mid] == 1) {
- mid++;
- } else {
- swap(arr, mid, high);
- high--;
- }
- }
-}
-public void swap(int[] arr, int i, int j) {
- int temp = arr[i];
- arr[i] = arr[j];
- arr[j] = temp;
-}
-
-
-```
-
-```python
-def sortArray(arr):
- low, mid, high = 0, 0, len(arr) - 1
- while mid <= high:
- if arr[mid] == 0:
- arr[low], arr[mid] = arr[mid], arr[low]
- low += 1
- mid += 1
- elif arr[mid] == 1:
- mid += 1
- else:
- arr[mid], arr[high] = arr[high], arr[mid]
- high -= 1
-
-
-
-```
-
-```javascript
-function sortArray(arr) {
- let low = 0, mid = 0, high = arr.length - 1;
- while (mid <= high) {
- if (arr[mid] === 0) {
- [arr[low], arr[mid]] = [arr[mid], arr[low]];
- low++;
- mid++;
- } else if (arr[mid] === 1) {
- mid++;
- } else {
- [arr[mid], arr[high]] = [arr[high], arr[mid]];
- high--;
- }
- }
-}
-
-
-```
-
-```typescript
-function sortArray(arr) {
- let low = 0, mid = 0, high = arr.length - 1;
- while (mid <= high) {
- if (arr[mid] === 0) {
- [arr[low], arr[mid]] = [arr[mid], arr[low]];
- low++;
- mid++;
- } else if (arr[mid] === 1) {
- mid++;
- } else {
- [arr[mid], arr[high]] = [arr[high], arr[mid]];
- high--;
- }
- }
-}
-
-```
-
-## Solution Logic:
-The solution uses a variation of the Dutch National Flag algorithm, which is used to sort an array of 0s, 1s, and 2s. The algorithm uses three pointers: low, mid, and high. The low pointer is used to track the position of the next 0, the mid pointer is used to track the position of the next 1, and the high pointer is used to track the position of the next 2.
-
-
-
-
-## Time Complexity
-
-* The time complexity is $O(N)$,where N is the length of the array. This is because we only need to iterate through the array once to sort it.
-
-
-
-## Space Complexity
-
-* The auxiliary space complexity is $O(1)$ due to the algorithm only uses a fixed amount of space to store the indices and the target element.
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Easy problems/Special-Number.md b/dsa-solutions/gfg-solutions/Easy problems/Special-Number.md
deleted file mode 100644
index ba20e3bd7..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/Special-Number.md
+++ /dev/null
@@ -1,183 +0,0 @@
----
-id: special-numbers
-title: Special Numbers
-sidebar_label: Special-Numbers
-tags:
- - Mathematical
- - Algorithms
-description: "This tutorial covers the solution to the Special Numbers problem from the GeeksforGeeks."
----
-## Problem Description
-
-A number is a special number if it’s digits only consist `0`, `1`, `2`, `3`, `4` or `5`. Given a number N and we have to find N-th Special Number.
-
-## Examples
-
-**Example 1:**
-
-```
-Input:
-N = 6
-Output: 5
-Explanation: First 6 numbers are
-( 0, 1, 2, 3, 4, 5 )
-```
-
-**Example 2:**
-
-```
-Input:
-N = 7
-Output: 10
-Explanation: First 7 numbers are
-( 0, 1, 2, 3, 4, 5, 10 )
-```
-
-
-Expected Time Complexity: O(logN)
-
-Expected Auxiliary Space: O(1)
-
-## Constraints
-
-* `1 ≤ N ≤ 10^5`
-
-## Problem Explanation
-
-The task is to traverse the number and count the digits.
-
-## Code Implementation
-
-### C++ Solution
-
-```cpp
-int findNthSpecial(int N) {
- int count = 0;
- int num = 0;
- while (true) {
- num++;
- if (isSpecial(num)) {
- count++;
- if (count == N) {
- return num;
- }
- }
- }
-}
-
-bool isSpecial(int num) {
- while (num > 0) {
- int digit = num % 10;
- if (digit > 5) {
- return false;
- }
- num /= 10;
- }
- return true;
-}
-
-
-
-```
-
-```java
-public int findNthSpecial(int N) {
- int count = 0;
- int num = 0;
- while (true) {
- num++;
- if (isSpecial(num)) {
- count++;
- if (count == N) {
- return num;
- }
- }
- }
-}
-
-public boolean isSpecial(int num) {
- while (num > 0) {
- int digit = num % 10;
- if (digit > 5) {
- return false;
- }
- num /= 10;
- }
- return true;
-}
-
-
-```
-
-```python
-
-def find_nth_special(N):
- count = 0
- num = 0
- while True:
- num += 1
- if is_special(num):
- count += 1
- if count == N:
- return num
-
-def is_special(num):
- while num > 0:
- digit = num % 10
- if digit > 5:
- return False
- num //= 10
- return True
-
-
-```
-
-```javascript
-function findNthSpecial(N) {
- let count = 0;
- let num = 0;
- while (true) {
- num++;
- if (isSpecial(num)) {
- count++;
- if (count === N) {
- return num;
- }
- }
- }
-}
-
-function isSpecial(num) {
- while (num > 0) {
- const digit = num % 10;
- if (digit > 5) {
- return false;
- }
- num = Math.floor(num / 10);
- }
- return true;
-}
-
-
-
-```
-
-## Solution Logic:
-1. Initialize a counter count to 0 and a number num to 0.
-2. Iterate through numbers starting from 1.
-3. For each number, check if it's special (i.e., its digits only consist of 0, 1, 2, 3, 4, or 5) using the isSpecial function.
-4. If the number is special, increment the count.
-5. If the count reaches N, return the current number.
-6. Repeat steps 2-5 until the N-th special number is found.
-
-## Time Complexity
-
-- The `isSpecial` function has a time complexity of O(log num), where num is the input number, because it iterates through the digits of the number.
-
-- The main function findNthSpecial has a time complexity of O(N log M), where N is the input number and M is the N-th special number, because it iterates through numbers and calls the isSpecial function for each number.
-
-
-
-## Space Complexity
-
-- The solution uses a constant amount of space to store the count and num variables, so the space complexity is O(1).
diff --git a/dsa-solutions/gfg-solutions/Easy problems/Square-Root.md b/dsa-solutions/gfg-solutions/Easy problems/Square-Root.md
deleted file mode 100644
index 47f866b73..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/Square-Root.md
+++ /dev/null
@@ -1,194 +0,0 @@
----
----
-id: square-root
-title: Square Root
-sidebar_label: Square-Root
-tags:
- - Math
- - Binary Search
-description: "This document provides solutions to the problem of finding the Square Root of an integer."
----
-
-## Problem
-
-Given an integer `x`, find the square root of `x`. If `x` is not a perfect square, then return the floor value of √x.
-
-### Examples
-
-**Example 1:**
-
-```
-Input: x = 5
-Output: 2
-Explanation: Since 5 is not a perfect square, the floor of the square root of 5 is 2.
-```
-
-**Example 2:**
-
-```
-Input: x = 4
-Output: 2
-Explanation: Since 4 is a perfect square, its square root is 2.
-```
-
-### Your Task
-
-You don't need to read input or print anything. The task is to complete the function `floorSqrt()` which takes `x` as the input parameter and returns its square root. Note: Try solving the question without using the sqrt function. The value of `x` ≥ 0.
-
-**Expected Time Complexity:** $O(log N)$
-**Expected Auxiliary Space:** $O(1)$
-
-**Constraints**
-
-- `1 ≤ x ≤ 10^7`
-
-## Solution
-
-### Intuition & Approach
-
-To find the square root of a number without using the built-in `sqrt` function, we can use binary search. This approach leverages the fact that the square root of `x` must lie between `0` and `x`. By repeatedly narrowing down the range using binary search, we can efficiently find the floor value of the square root.
-
-### Implementation
-
-
-
-
-```python
-class Solution:
- def floorSqrt(self, x: int) -> int:
- if x == 0 or x == 1:
- return x
- start, end = 1, x
- ans = 0
- while start <= end:
- mid = (start + end) // 2
- if mid * mid == x:
- return mid
- if mid * mid < x:
- start = mid + 1
- ans = mid
- else:
- end = mid - 1
- return ans
-```
-
-
-
-
-```java
-class Solution {
- long floorSqrt(long x) {
- if (x == 0 || x == 1) {
- return x;
- }
- long start = 1, end = x, ans = 0;
- while (start <= end) {
- long mid = (start + end) / 2;
- if (mid * mid == x) {
- return mid;
- }
- if (mid * mid < x) {
- start = mid + 1;
- ans = mid;
- } else {
- end = mid - 1;
- }
- }
- return ans;
- }
-}
-```
-
-
-
-
-```cpp
-class Solution {
-public:
- long long int floorSqrt(long long int x) {
- if (x == 0 || x == 1)
- return x;
- long long int start = 1, end = x, ans = 0;
- while (start <= end) {
- long long int mid = (start + end) / 2;
- if (mid * mid == x)
- return mid;
- if (mid * mid < x) {
- start = mid + 1;
- ans = mid;
- } else {
- end = mid - 1;
- }
- }
- return ans;
- }
-};
-```
-
-
-
-
-```javascript
-class Solution {
- floorSqrt(x) {
- if (x === 0 || x === 1) {
- return x;
- }
- let start = 1,
- end = x,
- ans = 0;
- while (start <= end) {
- let mid = Math.floor((start + end) / 2);
- if (mid * mid === x) {
- return mid;
- }
- if (mid * mid < x) {
- start = mid + 1;
- ans = mid;
- } else {
- end = mid - 1;
- }
- }
- return ans;
- }
-}
-```
-
-
-
-
-```typescript
-class Solution {
- floorSqrt(x: number): number {
- if (x === 0 || x === 1) {
- return x;
- }
- let start = 1,
- end = x,
- ans = 0;
- while (start <= end) {
- let mid = Math.floor((start + end) / 2);
- if (mid * mid === x) {
- return mid;
- }
- if (mid * mid < x) {
- start = mid + 1;
- ans = mid;
- } else {
- end = mid - 1;
- }
- }
- return ans;
- }
-}
-```
-
-
-
-
-## Complexity Analysis
-
-The provided solutions efficiently find the floor value of the square root of a given integer `x` using binary search. This approach ensures a time complexity of $ O(log N) and an auxiliary space complexity of $O(1)$. The algorithms are designed to handle large values of `x` up to 10^7 efficiently without relying on built-in square root functions.
-
-**Time Complexity:** $O(log N)$
-**Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Easy problems/Star- Element.md b/dsa-solutions/gfg-solutions/Easy problems/Star- Element.md
deleted file mode 100644
index 368cdc082..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/Star- Element.md
+++ /dev/null
@@ -1,192 +0,0 @@
----
-id: star-elements
-title: Star Elements
-sidebar_label: Star-Elements
-tags:
- - Modular Arithmetic
- - Algorithms
-description: "This tutorial covers the solution to the Star elements problem from the GeeksforGeeks."
----
-## Problem Description
-Given an unsorted array `arr` of size `n`. The task is to find all the star and super star elements in the array. Star are those elements which are strictly greater than all the elements on its right side. Super star are those elements which are strictly greater than all the elements on its left and right side.
-
-Note: Assume first element (`arr[0]`) is greater than all the elements on its left side, And last element `(arr[n-1])` is greater than all the elements on its right side.
-
-## Examples
-
-**Example 1:**
-
-```
-Input:
-n = 10
-arr[] = {1, 6, 5, 4, 7, 8, 4, 3, 2, 1}
-Output:
-8 4 3 2 1
-8
-Explanation: Star elements are 8, 4, 3, 2 and 1.
-Super star element is 8.
-```
-
-**Example 2:**
-
-```
-Input:
-a = 9
-arr[] = {1, 2, 10, 3, 4, 5, 8, 10, 4}
-Output:
-10 4
--1
-Explanation: Star elements are 10 and 4.
-No super star element present here.
-```
-
-
-Expected Time Complexity: O(n)
-
-Expected Auxiliary Space: O(1)
-
-## Constraints
-
-* `1 ≤ N ≤ 10^6`
-
-## Problem Explanation
-
-The task is to traverse the array and search the number.
-
-## Code Implementation
-
-### C++ Solution
-
-```cpp
-#include
-using namespace std;
-
-void findStars(int arr[], int n) {
- int maxRight = arr[n-1];
- cout << "Super Stars: ";
- for (int i = n-1; i >= 0; i--) {
- if (arr[i] > maxRight) {
- cout << arr[i] << " ";
- maxRight = arr[i];
- }
- }
- cout << endl;
- cout << "Stars: ";
- maxRight = arr[n-1];
- for (int i = n-2; i >= 0; i--) {
- if (arr[i] > maxRight) {
- cout << arr[i] << " ";
- maxRight = arr[i];
- }
- }
- cout << endl;
-}
-
-int main() {
- int arr[] = {4, 6, 3, 7, 2, 8};
- int n = sizeof(arr)/sizeof(arr[0]);
- findStars(arr, n);
- return 0;
-}
-
-
-
-```
-
-```java
-
-public class Main {
- public static void findStars(int[] arr) {
- int maxRight = arr[arr.length-1];
- System.out.print("Super Stars: ");
- for (int i = arr.length-1; i >= 0; i--) {
- if (arr[i] > maxRight) {
- System.out.print(arr[i] + " ");
- maxRight = arr[i];
- }
- }
- System.out.println();
- System.out.print("Stars: ");
- maxRight = arr[arr.length-1];
- for (int i = arr.length-2; i >= 0; i--) {
- if (arr[i] > maxRight) {
- System.out.print(arr[i] + " ");
- maxRight = arr[i];
- }
- }
- System.out.println();
- }
-
- public static void main(String[] args) {
- int[] arr = {4, 6, 3, 7, 2, 8};
- findStars(arr);
- }
-}
-
-
-
-```
-
-```python
-def find_stars(arr):
- max_right = arr[-1]
- super_stars = []
- for i in range(len(arr)-1, -1, -1):
- if arr[i] > max_right:
- super_stars.append(arr[i])
- max_right = arr[i]
- print("Super Stars:", super_stars)
- max_right = arr[-1]
- stars = []
- for i in range(len(arr)-2, -1, -1):
- if arr[i] > max_right:
- stars.append(arr[i])
- max_right = arr[i]
- print("Stars:", stars)
-
-arr = [4, 6, 3, 7, 2, 8]
-find_stars(arr)
-
-```
-
-```javascript
-function findStars(arr) {
- let maxRight = arr[arr.length-1];
- let superStars = [];
- for (let i = arr.length-1; i >= 0; i--) {
- if (arr[i] > maxRight) {
- superStars.push(arr[i]);
- maxRight = arr[i];
- }
- }
- console.log("Super Stars:", superStars);
- maxRight = arr[arr.length-1];
- let stars = [];
- for (let i = arr.length-2; i >= 0; i--) {
- if (arr[i] > maxRight) {
- stars.push(arr[i]);
- maxRight = arr[i];
- }
- }
- console.log("Stars:", stars);
-}
-
-
-```
-
-## Solution Logic:
-1. Initialize maxRight to the last element of the array.
-2. Iterate through the array from right to left (starting from the second last element).
-3. For each element, check if it is greater than maxRight. If it is, add it to the stars array and update maxRight.
-4. Repeat steps 2-3 until the beginning of the array is reached.
-5. To find super stars, repeat steps 2-4, but add elements to the superStars array only if they are greater than maxRight and also greater than all elements on their left side.
-
-
-## Time Complexity
-
-* The time complexity is $O(log(n))$ where n is the input number.
-
-
-## Space Complexity
-
-* The auxiliary space complexity is $O(1)$ due to the only extra memory used is for temporary variables while swapping two values in Array.
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Easy problems/anagram-1587115620.md b/dsa-solutions/gfg-solutions/Easy problems/anagram-1587115620.md
deleted file mode 100644
index 2e6a50099..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/anagram-1587115620.md
+++ /dev/null
@@ -1,149 +0,0 @@
----
-id: check-if-strings-are-anagram
-title: Check if Two Strings are Anagram (gfg)
-sidebar_label: 0008 - Check if Two Strings are Anagram
-tags:
- - Easy
- - String
- - GeeksforGeeks
- - CPP
- - Python
- - DSA
-description: "This tutorial covers the solution to the Check if Two Strings are Anagram problem from the GeeksforGeeks website, featuring implementations in Python and C++."
----
-## Problem Description
-
-Given two strings `a` and `b` consisting of lowercase characters, the task is to check whether the two given strings are an anagram of each other or not. An anagram of a string is another string that contains the same characters, only the order of characters can be different. For example, `act` and `tac` are an anagram of each other. Strings `a` and `b` can only contain lowercase alphabets.
-
-## Examples
-
-**Example 1:**
-
-```
-Input: a = "listen", b = "silent"
-Output: YES
-Explanation: The characters in both strings are the same.
-```
-
-**Example 2:**
-
-```
-Input: a = "hello", b = "billion"
-Output: NO
-Explanation: The characters in the strings are different.
-```
-
-## Your Task
-
-You don't need to read input or print anything. Your task is to complete the function `isAnagram()` which takes the strings `a` and `b` as inputs and returns a boolean indicating whether the two strings are an anagram of each other.
-
-Expected Time Complexity: $O(n \log n)$ for sorting-based approach or $O(n)$ for counting-based approach.
-
-Expected Auxiliary Space: $O(1)$ for constant extra space.
-
-## Constraints
-
-* `1 ≤ |a|, |b| ≤ 10^5`
-
-## Problem Explanation
-
-The problem is to check if two strings are anagram of each other, meaning both strings should have the same characters in any order.
-
-## Code Implementation
-
-
-
-
-
- ```py
- class Solution:
- def isAnagram(self, a: str, b: str) -> bool:
- # If lengths are different, they cannot be anagrams
- if len(a) != len(b):
- return False
-
- # Sort and compare
- return sorted(a) == sorted(b)
-
- # Example usage
- if __name__ == "__main__":
- solution = Solution()
- print(solution.isAnagram("listen", "silent")) # Expected output: True
- print(solution.isAnagram("hello", "billion")) # Expected output: False
- ```
-
-
-
-
-
- ```cpp
- //{ Driver Code Starts
- #include
- using namespace std;
-
- // } Driver Code Ends
- class Solution {
- public:
- // Function to check whether two strings are anagram of each other or not.
- bool isAnagram(string a, string b) {
- // If lengths are different, they cannot be anagrams
- if (a.size() != b.size()) return false;
-
- // Sort both strings
- sort(a.begin(), a.end());
- sort(b.begin(), b.end());
-
- // Compare sorted strings
- return a == b;
- }
- };
-
- //{ Driver Code Starts.
- int main() {
- int t;
- cin >> t;
- while(t--) {
- string c, d;
- cin >> c >> d;
- Solution obj;
- if (obj.isAnagram(c, d)) cout << "YES" << endl;
- else cout << "NO" << endl;
- }
- return 0;
- }
- // } Driver Code Ends
- ```
-
-
-
-
-## Example Walkthrough
-
-For the strings `a = "listen"` and `b = "silent"`:
-
-1. Check the lengths of `a` and `b`. They are both 6.
-2. Sort both strings: `a` becomes `eilnst` and `b` becomes `eilnst`.
-3. Compare the sorted strings. They are equal, so the result is `YES`.
-
-For the strings `a = "hello"` and `b = "billion"`:
-
-1. Check the lengths of `a` and `b`. `a` is 5 and `b` is 7.
-2. Since the lengths are different, the result is `NO`.
-
-## Solution Logic:
-
-1. Check if the lengths of the two strings are the same. If not, they cannot be anagrams.
-2. Sort both strings and compare them. If they are equal, the strings are anagrams.
-
-## Time Complexity
-
-* The sorting-based approach has a time complexity of $O(n \log n)$, where n is the length of the strings.
-
-## Space Complexity
-
-* The auxiliary space complexity is $O(1)$ for constant extra space.
-
-## References
-
-- **gfg Problem:** [gfg Problem](https://www.geeksforgeeks.org/problems/anagram-1587115620/1?page=1&difficulty=Easy&sortBy=submissions)
-- **Solution Author:** [arunimad6yuq](https://www.geeksforgeeks.org/user/arunimad6yuq/)
diff --git a/dsa-solutions/gfg-solutions/Easy problems/bfs-of-graph.md b/dsa-solutions/gfg-solutions/Easy problems/bfs-of-graph.md
deleted file mode 100644
index 1acd8e44e..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/bfs-of-graph.md
+++ /dev/null
@@ -1,222 +0,0 @@
----
-id: bfs-of-graph
-title: BFS of Graph
-sidebar_label: 8 BFS of Graph
-tags:
-- Graph
-- BFS
-- Python
-- Java
-- C++
-- JavaScript
-- TypeScript
-description: "This document provides solutions to the problem of performing a Breadth First Search (BFS) traversal of a directed graph in various programming languages."
----
-
-## Problem
-
-Given a directed graph, perform a Breadth First Traversal starting from the 0th vertex. One can move from node `u` to node `v` only if there's an edge from `u` to `v`. Find the BFS traversal of the graph starting from the 0th vertex, from left to right according to the input graph. Only consider nodes that are directly or indirectly connected to node `0`.
-
-### Examples
-
-**Example 1:**
-
-```
-Input: V = 5, E = 4, adj = {{1,2,3},{},{4},{},{}}
-Output: 0 1 2 3 4
-Explanation:
-0 is connected to 1, 2, 3.
-2 is connected to 4.
-Starting from 0, it will go to 1 then 2 then 3. After this, 2 to 4, thus BFS will be 0 1 2 3 4.
-```
-
-**Example 2:**
-
-```
-Input: V = 3, E = 2, adj = {{1,2},{},{}}
-Output: 0 1 2
-Explanation:
-0 is connected to 1, 2.
-Starting from 0, it will go to 1 then 2, thus BFS will be 0 1 2.
-```
-
-### Your Task
-
-You don't need to read input or print anything. Your task is to complete the function `bfsOfGraph()` which takes the integer `V` denoting the number of vertices and adjacency list as input parameters and returns a list containing the BFS traversal of the graph starting from the 0th vertex from left to right.
-
-**Expected Time Complexity:** $O(V + E)$
-**Expected Auxiliary Space:** $O(V)$
-
-**Constraints**
-- $1 ≤ V, E ≤ 10^4$
-
-## Solution
-
-### Intuition & Approach
-
-Breadth First Search (BFS) is a method to traverse a graph level by level, starting from a given node. We use a queue data structure to facilitate this traversal. The main steps are:
-
-1. Create a boolean list `visited` to mark all vertices as not visited.
-2. Initialize the traversal from the starting vertex (0th vertex).
-3. Use a queue to explore nodes level by level, marking each node as visited once it is processed.
-4. For each node, explore its adjacent vertices that have not been visited yet, marking them as visited and adding them to the queue.
-5. Continue this process until the queue is empty.
-
-### Implementation
-
-
-
-
-```python
-from collections import deque
-
-class Solution:
-
- def bfsOfGraph(self, V, adj):
- visited = [False] * V
- queue = deque([0])
- visited[0] = True
- result = []
-
- while queue:
- node = queue.popleft()
- result.append(node)
- for neighbor in adj[node]:
- if not visited[neighbor]:
- queue.append(neighbor)
- visited[neighbor] = True
- return result
-```
-
-
-
-
-```java
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.Queue;
-
-class Solution {
- public ArrayList bfsOfGraph(int V, ArrayList> adj) {
- ArrayList traversal = new ArrayList<>();
- Queue queue = new LinkedList<>();
- boolean[] visited = new boolean[V];
- queue.add(0);
- visited[0] = true;
-
- while (!queue.isEmpty()) {
- int node = queue.poll();
- traversal.add(node);
- for (int neighbor : adj.get(node)) {
- if (!visited[neighbor]) {
- queue.add(neighbor);
- visited[neighbor] = true;
- }
- }
- }
- return traversal;
- }
-}
-```
-
-
-
-
-```cpp
-#include
-#include
-
-class Solution {
-public:
- std::vector bfsOfGraph(int V, std::vector adj[]) {
- std::vector result;
- std::vector visited(V, false);
- std::queue q;
-
- q.push(0);
- visited[0] = true;
-
- while (!q.empty()) {
- int node = q.front();
- q.pop();
- result.push_back(node);
- for (int neighbor : adj[node]) {
- if (!visited[neighbor]) {
- q.push(neighbor);
- visited[neighbor] = true;
- }
- }
- }
- return result;
- }
-};
-```
-
-
-
-
-```javascript
-class Solution {
- bfsOfGraph(V, adj) {
- let visited = new Array(V).fill(false);
- let queue = [0];
- visited[0] = true;
- let result = [];
-
- while (queue.length > 0) {
- let node = queue.shift();
- result.push(node);
- for (let neighbor of adj[node]) {
- if (!visited[neighbor]) {
- queue.push(neighbor);
- visited[neighbor] = true;
- }
- }
- }
- return result;
- }
-}
-```
-
-
-
-
-```typescript
-class Solution {
- bfsOfGraph(V: number, adj: number[][]): number[] {
- let visited = new Array(V).fill(false);
- let queue: number[] = [0];
- visited[0] = true;
- let result: number[] = [];
-
- while (queue.length > 0) {
- let node = queue.shift() as number;
- result.push(node);
- for (let neighbor of adj[node]) {
- if (!visited[neighbor]) {
- queue.push(neighbor);
- visited[neighbor] = true;
- }
- }
- }
- return result;
- }
-}
-```
-
-
-
-
----
-
-## Complexity analysis
-
-The provided solutions efficiently perform a Breadth First Search (BFS) traversal of a directed graph. By starting from the 0th vertex and using a queue to manage the traversal, the algorithms ensure that all reachable vertices are visited in the correct order. The solutions operate in $O(V + E)$ time and use $O(V)$ space complexity, where V and E are the numbers of vertices and edges in the graph, respectively.
-
-**Time Complexity:** $O(V + E)$
-**Auxiliary Space:** $O(V)$
-
-## References
-
-- **GeeksforGeeks Problem:** [BFS of graph](https://www.geeksforgeeks.org/problems/bfs-traversal-of-graph/0)
-- **Author GeeksforGeeks Profile:** [GeeksforGeeks](https://www.geeksforgeeks.org/user/GeeksforGeeks/)
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Easy problems/check-for-balanced-tree.md b/dsa-solutions/gfg-solutions/Easy problems/check-for-balanced-tree.md
deleted file mode 100644
index 6b49186e0..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/check-for-balanced-tree.md
+++ /dev/null
@@ -1,255 +0,0 @@
----
-id: check-for-balanced-tree
-title: Check for balanced Tree
-sidebar_label: 4 Check for balanced tree
-tags:
- - Binary Tree
- - Depth-First Search
- - Recursion
- - LeetCode
- - C++
- - Java
- - Python
-description: "This is a solution to the Balanced Binary Tree problem on LeetCode."
----
-
-## Problem Description
-
-Given a binary tree, determine if it is height-balanced.
-
-A height-balanced binary tree is defined as:
-
-- A binary tree in which the left and right subtrees of every node differ in height by no more than 1.
-
-### Examples
-
-**Example 1:**
-
-
-
-```
-Input: root = [3,9,20,null,null,15,7]
-Output: true
-```
-
-**Example 2:**
-
-
-```
-Input: root = [1,2,2,3,3,null,null,4,4]
-Output: false
-```
-
-**Example 3:**
-
-```
-Input: root = []
-Output: true
-```
-
-### Constraints
-
-- The number of nodes in the tree is in the range `[0, 5000]`.
-- $-10^4 <=$ Node.val $<= 10^4$
-
----
-
-## Solution for Balanced Binary Tree Problem
-
-
-
-
-### Approach 1: Top-Down
-
-#### Intuition
-
-This method checks whether the tree is balanced strictly according to the definition of a balanced binary tree: the difference between the heights of the two subtrees is not greater than 1, and both the left and right subtrees are also balanced. With the helper function depth(), we can easily write the code.
-
-#### Implementation
-
-Implement a helper function `depth(root)` that returns the depth of the tree rooted at root.
-Check if the absolute difference between the depths of the left and right subtrees is not greater than 1.
-Recursively check if both the left and right subtrees are balanced.
-Return true if the tree is balanced, otherwise return false.
-
-#### Code in Different Languages
-
-
-
-
- ```java
- class Solution {
- public int depth(TreeNode root) {
- if (root == null) return 0;
- return Math.max(depth(root.left), depth(root.right)) + 1;
- }
-
- public boolean isBalanced(TreeNode root) {
- if (root == null) return true;
-
- int left = depth(root.left);
- int right = depth(root.right);
-
- return Math.abs(left - right) <= 1 && isBalanced(root.left) && isBalanced(root.right);
- }
- }
- ```
-
-
-
-
- ```python
- class Solution:
- def depth(self, root: TreeNode) -> int:
- if root is None:
- return 0
- return max(self.depth(root.left), self.depth(root.right)) + 1
-
- def isBalanced(self, root: TreeNode) -> bool:
- if root is None:
- return True
-
- left = self.depth(root.left)
- right = self.depth(root.right)
-
- return abs(left - right) <= 1 and self.isBalanced(root.left) and self.isBalanced(root.right)
- ```
-
-
-
-
- ```cpp
- class Solution {
- public:
- int depth(TreeNode* root) {
- if (root == nullptr) return 0;
- return max(depth(root->left), depth(root->right)) + 1;
- }
-
- bool isBalanced(TreeNode* root) {
- if (root == nullptr) return true;
-
- int left = depth(root->left);
- int right = depth(root->right);
-
- return abs(left - right) <= 1 && isBalanced(root->left) && isBalanced(root->right);
- }
- };
- ```
-
-
-
-
-#### Complexity Analysis
-
-- **Time Complexity**: O(n log n) in the worst case where n is the number of nodes in the tree. We visit each node once, and for each node, we calculate its depth. Since the depth calculation involves traversing the subtree, the overall time complexity is O(n log n).
-- **Space Complexity**: O(n) for the recursive call stack.
-
-
-
-
-### Approach 2: Bottom-Up
-
-#### Intuition
-
-The second method is based on DFS. Instead of calling depth() explicitly for each child node, we return the height of the current node in DFS recursion. When the subtree of the current node (inclusive) is balanced, the function dfsHeight() returns a non-negative value as the height. Otherwise, -1 is returned. According to the left height and right height of the two children, the parent node could check if the subtree is balanced and decide its return value.
-
-#### Implementation
-
-Implement a helper function dfsHeight(root) that returns the height of the tree rooted at root.
-If the subtree rooted at root is balanced, return its height. Otherwise, return -1.
-Check if the returned height is -1 to determine if the tree is balanced.
-
-#### Code in Different Languages
-
-
-
-
- ```java
- class Solution {
- public int dfsHeight(TreeNode root) {
- if (root == null) return 0;
-
- int leftHeight = dfsHeight(root.left);
- if (leftHeight == -1) return -1;
- int rightHeight = dfsHeight(root.right);
- if (rightHeight == -1) return -1;
-
- if (Math.abs(leftHeight - rightHeight) > 1) return -1;
- return Math.max(leftHeight, rightHeight) + 1;
- }
-
- public boolean isBalanced(TreeNode root) {
- return dfsHeight(root) != -1;
- }
- }
- ```
-
-
-
-
- ```python
- class Solution:
- def dfsHeight(self, root: TreeNode) -> int:
- if root is None:
- return 0
-
- leftHeight = self.dfsHeight(root.left)
- if leftHeight == -1:
- return -1
- right
-
- Height = self.dfsHeight(root.right)
- if rightHeight == -1:
- return -1
-
- if abs(leftHeight - rightHeight) > 1:
- return -1
- return max(leftHeight, rightHeight) + 1
-
- def isBalanced(self, root: TreeNode) -> bool:
- return self.dfsHeight(root) != -1
- ```
-
-
-
-
- ```cpp
- class Solution {
- public:
- int dfsHeight(TreeNode* root) {
- if (root == nullptr) return 0;
-
- int leftHeight = dfsHeight(root->left);
- if (leftHeight == -1) return -1;
- int rightHeight = dfsHeight(root->right);
- if (rightHeight == -1) return -1;
-
- if (abs(leftHeight - rightHeight) > 1) return -1;
- return max(leftHeight, rightHeight) + 1;
- }
-
- bool isBalanced(TreeNode* root) {
- return dfsHeight(root) != -1;
- }
- };
- ```
-
-
-
-
-#### Complexity Analysis
-
-- **Time Complexity**: O(n) in the worst case where n is the number of nodes in the tree. Each node is visited once.
-- **Space Complexity**: O(n) for the recursive call stack.
-
-
-
-
----
-
-## References
-
-- **GFG Problem**: [Check for Balanced Tree](https://www.geeksforgeeks.org/problems/check-for-balanced-tree/0)
-- **Author GeeksforGeeks Profile:** [GeeksforGeeks](https://www.geeksforgeeks.org/user/GeeksforGeeks/)
-
diff --git a/dsa-solutions/gfg-solutions/Easy problems/common-elements1132.md b/dsa-solutions/gfg-solutions/Easy problems/common-elements1132.md
deleted file mode 100644
index 5b2d67bc3..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/common-elements1132.md
+++ /dev/null
@@ -1,221 +0,0 @@
----
-id: common-elements-sorted-arrays
-title: Common in 3 Sorted Arrays
-sidebar_label: 0014 - Common in 3 Sorted Arrays
-tags:
- - Easy
- - Array
- - GeeksforGeeks
- - CPP
- - Python
- - DSA
-description: "This tutorial covers the solution to the Common in 3 Sorted Arrays problem from the GeeksforGeeks website, featuring implementations in Python and C++."
----
-
-## Problem Description
-
-Given three arrays sorted in increasing order. Find the elements that are common in all three arrays. Note: Handle duplicates without using any additional data structure.
-
-## Examples
-
-**Example 1:**
-
-```
-Input:
-A = [1, 5, 10, 20, 40, 80]
-B = [6, 7, 20, 80, 100]
-C = [3, 4, 15, 20, 30, 70, 80, 120]
-
-Output: 20, 80
-Explanation: 20 and 80 are the common elements.
-```
-
-**Example 2:**
-
-```
-Input:
-A = [1, 2, 3, 4, 5]
-B = [1, 2, 5, 7, 9]
-C = [1, 3, 4, 5, 8]
-
-Output: 1, 5
-Explanation: 1 and 5 are the common elements.
-```
-
-## Your Task
-
-You don't need to read input or print anything. Your task is to complete the function `commonElements()` which takes the arrays `A[], B[], C[]` and their sizes `n1, n2, n3` as input parameters and returns a list of integers containing the common elements in sorted order.
-
-Expected Time Complexity: $O(n1 + n2 + n3)$
-
-Expected Auxiliary Space: $O(1)$
-
-## Constraints
-
-- `1 ≤ n1, n2, n3 ≤ 10^5`
-- `The arrays can have up to 10^5 elements each.`
-- `1 ≤ A[i], B[i], C[i] ≤ 10^9`
-
-## Problem Explanation
-
-The task is to find the common elements in three sorted arrays and handle duplicates without using any additional data structure.
-
-## Code Implementation
-
-
-
-
-
-```py
-class Solution:
- def commonElements(self, A, B, C, n1, n2, n3):
- i, j, k = 0, 0, 0
- common = []
-
- while i < n1 and j < n2 and k < n3:
- if A[i] == B[j] == C[k]:
- common.append(A[i])
- i += 1
- j += 1
- k += 1
- elif A[i] < B[j]:
- i += 1
- elif B[j] < C[k]:
- j += 1
- else:
- k += 1
-
- # Skip duplicates in A
- while i > 0 and i < n1 and A[i] == A[i-1]:
- i += 1
- # Skip duplicates in B
- while j > 0 and j < n2 and B[j] == B[j-1]:
- j += 1
- # Skip duplicates in C
- while k > 0 and k < n3 and C[k] == C[k-1]:
- k += 1
-
- return common
-
-# Example usage
-if __name__ == "__main__":
- solution = Solution()
- A = [1, 5, 10, 20, 40, 80]
- B = [6, 7, 20, 80, 100]
- C = [3, 4, 15, 20, 30, 70, 80, 120]
- print(solution.commonElements(A, B, C, len(A), len(B), len(C))) # Expected output: [20, 80]
-```
-
-
-
-
-
-```cpp
-//{ Driver Code Starts
-#include
-using namespace std;
-
-// } Driver Code Ends
-class Solution {
-public:
- vector commonElements(int A[], int B[], int C[], int n1, int n2, int n3) {
- vector common;
- int i = 0, j = 0, k = 0;
-
- while (i < n1 && j < n2 && k < n3) {
- if (A[i] == B[j] && B[j] == C[k]) {
- common.push_back(A[i]);
- i++;
- j++;
- k++;
- }
- else if (A[i] < B[j]) i++;
- else if (B[j] < C[k]) j++;
- else k++;
-
- // Skip duplicates in A
- while (i > 0 && i < n1 && A[i] == A[i-1]) i++;
- // Skip duplicates in B
- while (j > 0 && j < n2 && B[j] == B[j-1]) j++;
- // Skip duplicates in C
- while (k > 0 && k < n3 && C[k] == C[k-1]) k++;
- }
-
- return common;
- }
-};
-
-//{ Driver Code Starts.
-int main() {
- int t; cin >> t;
- while (t--) {
- int n1, n2, n3;
- cin >> n1 >> n2 >> n3;
- int A[n1], B[n2], C[n3];
-
- for (int i = 0; i < n1; i++) cin >> A[i];
- for (int i = 0; i < n2; i++) cin >> B[i];
- for (int i = 0; i < n3; i++) cin >> C[i];
-
- Solution ob;
- vector res = ob.commonElements(A, B, C, n1, n2, n3);
- if (res.size() == 0)
- cout << -1;
- else
- for (int i = 0; i < res.size(); i++)
- cout << res[i] << " ";
- cout << endl;
- }
-}
-// } Driver Code Ends
-```
-
-
-
-
-## Example Walkthrough
-
-**Example 1:**
-
-For the arrays:
-
-```
-A = [1, 5, 10, 20, 40, 80]
-B = [6, 7, 20, 80, 100]
-C = [3, 4, 15, 20, 30, 70, 80, 120]
-```
-
-1. The common elements in A, B, and C are 20 and 80.
-
-**Example 2:**
-
-For the arrays:
-
-```
-A = [1, 2, 3, 4, 5]
-B = [1, 2, 5, 7, 9]
-C = [1, 3, 4, 5, 8]
-```
-
-1. The common elements in A, B, and C are 1 and 5.
-
-## Solution Logic:
-
-1. Use three pointers to iterate through the three arrays simultaneously.
-2. Compare the current elements pointed by the three pointers.
-3. If they are equal, add the element to the result and move all three pointers forward.
-4. If they are not equal, move the pointer(s) with the smallest value forward.
-5. Skip any duplicate elements to avoid repetition in the result.
-
-## Time Complexity
-
-- The function iterates through each array once, so the time complexity is $O(n1 + n2 + n3)$.
-
-## Space Complexity
-
-- The function uses constant space, $O(1)$, apart from the space used for the result vector.
-
-## References
-
-- -**gfg Problem:** [gfg Problem](https://www.geeksforgeeks.org/problems/common-elements1132/1)
-- **Solution Author:** [arunimad6yuq](https://www.geeksforgeeks.org/user/arunimad6yuq/)
diff --git a/dsa-solutions/gfg-solutions/Easy problems/count-digits.md b/dsa-solutions/gfg-solutions/Easy problems/count-digits.md
deleted file mode 100644
index b4bbe409b..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/count-digits.md
+++ /dev/null
@@ -1,134 +0,0 @@
----
-id: count-digits
-title: Count Digits
-sidebar_label: Count-Digits
-tags:
- - Modular Arithmetic
- - Algorithms
-description: "This tutorial covers the solution to the Count Digits problem from the GeeksforGeeks."
----
-## Problem Description
-
-Given a number `n`. Count the number of digits in `n` which evenly divide n. Return an integer, total number of digits of n which divides n evenly.
-
-Note :- Evenly divides means whether `n` is divisible by a digit i.e. leaves a remainder `0` when divided.
-
-## Examples
-
-**Example 1:**
-
-```
-Input: n = 12
-Output: 2
-Explanation: 1, 2 when both divide 12 leaves remainder 0.
-```
-
-**Example 2:**
-
-```
-Input: n = 2446
-Output: 1
-Explanation: Here among 2, 4, 6 only 2 divides 2446 evenly while 4 and 6 do not.
-```
-
-
-Expected Time Complexity: O(N)
-
-Expected Auxiliary Space: O(1)
-
-## Constraints
-
-* `1 ≤ N ≤ 10^5`
-
-## Problem Explanation
-
-The task is to traverse the number and count the digits.
-
-## Code Implementation
-
-### C++ Solution
-
-```cpp
-int countDigits(int n) {
- int count = 0;
- int temp = n;
- while (temp != 0) {
- int digit = temp % 10;
- if (n % digit == 0) {
- count++;
- }
- temp /= 10;
- }
- return count;
-}
-
-
-```
-
-```java
-
-public int countDigits(int n) {
- int count = 0;
- int temp = n;
- while (temp != 0) {
- int digit = temp % 10;
- if (n % digit == 0) {
- count++;
- }
- temp /= 10;
- }
- return count;
-}
-
-
-```
-
-```python
-def count_digits(n):
- count = 0
- temp = n
- while temp != 0:
- digit = temp % 10
- if n % digit == 0:
- count += 1
- temp //= 10
- return count
-
-```
-
-```javascript
-function countDigits(n) {
- let count = 0;
- let temp = n;
- while (temp !== 0) {
- const digit = temp % 10;
- if (n % digit === 0) {
- count++;
- }
- temp = Math.floor(temp / 10);
- }
- return count;
-}
-
-
-```
-
-## Solution Logic:
-1. Initialize a variable count to 0, which will store the number of digits that evenly divide n.
-2. Initialize a variable temp to n, which will be used to iterate through each digit of n.
-3. Use a while loop to iterate through each digit of n. In each iteration, do the following:
- - Calculate the current digit by taking the remainder of temp divided by 10 (temp % 10).
- - Check if n is divisible by the current digit by checking if n % digit == 0. If it is, increment count.
- - Update temp by dividing it by 10 (temp /= 10).
-4. Return count at the end of the function.
-
-
-
-## Time Complexity
-
-* The time complexity is $O(log(n))$ where n is the input number. This is because we are iterating through each digit of n using a while loop, and the number of digits in n is proportional to the logarithm of n.
-
-
-## Space Complexity
-
-* The auxiliary space complexity is $O(1)$ due to the only extra memory used is for temporary variables while swapping two values in Array.
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Easy problems/delete-middle-of-linked-list.md b/dsa-solutions/gfg-solutions/Easy problems/delete-middle-of-linked-list.md
deleted file mode 100644
index 27f5431c3..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/delete-middle-of-linked-list.md
+++ /dev/null
@@ -1,175 +0,0 @@
----
-id: delete-middle-of-linked-list
-title: Delete Middle of Linked List
-sidebar_label: 5 Delete Middle of Linked List
-tags:
-- Linked List
-- Python
-- Java
-- C++
-- JavaScript
-- TypeScript
-description: "This document provides solutions to the problem of deleting the middle node from a singly linked list in various programming languages."
----
-
-## Problem
-
-Given a singly linked list, delete the middle of the linked list. For example, if given linked list is 1->2->3->4->5 then linked list should be modified to 1->2->4->5.
-If there are even nodes, then there would be two middle nodes, we need to delete the second middle element. For example, if given linked list is 1->2->3->4->5->6 then it should be modified to 1->2->3->5->6.
-If the input linked list has a single node, then it should return NULL.
-
-### Examples
-
-**Example 1:**
-
-```
-Input:
-LinkedList: 1->2->3->4->5
-Output:
-1 2 4 5
-```
-
-**Example 2:**
-
-```
-Input:
-LinkedList: 2->4->6->7->5->1
-Output:
-2 4 6 5 1
-```
-
-### Your Task
-The task is to complete the function `deleteMid()` which takes head of the linked list and returns head of the linked list with the middle element deleted. If the linked list is empty or contains a single element, then it should return NULL.
-
-**Expected Time Complexity:** $O(n)$
-**Expected Auxiliary Space:** $O(1)$
-
-### Constraints
-- $1 ≤ n ≤ 10^5$
-- $1 ≤ value[i] ≤ 10^9$
-
-## Solution
-
-### Intuition & Approach
-
-The simplest idea is to make two pointers, `fast` and `slow`. Increment the `fast` pointer by two steps and the `slow` pointer by one step until the `fast` pointer reaches the end of the linked list. By then, the `slow` pointer will have reached the exact middle of the list.
-
-To delete the middle node, ensure that the `slow` pointer is at the node just before the middle. This can be done by starting the `fast` pointer from the second node instead of the first. Then, skip the middle node by changing the `next` pointer of the `slow` node to `slow->next->next` or `slow.next.next`.
-
-**Edge Case:** If there is only one node in the linked list, return NULL or None.
-
-### Complexity
-- **Time Complexity:** $O(n)$- **Space Complexity:** O(1)
-
-### Implementation
-
-
-
-
-```python
-class Solution:
- def deleteMid(self, head):
- if not head.next:
- return None
- slow, fast = head, head.next
- while fast and fast.next and fast.next.next:
- fast = fast.next.next
- slow = slow.next
- slow.next = slow.next.next
- return head
-```
-
-
-
-
-```java
-class Solution {
- public ListNode deleteMid(ListNode head) {
- if (head == null || head.next == null) {
- return null;
- }
- ListNode slow = head, fast = head.next;
- while (fast != null && fast.next != null && fast.next.next != null) {
- fast = fast.next.next;
- slow = slow.next;
- }
- slow.next = slow.next.next;
- return head;
- }
-}
-```
-
-
-
-
-```cpp
-class Solution {
-public:
- ListNode* deleteMid(ListNode* head) {
- if (head->next == nullptr) {
- return nullptr;
- }
- ListNode* slow = head;
- ListNode* fast = head->next;
- while (fast != nullptr && fast->next != nullptr && fast->next->next != nullptr) {
- fast = fast->next->next;
- slow = slow->next;
- }
- slow->next = slow->next->next;
- return head;
- }
-};
-```
-
-
-
-
-```javascript
-function deleteMid(head) {
- if (!head.next) {
- return null;
- }
- let slow = head, fast = head.next;
- while (fast !== null && fast.next !== null && fast.next.next !== null) {
- fast = fast.next.next;
- slow = slow.next;
- }
- slow.next = slow.next.next;
- return head;
-}
-```
-
-
-
-
-```typescript
-function deleteMid(head: ListNode | null): ListNode | null {
- if (!head || !head.next) {
- return null;
- }
- let slow: ListNode | null = head, fast: ListNode | null = head.next;
- while (fast !== null && fast.next !== null && fast.next.next !== null) {
- fast = fast.next.next;
- slow = slow.next;
- }
- if (slow && slow.next) {
- slow.next = slow.next.next;
- }
- return head;
-}
-```
-
-
-
-
-### Complexity
-- **Time Complexity:** $O(n)$
-- **Space Complexity:** $O(1)$
-
----
-
-## References
-
-- **GeeksforGeeks Problem:** [Delete Middle of Linked List](https://www.geeksforgeeks.org/problems/delete-middle-of-linked-list/0)
-- **Author GeeksforGeeks Profile:** [GeeksforGeeks](https://www.geeksforgeeks.org/user/GeeksforGeeks/)
-
diff --git a/dsa-solutions/gfg-solutions/Easy problems/delete-without-head-pointer.md b/dsa-solutions/gfg-solutions/Easy problems/delete-without-head-pointer.md
deleted file mode 100644
index 777486a10..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/delete-without-head-pointer.md
+++ /dev/null
@@ -1,224 +0,0 @@
----
-id: delete-without-head-pointer
-title: Delete without Head Pointer
-sidebar_label: 3 Delete without Head Pointer
-tags:
-- Linked List
-- Python
-- Java
-- C++
-- JavaScript
-- TypeScript
-description: "This document provides solutions to the problem of deleting a node from a singly linked list without having a reference to the head pointer in various programming languages."
----
-
-## Problem
-
-You are given a node `del_node` of a Singly Linked List where you have to delete a value of the given node from the linked list, but you are not given the head of the list.
-
-By deleting the node value, we mean that:
-- The value of the given node should not exist in the linked list.
-- The number of nodes in the linked list should decrease by one.
-- All the values before and after the `del_node` node should be in the same order.
-
-Note:
-- Multiple nodes can have the same values as the `del_node`, but you must only remove the node whose pointer `del_node` is given to you.
-- It is guaranteed that there exists a node with a value equal to the `del_node` value, and it will not be the last node of the linked list.
-
-### Examples
-
-**Example 1:**
-
-```
-Input:
-Linked List = 1 -> 2
-del_node = 1
-Output:
-2
-
-Explanation:
-After deleting 1 from the linked list,
-we have remaining nodes as 2.
-```
-
-**Example 2:**
-
-```
-Input:
-Linked List = 10 -> 20 -> 4 -> 30
-del_node = 20
-Output:
-10 4 30
-
-Explanation:
-After deleting 20 from the linked list,
-we have remaining nodes as 10, 4, 30.
-```
-
-### Your Task
-You don't need to read or print anything. You only need to complete the function `deleteNode()` which takes a reference of the deleting node value and your task is to delete the given node value.
-
-**Expected Time Complexity:** $O(1)$
-**Expected Auxiliary Space:** $O(1)$
-
-### Constraints
-- $2 ≤ n ≤ 10^3$
-- $1 ≤ elements of the linked list ≤ 10^9$
-
-## Solution
-
-### Approach
-
-To delete a node without a reference to the head pointer, we can mimic the effect of deleting the node by copying the value of the next node to the given node (`del_node`) and then deleting the next node.
-
-### Implementation
-
-
-
-
-```python
-class Solution:
-
- def reverseDLL(self, head):
- while head:
- head.next, head.prev = head.prev, head.next
- if not head.prev:return head
- head=head.prev
-```
-
-
-
-
-```java
-class Node {
- int data;
- Node next;
- Node prev;
-
- Node(int data) {
- this.data = data;
- this.next = null;
- this.prev = null;
- }
-}
-
-class Solution {
- public Node reverseDLL(Node head) {
- while (head != null) {
- Node temp = head.next;
- head.next = head.prev;
- head.prev = temp;
- if (head.prev == null) {
- return head;
- }
- head = head.prev;
- }
- return head;
- }
-}
-```
-
-
-
-
-```cpp
-#include
-using namespace std;
-
-class Node {
-public:
- int data;
- Node* next;
- Node* prev;
- Node(int data) {
- this->data = data;
- this->next = nullptr;
- this->prev = nullptr;
- }
-};
-
-class Solution {
-public:
- Node* reverseDLL(Node* head) {
- while (head != nullptr) {
- swap(head->next, head->prev);
- if (head->prev == nullptr) {
- return head;
- }
- head = head->prev;
- }
- return head;
- }
-};
-```
-
-
-
-
-```javascript
-class Node {
- constructor(data) {
- this.data = data;
- this.next = null;
- this.prev = null;
- }
-}
-
-class Solution {
- reverseDLL(head) {
- while (head !== null) {
- [head.next, head.prev] = [head.prev, head.next];
- if (head.prev === null) {
- return head;
- }
- head = head.prev;
- }
- return head;
- }
-}
-```
-
-
-
-
-```typescript
-class Node {
- data: number;
- next: Node | null;
- prev: Node | null;
-
- constructor(data: number) {
- this.data = data;
- this.next = null;
- this.prev = null;
- }
-}
-
-class Solution {
- reverseDLL(head: Node | null): Node | null {
- while (head !== null) {
- [head.next, head.prev] = [head.prev, head.next];
- if (head.prev === null) {
- return head;
- }
- head = head.prev;
- }
- return head;
- }
-}
-```
-
-
-
-
-### Complexity Analysis
-
-- **Time Complexity:** $O(1)$, as the deletion operation requires constant time regardless of the size of the linked list.
-- **Space Complexity:** $O(1)$, as the algorithm uses only a constant amount of extra space regardless of the input size.
-
----
-
-## References
-
-- **GeeksforGeeks Problem:** [Delete without head pointer](https://www.geeksforgeeks.org/problems/delete-without-head-pointer/0)
-- **Author GeeksforGeeks Profile:** [GeeksforGeeks](https://www.geeksforgeeks.org/user/GeeksforGeeks/)
diff --git a/dsa-solutions/gfg-solutions/Easy problems/determine-if-two-trees-are-identical.md b/dsa-solutions/gfg-solutions/Easy problems/determine-if-two-trees-are-identical.md
deleted file mode 100644
index c425ea8f7..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/determine-if-two-trees-are-identical.md
+++ /dev/null
@@ -1,258 +0,0 @@
----
-id: determine-if-two-trees-are-identical
-title: Determine if Two Trees are Identical (gfg)
-sidebar_label: 0012 - Determine if Two Trees are Identical
-tags:
- - Easy
- - Tree
- - Binary Tree
- - GeeksforGeeks
- - CPP
- - Python
- - DSA
-description: "This tutorial covers the solution to the Determine if Two Trees are Identical problem from the GeeksforGeeks website, featuring implementations in Python and C++."
----
-
-## Problem Description
-
-Given two binary trees, the task is to find if both of them are identical or not. Note: You need to return true or false, the printing is done by the driver code.
-
-## Examples
-
-**Example 1:**
-
-```
-Input:
- Tree 1:
- 1
- / \
- 2 3
-
- Tree 2:
- 1
- / \
- 2 3
-Output: Yes
-```
-
-**Example 2:**
-
-```
-Input:
- Tree 1:
- 1
- / \
- 2 3
-
- Tree 2:
- 1
- / \
- 3 2
-Output: No
-```
-
-## Your Task
-
-You don't need to read input or print anything. Your task is to complete the function `isIdentical()` which takes the roots of both trees as input and returns true if the trees are identical, otherwise false.
-
-Expected Time Complexity: $O(N)$, where N is the number of nodes in the trees.
-
-Expected Auxiliary Space: $O(H)$, where H is the height of the trees.
-
-## Constraints
-
-- `1 ≤ Number of nodes ≤ 10^5`
-- `1 ≤ Data of a node ≤ 10^5`
-
-## Problem Explanation
-
-Two trees are considered identical if they have the same structure and their corresponding nodes have the same value.
-
-## Code Implementation
-
-
-
-
-
-```py
-# Definition for a binary tree node.
-class TreeNode:
- def __init__(self, val=0, left=None, right=None):
- self.val = val
- self.left = left
- self.right = right
-
-class Solution:
- def isIdentical(self, r1: TreeNode, r2: TreeNode) -> bool:
- if not r1 and not r2:
- return True
- if not r1 or not r2:
- return False
- return (r1.val == r2.val) and self.isIdentical(r1.left, r2.left) and self.isIdentical(r1.right, r2.right)
-
-# Example usage
-if __name__ == "__main__":
- root1 = TreeNode(1)
- root1.left = TreeNode(2)
- root1.right = TreeNode(3)
-
- root2 = TreeNode(1)
- root2.left = TreeNode(2)
- root2.right = TreeNode(3)
-
- solution = Solution()
- print(solution.isIdentical(root1, root2)) # Expected output: True
-```
-
-
-
-
-
-```cpp
-//{ Driver Code Starts
-#include
-using namespace std;
-
-struct Node {
- int data;
- Node* left;
- Node* right;
-
- Node(int val) {
- data = val;
- left = right = NULL;
- }
-};
-
-// } Driver Code Ends
-class Solution {
-public:
- // Function to check if two trees are identical.
- bool isIdentical(Node* r1, Node* r2) {
- if (!r1 && !r2) return true;
- if (!r1 || !r2) return false;
- return (r1->data == r2->data) && isIdentical(r1->left, r2->left) && isIdentical(r1->right, r2->right);
- }
-};
-
-//{ Driver Code Starts.
-// Function to Build Tree
-Node* buildTree(string str) {
- if (str.length() == 0 || str[0] == 'N') return NULL;
-
- vector ip;
- istringstream iss(str);
- for (string str; iss >> str;) ip.push_back(str);
-
- Node* root = new Node(stoi(ip[0]));
- queue queue;
- queue.push(root);
-
- int i = 1;
- while (!queue.empty() && i < ip.size()) {
- Node* currNode = queue.front();
- queue.pop();
-
- string currVal = ip[i];
- if (currVal != "N") {
- currNode->left = new Node(stoi(currVal));
- queue.push(currNode->left);
- }
-
- i++;
- if (i >= ip.size()) break;
- currVal = ip[i];
-
- if (currVal != "N") {
- currNode->right = new Node(stoi(currVal));
- queue.push(currNode->right);
- }
- i++;
- }
-
- return root;
-}
-
-int main() {
- int tc;
- scanf("%d ", &tc);
- while (tc--) {
- string str, str1;
- getline(cin, str);
- Node* rootA = buildTree(str);
- getline(cin, str1);
- Node* rootB = buildTree(str1);
- Solution ob;
- if (ob.isIdentical(rootA, rootB)) {
- cout << "Yes\n";
- } else {
- cout << "No\n";
- }
- }
- return 0;
-}
-// } Driver Code Ends
-```
-
-
-
-
-## Example Walkthrough
-
-For the trees:
-
-```
- Tree 1:
- 1
- / \
- 2 3
-
- Tree 2:
- 1
- / \
- 2 3
-```
-
-1. The root nodes are both 1.
-2. The left children are both 2.
-3. The right children are both 3.
-4. Since all corresponding nodes match, the trees are identical.
-
-For the trees:
-
-```
- Tree 1:
- 1
- / \
- 2 3
-
- Tree 2:
- 1
- / \
- 3 2
-```
-
-1. The root nodes are both 1.
-2. The left child of Tree 1 is 2 and of Tree 2 is 3.
-3. The right child of Tree 1 is 3 and of Tree 2 is 2.
-4. Since corresponding nodes do not match, the trees are not identical.
-
-## Solution Logic:
-
-1. Recursively compare the current nodes of both trees.
-2. Check if the values of the nodes are the same.
-3. Check if the left children of both nodes are identical.
-4. Check if the right children of both nodes are identical.
-
-## Time Complexity
-
-- The function visits each node once, so the time complexity is $O(N)$.
-
-## Space Complexity
-
-- The auxiliary space complexity is $O(H)$ due to the recursion stack, where H is the height of the tree.
-
-## References
-
-- **gfg Problem:** [gfg Problem](https://www.geeksforgeeks.org/problems/determine-if-two-trees-are-identical/1?page=2&difficulty=Easy&sortBy=submissions)
-- **Solution Author:** [arunimad6yuq](https://www.geeksforgeeks.org/user/arunimad6yuq/)
diff --git a/dsa-solutions/gfg-solutions/Easy problems/dfs-of-graph.md b/dsa-solutions/gfg-solutions/Easy problems/dfs-of-graph.md
deleted file mode 100644
index b6fffd820..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/dfs-of-graph.md
+++ /dev/null
@@ -1,163 +0,0 @@
----
-id: dfs-of-graph
-title: DFS of Graph
-sidebar_label: 0022 - DFS of Graph
-tags:
- - Easy
- - Graph
- - DFS
- - GeeksforGeeks
- - CPP
- - DSA
-description: "This tutorial covers the solution to the DFS of Graph problem from the GeeksforGeeks website, featuring implementations in C++."
----
-## Problem Description
-
-You are given a connected undirected graph. Perform a Depth First Traversal of the graph.
-Note: Use the recursive approach to find the DFS traversal of the graph starting from the 0th vertex from left to right according to the graph.
-
-## Examples
-
-**Example 1:**
-
-```
-Input:
-Graph:
-0->1, 0->2, 1->2, 2->0, 2->3, 3->3
-Output: 0 1 2 3
-Explanation:
-0 is connected to 1, 2.
-1 is connected to 2.
-2 is connected to 0, 3.
-3 is connected to 3.
-```
-
-**Example 2:**
-
-```
-Input:
-Graph:
-0->1, 0->2, 1->2, 2->0, 2->3, 3->3
-Output: 0 1 2 3
-Explanation:
-0 is connected to 1, 2.
-1 is connected to 2.
-2 is connected to 0, 3.
-3 is connected to 3.
-```
-
-## Your Task
-
-You don't need to read input or print anything. Your task is to complete the function `dfsOfGraph()` which takes the number of vertices `V` and an adjacency list `adj` as input parameters and returns a list containing the DFS traversal of the graph starting from the 0th vertex.
-
-Expected Time Complexity: O(V + E)
-
-Expected Auxiliary Space: O(V)
-
-## Constraints
-
-* `1 ≤ V, E ≤ 10^4`
-
-## Problem Explanation
-
-The task is to traverse a given connected undirected graph using Depth First Search (DFS). DFS is a traversal algorithm that starts at a source node and explores as far as possible along each branch before backtracking. This recursive approach uses a stack data structure for its implementation.
-
-## Code Implementation
-
-### C++ Solution
-
-```cpp
-//{ Driver Code Starts
-#include
-using namespace std;
-
-// } Driver Code Ends
-class Solution {
- public:
- // Function to return a list containing the DFS traversal of the graph.
- void dfsUtil(int node, vector adj[], vector& visited, vector& result) {
- visited[node] = true;
- result.push_back(node);
-
- for (int neighbor : adj[node]) {
- if (!visited[neighbor]) {
- dfsUtil(neighbor, adj, visited, result);
- }
- }
- }
-
- vector dfsOfGraph(int V, vector adj[]) {
- vector result;
- vector visited(V, false);
-
- dfsUtil(0, adj, visited, result);
-
- return result;
- }
-};
-
-//{ Driver Code Starts.
-int main() {
- int tc;
- cin >> tc;
- while (tc--) {
- int V, E;
- cin >> V >> E;
-
- vector adj[V];
-
- for (int i = 0; i < E; i++) {
- int u, v;
- cin >> u >> v;
- adj[u].push_back(v);
- adj[v].push_back(u);
- }
- Solution obj;
- vector ans = obj.dfsOfGraph(V, adj);
- for (int i = 0; i < ans.size(); i++) {
- cout << ans[i] << " ";
- }
- cout << endl;
- }
- return 0;
-}
-// } Driver Code Ends
-```
-
-## Example Walkthrough
-
-**Example 1:**
-
-For the input:
-```
-Graph:
-0->1, 0->2, 1->2, 2->0, 2->3, 3->3
-Output: 0 1 2 3
-```
-1. Start DFS from node 0.
-2. Visit node 1 from node 0.
-3. Visit node 2 from node 1.
-4. Visit node 3 from node 2.
-5. Backtrack to node 2, then to node 1, and finally to node 0.
-
-The result of the traversal is [0, 1, 2, 3].
-
-## Solution Logic:
-
-1. Use a recursive helper function `dfsUtil` to perform DFS starting from a given node.
-2. Mark the node as visited and add it to the result list.
-3. Recursively visit all unvisited neighbors of the current node.
-4. The main function initializes the visited list and starts the DFS from node 0.
-
-## Time Complexity
-
-* The time complexity is $O(V + E)$ where $V$ is the number of vertices and $E$ is the number of edges, as each vertex and edge is visited once.
-
-## Space Complexity
-
-* The auxiliary space complexity is $O(V)$ due to the visited list and the recursive stack.
-
-## References
-
-- **GeeksforGeeks Problem:** [DFS of Graph](https://www.geeksforgeeks.org/problems/depth-first-traversal-for-a-graph/1?page=2&difficulty=Easy&sortBy=submissions)
-- **Solution Author:** [arunimad6yuq](https://www.geeksforgeeks.org/user/arunimad6yuq/)
diff --git a/dsa-solutions/gfg-solutions/Easy problems/equilibrium-point.md b/dsa-solutions/gfg-solutions/Easy problems/equilibrium-point.md
deleted file mode 100644
index d143e7e07..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/equilibrium-point.md
+++ /dev/null
@@ -1,178 +0,0 @@
----
-id: equilibrium-point
-title: Equilibrium Point
-sidebar_label: 0018 - Equilibrium Point
-tags:
- - Easy
- - Array
- - GeeksforGeeks
- - CPP
- - DSA
-description: "This tutorial covers the solution to the Equilibrium Point problem from the GeeksforGeeks website, featuring implementations in Python and C++."
----
-## Problem Description
-
-Given an array `arr` of non-negative numbers, the task is to find the first equilibrium point in the array. The equilibrium point in an array is an index (or position) such that the sum of all elements before that index is equal to the sum of elements after it.
-
-**Note:** Return equilibrium point in 1-based indexing. Return -1 if no such point exists.
-
-## Examples
-
-**Example 1:**
-
-```
-Input:
-arr = [1, 3, 5, 2, 2]
-Output: 3
-Explanation: The equilibrium point is at position 3 as the sum of elements before it (1+3) is equal to the sum of elements after it (2+2).
-```
-
-**Example 2:**
-
-```
-Input:
-arr = [1]
-Output: 1
-Explanation: Since there's only one element, it is the equilibrium point.
-```
-
-## Your Task
-
-You don't need to read input or print anything. Your task is to complete the function `equilibriumPoint()` which takes the array `arr` as input and returns the 1-based index of the equilibrium point. If no such point exists, return -1.
-
-Expected Time Complexity: $O(N)$
-
-Expected Auxiliary Space: $O(1)$
-
-## Constraints
-
-* `1 ≤ N ≤ 10^6`
-* `0 ≤ arr[i] ≤ 10^8`
-
-## Problem Explanation
-
-The task is to find the first index in the array where the sum of elements before it is equal to the sum of elements after it. The solution should be efficient in terms of both time and space complexity.
-
-## Code Implementation
-
-
-
-
-
- ```py
- class Solution:
- def equilibriumPoint(self, arr):
- total_sum = sum(arr)
- left_sum = 0
-
- for i, num in enumerate(arr):
- total_sum -= num
- if left_sum == total_sum:
- return i + 1
- left_sum += num
-
- return -1
-
- # Example usage
- if __name__ == "__main__":
- solution = Solution()
- print(solution.equilibriumPoint([1, 3, 5, 2, 2])) # Expected output: 3
- print(solution.equilibriumPoint([1])) # Expected output: 1
- ```
-
-
-
-
-
- ```cpp
- //{ Driver Code Starts
- // Initial Template for C++
- #include
- using namespace std;
-
- // } Driver Code Ends
- class Solution {
- public:
- // Function to find equilibrium point in the array.
- // arr: input array
- int equilibriumPoint(vector &arr) {
- long long total_sum = accumulate(arr.begin(), arr.end(), 0LL);
- long long left_sum = 0;
-
- for (int i = 0; i < arr.size(); i++) {
- total_sum -= arr[i];
- if (left_sum == total_sum) {
- return i + 1; // 1-based index
- }
- left_sum += arr[i];
- }
-
- return -1;
- }
- };
-
- //{ Driver Code Starts.
- int main() {
- int t;
- cin >> t;
- cin.ignore(); // To discard any leftover newline characters
- while (t--) {
- vector arr;
- string input;
- getline(cin, input); // Read the entire line for the array elements
- stringstream ss(input);
- long long number;
- while (ss >> number) {
- arr.push_back(number);
- }
-
- Solution ob;
- cout << ob.equilibriumPoint(arr) << endl;
- }
- }
- // } Driver Code Ends
- ```
-
-
-
-
-## Example Walkthrough
-
-**Example 1:**
-
-For the input array:
-```
-arr = [1, 3, 5, 2, 2]
-```
-1. The equilibrium point is at position 3 because the sum of elements before it (1+3) is equal to the sum of elements after it (2+2).
-
-**Example 2:**
-
-For the input array:
-```
-arr = [1]
-```
-1. Since there's only one element, it is the equilibrium point.
-
-## Solution Logic:
-
-1. Calculate the total sum of the array.
-2. Initialize the left sum to zero.
-3. Traverse the array:
- - Subtract the current element from the total sum to get the right sum.
- - If the left sum equals the right sum, return the current index (1-based).
- - Add the current element to the left sum.
-4. If no equilibrium point is found, return -1.
-
-## Time Complexity
-
-* The function traverses the array once, so the time complexity is $O(N)$.
-
-## Space Complexity
-
-* The function uses a few extra variables, so the auxiliary space complexity is $O(1)$.
-
-## References
-
-- **GeeksforGeeks Problem:** [Equilibrium Point](https://www.geeksforgeeks.org/problems/equilibrium-point-1587115620/1)
-- **Solution Author:** [arunimad6yuq](https://www.geeksforgeeks.org/user/arunimad6yuq/)
diff --git a/dsa-solutions/gfg-solutions/Easy problems/find-duplicates-in-an-array.md b/dsa-solutions/gfg-solutions/Easy problems/find-duplicates-in-an-array.md
deleted file mode 100644
index 989f52177..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/find-duplicates-in-an-array.md
+++ /dev/null
@@ -1,183 +0,0 @@
----
-id: find-duplicates-in-an-array
-title: Find Duplicates in an Array (gfg)
-sidebar_label: 0006 - Find Duplicates in an Array
-tags:
- - Easy
- - Array
- - GeeksforGeeks
- - CPP
- - Python
- - DSA
-description: "This tutorial covers the solution to the Find Duplicates in an Array problem from the GeeksforGeeks website, featuring implementations in Python and C++."
----
-
-## Problem Description
-
-Given an array `arr` of size `n` which contains elements in the range from 0 to `n-1`, you need to find all the elements occurring more than once in the given array. Return the answer in ascending order. If no such element is found, return a list containing [-1].
-
-:::note
-Try and perform all operations within the provided array. The extra (non-constant) space needs to be used only for the array to be returned.
-:::
-
-## Examples
-
-**Example 1:**
-
-```
-Input: arr = [2, 3, 1, 2, 3]
-Output: [2, 3]
-Explanation: 2 and 3 occur more than once in the array.
-```
-
-**Example 2:**
-
-```
-Input: arr = [0, 1, 2, 3]
-Output: [-1]
-Explanation: No element occurs more than once.
-```
-
-## Your Task
-
-You don't need to read input or print anything. Your task is to complete the function `duplicates()` which takes the array `arr` as input and returns a list of the duplicate elements in ascending order.
-
-Expected Time Complexity: $O(n)$
-
-Expected Auxiliary Space: $O(1)$ (excluding the space for the output list)
-
-## Constraints
-
-- `1 ≤ n ≤ 10^5`
-- `0 ≤ arr[i] ≤ n-1`
-
-## Problem Explanation
-
-The problem is to find the duplicate elements in an array of size `n`, where the elements range from 0 to `n-1`. The duplicates should be returned in ascending order. If no duplicates are found, return [-1].
-
-## Code Implementation
-
-
-
-
-
-```py
-class Solution:
- def duplicates(self, arr):
- n = len(arr)
- # Use the array elements as index
- for i in range(n):
- arr[arr[i] % n] += n
-
- # Collect elements that occur more than once
- result = [i for i in range(n) if arr[i] // n > 1]
-
- return result if result else [-1]
-
-# Example usage
-if __name__ == "__main__":
- solution = Solution()
- print(solution.duplicates([2, 3, 1, 2, 3])) # Expected output: [2, 3]
- print(solution.duplicates([0, 1, 2, 3])) # Expected output: [-1]
-```
-
-
-
-
-
-```cpp
-#include
-#include
-#include
-using namespace std;
-
-class Solution {
-public:
- vector duplicates(vector& arr) {
- int n = arr.size();
- vector result;
-
- // Use the array elements as index
- for (int i = 0; i < n; i++) {
- arr[arr[i] % n] += n;
- }
-
- // Collect elements that occur more than once
- for (int i = 0; i < n; i++) {
- if (arr[i] / n > 1) {
- result.push_back(i);
- }
- }
-
- if (result.empty()) {
- return {-1};
- }
-
- return result;
- }
-};
-
-// Example usage
-void solve() {
- int n;
- cin >> n;
- vector arr(n);
- for (int i = 0; i < n; i++) {
- cin >> arr[i];
- }
-
- Solution obj;
- vector ans = obj.duplicates(arr);
- for (int i : ans) {
- cout << i << ' ';
- }
- cout << endl;
-}
-
-int main() {
- int t;
- cin >> t;
-
- while (t--) {
- solve();
- }
- return 0;
-}
-```
-
-
-
-
-## Example Walkthrough
-
-For the array `arr = [2, 3, 1, 2, 3]`:
-
-1. Iterate through the array and use each element as an index. Increase the value at that index by `n` to mark the occurrence.
-2. After the iteration, elements with values greater than `2 * n` indicate duplicates.
-3. Collect such elements and return them in ascending order.
-
-For the array `arr = [0, 1, 2, 3]`:
-
-1. Iterate through the array and use each element as an index. Increase the value at that index by `n` to mark the occurrence.
-2. After the iteration, no elements have values greater than `2 * n`.
-3. Return [-1] since no duplicates are found.
-
-## Solution Logic:
-
-1. Iterate through the array, using each element as an index.
-2. Increase the value at the calculated index by `n`.
-3. After the iteration, check which elements have values greater than `2 * n` to find duplicates.
-4. Collect such elements and return them in ascending order.
-
-## Time Complexity
-
-- The time complexity is $O(n)$, where n is the size of the input array.
-
-## Space Complexity
-
-- The auxiliary space complexity is $O(1)$ because we are not using any extra space proportional to the size of the input array.
-
-## References
-
-- **gfg Problem:** [gfg Problem](https://www.geeksforgeeks.org/problems/find-duplicates-in-an-array/1?page=1&difficulty=Easy&sortBy=submissions)
-- **Solution Author:** [arunimad6yuq](https://www.geeksforgeeks.org/user/arunimad6yuq/)
diff --git a/dsa-solutions/gfg-solutions/Easy problems/find-pair-given-difference.md b/dsa-solutions/gfg-solutions/Easy problems/find-pair-given-difference.md
deleted file mode 100644
index cfafd9bb4..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/find-pair-given-difference.md
+++ /dev/null
@@ -1,184 +0,0 @@
----
-id: find-pair-given-difference
-title: Find Pair Given Difference
-sidebar_label: 0029 - Find Pair Given Difference
-tags:
- - Easy
- - Array
- - GeeksforGeeks
- - CPP
- - DSA
-description: "This tutorial covers the solution to the Find Pair Given Difference problem from the GeeksforGeeks website, featuring implementations in C++."
----
-## Problem Description
-
-Given an array `arr[]` of size `n` and an integer `x`, return `1` if there exists a pair of elements in the array whose absolute difference is `x`, otherwise, return `-1`.
-
-## Examples
-
-**Example 1:**
-
-```
-Input:
-n = 5
-arr[] = {1, 8, 30, 40, 100}
-x = 60
-
-Output:
-1
-
-Explanation:
-The pair (100, 40) has an absolute difference of 60.
-```
-
-**Example 2:**
-
-```
-Input:
-n = 3
-arr[] = {5, 10, 3}
-x = 8
-
-Output:
--1
-
-Explanation:
-There is no pair with an absolute difference of 8.
-```
-
-## Your Task
-
-You don't need to read input or print anything. Your task is to complete the function `findPair()` which takes the array and its size and an integer `x` as parameters and returns `1` if there exists a pair with an absolute difference of `x`, otherwise, return `-1`.
-
-Expected Time Complexity: O(N)
-
-Expected Auxiliary Space: O(N)
-
-## Constraints
-
-* `1 ≤ n ≤ 10^5`
-* `1 ≤ arr[i] ≤ 10^5`
-* `0 ≤ x ≤ 10^5`
-
-## Problem Explanation
-
-To find if there exists a pair with the given difference `x`, we can use a set to store the elements as we iterate through the array. For each element `arr[i]`, we check if `(arr[i] + x)` or `(arr[i] - x)` exists in the set. If either condition is true, we return `1`. If we complete the iteration without finding any such pair, we return `-1`.
-
-## Code Implementation
-
-### C++ Solution
-
-```cpp
-// Initial template for C++
-#include
-using namespace std;
-
-class Array {
- public:
- template
- static void input(vector &A, int n) {
- for (int i = 0; i < n; i++) {
- scanf("%d ", &A[i]);
- }
- }
-
- template
- static void print(vector &A) {
- for (int i = 0; i < A.size(); i++) {
- cout << A[i] << " ";
- }
- cout << endl;
- }
-};
-
-class Solution {
- public:
- int findPair(int n, int x, vector &arr) {
- unordered_set s;
- for (int i = 0; i < n; i++) {
- if (s.find(arr[i] + x) != s.end() || s.find(arr[i] - x) != s.end()) {
- return 1;
- }
- s.insert(arr[i]);
- }
- return -1;
- }
-};
-
-// Driver code
-int main() {
- int t;
- scanf("%d ", &t);
- while (t--) {
- int n;
- scanf("%d", &n);
-
- int x;
- scanf("%d", &x);
-
- vector arr(n);
- Array::input(arr, n);
-
- Solution obj;
- int res = obj.findPair(n, x, arr);
-
- cout << res << endl;
- }
- return 0;
-}
-```
-
-## Example Walkthrough
-
-**Example 1:**
-
-For the input:
-```
-n = 5
-arr[] = {1, 8, 30, 40, 100}
-x = 60
-```
-
-1. Initialize an empty set `s`.
-2. Iterate through the array:
- - For `arr[0] = 1`: add 1 to the set.
- - For `arr[1] = 8`: add 8 to the set.
- - For `arr[2] = 30`: add 30 to the set.
- - For `arr[3] = 40`: add 40 to the set.
- - For `arr[4] = 100`: check if `100 - 60 = 40` is in the set (it is).
-3. Return `1` as the pair `(100, 40)` has an absolute difference of 60.
-
-**Example 2:**
-
-For the input:
-```
-n = 3
-arr[] = {5, 10, 3}
-x = 8
-```
-
-1. Initialize an empty set `s`.
-2. Iterate through the array:
- - For `arr[0] = 5`: add 5 to the set.
- - For `arr[1] = 10`: add 10 to the set.
- - For `arr[2] = 3`: add 3 to the set.
-3. Return `-1` as no pair with an absolute difference of 8 is found.
-
-## Solution Logic:
-
-1. Use a set to store the elements.
-2. For each element, check if `(arr[i] + x)` or `(arr[i] - x)` exists in the set.
-3. Return `1` if a pair is found, otherwise return `-1`.
-
-## Time Complexity
-
-* The time complexity is $O(n)$ where $(n)$ is the number of elements in the array.
-
-## Space Complexity
-
-* The auxiliary space complexity is $O(n)$ as we use a set to store the elements.
-
-## References
-
-- **GeeksforGeeks Problem:** [Find pair given difference](https://www.geeksforgeeks.org/problems/find-pair-given-difference1559/1?page=2&difficulty=Easy&sortBy=submissions)
-- **Solution Author:** [arunimad6yuq](https://www.geeksforgeeks.org/user/arunimad6yuq/)
diff --git a/dsa-solutions/gfg-solutions/Easy problems/first-repeating-element.md b/dsa-solutions/gfg-solutions/Easy problems/first-repeating-element.md
deleted file mode 100644
index 36dc4cd76..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/first-repeating-element.md
+++ /dev/null
@@ -1,166 +0,0 @@
----
-id: first-repeating-element
-title: First Repeating Element
-sidebar_label: 0026 - First Repeating Element
-tags:
- - Easy
- - Array
- - GeeksforGeeks
- - CPP
- - DSA
-description: "This tutorial covers the solution to the First Repeating Element problem from the GeeksforGeeks website, featuring implementations in C++."
----
-## Problem Description
-
-Given an array `arr[]` of size `n`, find the first repeating element. The element should occur more than once and the index of its first occurrence should be the smallest.
-
-**Note:** The position you return should be according to 1-based indexing.
-
-## Examples
-
-**Example 1:**
-
-```
-Input:
-arr[] = {1, 5, 3, 4, 3, 5, 6}
-
-Output:
-2
-
-Explanation:
-5 is the first element that repeats, and its first occurrence is at index 2.
-```
-
-**Example 2:**
-
-```
-Input:
-arr[] = {1, 2, 3, 4}
-
-Output:
--1
-
-Explanation:
-There are no repeating elements, so the output is -1.
-```
-
-## Your Task
-
-You don't need to read input or print anything. Your task is to complete the function `firstRepeated()` which takes the array and its size as parameters and returns the position of the first repeating element.
-
-Expected Time Complexity: O(n)
-
-Expected Auxiliary Space: O(n)
-
-## Constraints
-
-* `1 ≤ n ≤ 10^6`
-* `0 ≤ arr[i] ≤ 10^6`
-
-## Problem Explanation
-
-To find the first repeating element, we can use a hashmap to store the count of each element and another hashmap to store the first occurrence of each element. This way, we can efficiently determine the first repeating element and its position.
-
-## Code Implementation
-
-### C++ Solution
-
-```cpp
-//{ Driver Code Starts
-#include
-using namespace std;
-
-// } Driver Code Ends
-class Solution {
- public:
- // Function to return the position of the first repeating element.
- int firstRepeated(vector &arr) {
- unordered_map elementCount;
- unordered_map firstOccurrence;
-
- for (int i = 0; i < arr.size(); i++) {
- if (elementCount.find(arr[i]) == elementCount.end()) {
- elementCount[arr[i]] = 1;
- firstOccurrence[arr[i]] = i + 1;
- } else {
- elementCount[arr[i]]++;
- }
- }
-
- int minIndex = INT_MAX;
-
- for (int i = 0; i < arr.size(); i++) {
- if (elementCount[arr[i]] > 1) {
- if (firstOccurrence[arr[i]] < minIndex) {
- minIndex = firstOccurrence[arr[i]];
- }
- }
- }
-
- if (minIndex == INT_MAX) {
- return -1;
- }
-
- return minIndex;
- }
-};
-
-//{ Driver Code Starts.
-int main() {
-
- int t;
- cin >> t;
- cin.ignore();
- while (t--) {
- vector arr;
- string input;
- getline(cin, input); // Read the entire line for the array elements
- stringstream ss(input);
- int number;
- while (ss >> number) {
- arr.push_back(number);
- }
-
- Solution ob;
- cout << ob.firstRepeated(arr) << endl;
- }
-
- return 0;
-}
-// } Driver Code Ends
-```
-
-## Example Walkthrough
-
-**Example 1:**
-
-For the input:
-```
-arr[] = {1, 5, 3, 4, 3, 5, 6}
-```
-
-1. Create a hashmap `elementCount` to store the count of each element and another hashmap `firstOccurrence` to store the first occurrence index of each element.
-2. Traverse the array and populate the `elementCount` and `firstOccurrence` hashmaps.
-3. Find the first repeating element by checking the minimum index in `firstOccurrence` where the count of the element in `elementCount` is greater than 1.
-
-The result is 2, as 5 is the first repeating element with the smallest index.
-
-## Solution Logic:
-
-1. Use a hashmap to store the count of each element.
-2. Use another hashmap to store the first occurrence index of each element.
-3. Traverse the array to populate the hashmaps.
-4. Find the first repeating element by checking the minimum index in `firstOccurrence` where the count of the element in `elementCount` is greater than 1.
-
-## Time Complexity
-
-* The time complexity is \(O(n)\) where \(n\) is the number of elements in the array, as we only iterate through the array once.
-
-## Space Complexity
-
-* The auxiliary space complexity is \(O(n)\) as we use two hashmaps to store the counts and first occurrences.
-
-## References
-
-- **GeeksforGeeks Problem:** [First Repeating Element](https://www.geeksforgeeks.org/problems/first-repeating-element4018/1?page=2&difficulty=Easy&sortBy=submissions)
-- **Solution Author:** [arunimad6yuq](https://www.geeksforgeeks.org/user/arunimad6yuq/)
diff --git a/dsa-solutions/gfg-solutions/Easy problems/floor-in-a-sorted-array.md b/dsa-solutions/gfg-solutions/Easy problems/floor-in-a-sorted-array.md
deleted file mode 100644
index 301fa1c3a..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/floor-in-a-sorted-array.md
+++ /dev/null
@@ -1,202 +0,0 @@
----
-id: floor-in-sorted-array
-title: Floor in a Sorted Array Problem (gfg)
-sidebar_label: 0013 - Floor in a Sorted Array
-tags:
- - Easy
- - Array
- - Binary Search
- - GeeksforGeeks
- - CPP
- - Python
- - DSA
-description: "This tutorial covers the solution to the Floor in a Sorted Array problem from the GeeksforGeeks website, featuring implementations in Python and C++."
----
-
-## Problem Description
-
-Given a sorted array `arr[]` of size `n` without duplicates, and given a value `x`. Floor of `x` is defined as the largest element `k` in `arr[]` such that `k` is smaller than or equal to `x`. Find the index of `k` (0-based indexing).
-
-## Examples
-
-**Example 1:**
-
-```
-Input:
-arr = [1, 2, 8, 10, 11, 12, 19]
-x = 5
-Output: 1
-Explanation: The largest element less than or equal to 5 is 2, which is at index 1.
-```
-
-**Example 2:**
-
-```
-Input:
-arr = [1, 2, 8, 10, 11, 12, 19]
-x = 20
-Output: 6
-Explanation: The largest element less than or equal to 20 is 19, which is at index 6.
-```
-
-**Example 3:**
-
-```
-Input:
-arr = [1, 2, 8, 10, 11, 12, 19]
-x = 0
-Output: -1
-Explanation: No element is less than or equal to 0.
-```
-
-## Your Task
-
-You don't need to read input or print anything. Your task is to complete the function `findFloor()` which takes the sorted array `arr[]`, its size `n`, and the value `x` as inputs and returns the index of the floor of `x`. If there is no floor, return `-1`.
-
-Expected Time Complexity: $O(\log N)$
-
-Expected Auxiliary Space: $O(1)$
-
-## Constraints
-
-- `1 ≤ n ≤ 10^7`
-- `1 ≤ arr[i] ≤ 10^18`
-- `0 ≤ x ≤ 10^18`
-
-## Problem Explanation
-
-The floor of a number `x` in a sorted array is the largest element in the array that is less than or equal to `x`. This problem can be efficiently solved using binary search due to the sorted nature of the array.
-
-## Code Implementation
-
-
-
-
-
-```py
-from typing import List
-
-class Solution:
- def findFloor(self, arr: List[int], n: int, x: int) -> int:
- low, high = 0, n - 1
- floor_index = -1
-
- while low <= high:
- mid = (low + high) // 2
-
- if arr[mid] == x:
- return mid
- elif arr[mid] < x:
- floor_index = mid
- low = mid + 1
- else:
- high = mid - 1
-
- return floor_index
-
-# Example usage
-if __name__ == "__main__":
- solution = Solution()
- arr = [1, 2, 8, 10, 11, 12, 19]
- x = 5
- print(solution.findFloor(arr, len(arr), x)) # Expected output: 1
-```
-
-
-
-
-
-```cpp
-//{ Driver Code Starts
-#include
-using namespace std;
-
-class Solution{
-public:
- int findFloor(vector v, long long n, long long x){
- int low = 0, high = n - 1;
- int floor_index = -1;
-
- while (low <= high) {
- int mid = low + (high - low) / 2;
-
- if (v[mid] == x) {
- return mid;
- } else if (v[mid] < x) {
- floor_index = mid;
- low = mid + 1;
- } else {
- high = mid - 1;
- }
- }
-
- return floor_index;
- }
-};
-
-int main() {
- long long t;
- cin >> t;
-
- while(t--){
- long long n;
- cin >> n;
- long long x;
- cin >> x;
-
- vector v(n);
-
- for(long long i = 0; i < n; i++){
- cin >> v[i];
- }
-
- Solution obj;
- cout << obj.findFloor(v, n, x) << endl;
- }
-
- return 0;
-}
-// } Driver Code Ends
-```
-
-
-
-
-## Example Walkthrough
-
-For the array `[1, 2, 8, 10, 11, 12, 19]` and `x = 5`:
-
-1. Start with the full array range.
-2. Compare the middle element to `x`.
-3. Adjust the search range based on whether the middle element is less than or greater than `x`.
-4. Continue until the search range is exhausted.
-5. The index of the largest element less than or equal to `x` is returned.
-
-For `x = 20`:
-
-1. The entire array is scanned.
-2. The largest element less than or equal to 20 is 19 at index 6.
-
-For `x = 0`:
-
-1. No element is less than or equal to 0.
-2. Return -1.
-
-## Solution Logic:
-
-1. Perform a binary search to find the largest element less than or equal to `x`.
-2. Maintain a variable to keep track of the floor index during the search.
-3. Return the floor index at the end of the search.
-
-## Time Complexity
-
-- The time complexity of the binary search is $O(\log N)$.
-
-## Space Complexity
-
-- The auxiliary space complexity is $O(1)$.
-
-## References
-
-- **gfg Problem:** [gfg Problem](https://www.geeksforgeeks.org/problems/floor-in-a-sorted-array-1587115620/1)
-- **Solution Author:** [arunimad6yuq](https://www.geeksforgeeks.org/user/arunimad6yuq/)
diff --git a/dsa-solutions/gfg-solutions/Easy problems/height-of-binary-tree.md b/dsa-solutions/gfg-solutions/Easy problems/height-of-binary-tree.md
deleted file mode 100644
index ce9c87c86..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/height-of-binary-tree.md
+++ /dev/null
@@ -1,213 +0,0 @@
----
-id: height-of-binary-tree
-title: Height of Binary Tree Problem (gfg)
-sidebar_label: 0011 - Height of Binary Tree
-tags:
- - Easy
- - Tree
- - Binary Tree
- - GeeksforGeeks
- - CPP
- - Python
- - DSA
-description: "This tutorial covers the solution to the Height of Binary Tree problem from the GeeksforGeeks website, featuring implementations in Python and C++."
----
-## Problem Description
-
-Given a binary tree, find its height. The height of a binary tree is the number of edges in the longest path from the root to a leaf node.
-
-## Examples
-
-**Example 1:**
-
-```
-Input:
- 1
- / \
- 2 3
-Output: 2
-```
-
-**Example 2:**
-
-```
-Input:
- 1
- /
- 2
- /
- 3
-Output: 3
-```
-
-## Your Task
-
-You don't need to read input or print anything. Your task is to complete the function `height()` which takes the root of the tree as input and returns the height of the tree.
-
-Expected Time Complexity: $O(N)$, where N is the number of nodes in the tree.
-
-Expected Auxiliary Space: $O(N)$
-
-## Constraints
-
-* `1 ≤ Number of nodes ≤ 10^5`
-* `1 ≤ Data of a node ≤ 10^5`
-
-## Problem Explanation
-
-The height of a binary tree is defined as the number of edges in the longest path from the root node to a leaf node. For a tree with a single node, the height is 0.
-
-## Code Implementation
-
-
-
-
-
- ```py
- # Definition for a binary tree node.
- class TreeNode:
- def __init__(self, val=0, left=None, right=None):
- self.val = val
- self.left = left
- self.right = right
-
- class Solution:
- def height(self, root: TreeNode) -> int:
- if root is None:
- return 0
- else:
- # Compute the height of each subtree
- left_height = self.height(root.left)
- right_height = self.height(root.right)
- # Return the larger one plus one for the root
- return max(left_height, right_height) + 1
-
- # Example usage
- if __name__ == "__main__":
- root = TreeNode(1)
- root.left = TreeNode(2)
- root.right = TreeNode(3)
- solution = Solution()
- print(solution.height(root)) # Expected output: 2
- ```
-
-
-
-
-
- ```cpp
- //{ Driver Code Starts
- #include
- using namespace std;
-
- struct Node {
- int data;
- Node* left;
- Node* right;
-
- Node(int val) {
- data = val;
- left = right = NULL;
- }
- };
-
- // } Driver Code Ends
- class Solution {
- public:
- // Function to find the height of a binary tree.
- int height(Node* node) {
- if (node == NULL) return 0;
-
- // Compute the height of each subtree
- int left_height = height(node->left);
- int right_height = height(node->right);
-
- // Return the larger one plus one for the root
- return max(left_height, right_height) + 1;
- }
- };
-
- //{ Driver Code Starts.
- int main() {
- int t;
- cin >> t;
- while (t--) {
- int n;
- cin >> n;
-
- Node* root = new Node(1); // Example root node
-
- // Constructing the tree
- queue q;
- q.push(root);
- for (int i = 0; i < n; i++) {
- int a, b;
- char lr;
- cin >> a >> b >> lr;
- Node* temp = q.front();
- q.pop();
-
- if (lr == 'L') {
- temp->left = new Node(b);
- q.push(temp->left);
- } else {
- temp->right = new Node(b);
- q.push(temp->right);
- }
- }
- Solution obj;
- cout << obj.height(root) << endl;
- }
- return 0;
- }
- // } Driver Code Ends
- ```
-
-
-
-
-## Example Walkthrough
-
-For the tree:
-
-```
- 1
- / \
- 2 3
-```
-
-1. The height of the left subtree (node 2) is 1.
-2. The height of the right subtree (node 3) is 1.
-3. The height of the tree is the maximum of the two heights plus 1, which is 2.
-
-For the tree:
-
-```
- 1
- /
- 2
- /
- 3
-```
-
-1. The height of the left subtree (node 2) is 2.
-2. The right subtree is empty, so its height is 0.
-3. The height of the tree is the maximum of the two heights plus 1, which is 3.
-
-## Solution Logic:
-
-1. Recursively compute the height of the left and right subtrees.
-2. Return the maximum height of the two subtrees plus 1 for the root.
-
-## Time Complexity
-
-* The function visits each node once, so the time complexity is $O(N)$.
-
-## Space Complexity
-
-* The auxiliary space complexity is $O(N)$ due to the recursion stack.
-
-## References
-
-- **gfg Problem:** [gfg Problem](https://www.geeksforgeeks.org/problems/height-of-binary-tree/1?page=2&difficulty=Easy&sortBy=submissions)
-- **Solution Author:** [arunimad6yuq](https://www.geeksforgeeks.org/user/arunimad6yuq/)
diff --git a/dsa-solutions/gfg-solutions/Easy problems/implement-two-stacks-in-an-array.md b/dsa-solutions/gfg-solutions/Easy problems/implement-two-stacks-in-an-array.md
deleted file mode 100644
index d910c5868..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/implement-two-stacks-in-an-array.md
+++ /dev/null
@@ -1,349 +0,0 @@
----
-id: implement-two-stacks-in-an-array
-title: Implement Two Stacks in an Array
-sidebar_label: 10 Implement Two Stacks in an Array
-tags:
-- Data Structures
-- Stacks
-- Python
-- Java
-- C++
-- JavaScript
-- TypeScript
-description: "This document provides solutions to the problem of implementing two stacks in a single array using various programming languages."
----
-
-## Problem
-
-Your task is to implement two stacks in one array efficiently. You need to implement four methods.
-
-- `twoStacks(n)`: Initialize the data structures and variables to be used to implement two stacks in one array.
-- `push1(x)`: Pushes element into the first stack.
-- `push2(x)`: Pushes element into the second stack.
-- `pop1()`: Pops element from the first stack and returns the popped element. If the first stack is empty, it should return -1.
-- `pop2()`: Pops element from the second stack and returns the popped element. If the second stack is empty, it should return -1.
-
-### Examples
-
-**Example 1:**
-
-```
-Input:
-push1(2)
-push1(3)
-push2(4)
-pop1()
-pop2()
-pop2()
-
-Output:
-3 4 -1
-
-Explanation:
-push1(2) -> stack1 = {2}
-push1(3) -> stack1 = {2, 3}
-push2(4) -> stack2 = {4}
-pop1() -> returns 3, stack1 = {2}
-pop2() -> returns 4, stack2 = {}
-pop2() -> stack2 is empty, returns -1
-```
-
-**Example 2:**
-
-```
-Input:
-push1(1)
-push2(2)
-pop1()
-push1(3)
-pop1()
-pop1()
-
-Output:
-1 3 -1
-
-Explanation:
-push1(1) -> stack1 = {1}
-push2(2) -> stack2 = {2}
-pop1() -> returns 1, stack1 = {}
-push1(3) -> stack1 = {3}
-pop1() -> returns 3, stack1 = {}
-pop1() -> stack1 is empty, returns -1
-```
-
-### Your Task
-
-You don't need to read input or print anything. You are required to complete the four methods `push1`, `push2`, `pop1`, and `pop2`.
-
-**Expected Time Complexity:** $O(1)$ for all the four methods.
-**Expected Auxiliary Space:** $O(1)$ for all the four methods.
-
-**Constraints**
-- 1 ≤ Number of queries ≤ 10^4
-- 1 ≤ Number of elements in the stack ≤ 100
-- The sum of the count of elements in both stacks < size of the given array
-
-## Solution
-
-### Intuition & Approach
-
-To efficiently implement two stacks in one array, we can start one stack from the beginning of the array and the other stack from the end of the array. This way, both stacks grow towards each other and we can manage them independently.
-
-### Implementation
-
-
-
-
-```python
-class TwoStacks:
- def __init__(self, n=100):
- self.size = n
- self.arr = [0] * n
- self.top1 = -1
- self.top2 = n
-
- # Function to push an integer into stack 1
- def push1(self, x):
- if self.top1 < self.top2 - 1:
- self.top1 += 1
- self.arr[self.top1] = x
-
- # Function to push an integer into stack 2
- def push2(self, x):
- if self.top1 < self.top2 - 1:
- self.top2 -= 1
- self.arr[self.top2] = x
-
- # Function to remove an element from top of stack 1
- def pop1(self):
- if self.top1 >= 0:
- x = self.arr[self.top1]
- self.top1 -= 1
- return x
- else:
- return -1
-
- # Function to remove an element from top of stack 2
- def pop2(self):
- if self.top2 < self.size:
- x = self.arr[self.top2]
- self.top2 += 1
- return x
- else:
- return -1
-```
-
-
-
-
-```java
-class TwoStacks {
- int size;
- int top1, top2;
- int arr[];
-
- TwoStacks(int n) {
- size = n;
- arr = new int[n];
- top1 = -1;
- top2 = n;
- }
-
- void push1(int x) {
- if (top1 < top2 - 1) {
- top1++;
- arr[top1] = x;
- }
- }
-
- void push2(int x) {
- if (top1 < top2 - 1) {
- top2--;
- arr[top2] = x;
- }
- }
-
- int pop1() {
- if (top1 >= 0) {
- int x = arr[top1];
- top1--;
- return x;
- } else {
- return -1;
- }
- }
-
- int pop2() {
- if (top2 < size) {
- int x = arr[top2];
- top2++;
- return x;
- } else {
- return -1;
- }
- }
-}
-```
-
-
-
-
-```cpp
-class TwoStacks {
- int* arr;
- int size;
- int top1, top2;
-public:
- TwoStacks(int n) {
- size = n;
- arr = new int[n];
- top1 = -1;
- top2 = n;
- }
-
- void push1(int x) {
- if (top1 < top2 - 1) {
- arr[++top1] = x;
- }
- }
-
- void push2(int x) {
- if (top1 < top2 - 1) {
- arr[--top2] = x;
- }
- }
-
- int pop1() {
- if (top1 >= 0) {
- return arr[top1--];
- } else {
- return -1;
- }
- }
-
- int pop2() {
- if (top2 < size) {
- return arr[top2++];
- } else {
- return -1;
- }
- }
-};
-```
-
-
-
-
-```javascript
-class TwoStacks {
- constructor(n = 100) {
- this.size = n;
- this.arr = new Array(n).fill(0);
- this.top1 = -1;
- this.top2 = n;
- }
-
- push1(x) {
- if (this.top1 < this.top2 - 1) {
- this.top1++;
- this.arr[this.top1] = x;
- }
- }
-
- push2(x) {
- if (this.top1 < this.top2 - 1) {
- this.top2--;
- this.arr[this.top2] = x;
- }
- }
-
- pop1() {
- if (this.top1 >= 0) {
- const x = this.arr[this.top1];
- this.top1--;
- return x;
- } else {
- return -1;
- }
- }
-
- pop2() {
- if (this.top2 < this.size) {
- const x = this.arr[this.top2];
- this.top2++;
- return x;
- } else {
- return -1;
- }
- }
-}
-```
-
-
-
-
-```typescript
-class TwoStacks {
- size: number;
- top1: number;
- top2: number;
- arr: number[];
-
- constructor(n: number = 100) {
- this.size = n;
- this.arr = new Array(n).fill(0);
- this.top1 = -1;
- this.top2 = n;
- }
-
- push1(x: number): void {
- if (this.top1 < this.top2 - 1) {
- this.top1++;
- this.arr[this.top1] = x;
- }
- }
-
- push2(x: number): void {
- if (this.top1 < this.top2 - 1) {
- this.top2--;
- this.arr[this.top2] = x;
- }
- }
-
- pop1(): number {
- if (this.top1 >= 0) {
- const x = this.arr[this.top1];
- this.top1--;
- return x;
- } else {
- return -1;
- }
- }
-
- pop2(): number {
- if (this.top2 < this.size) {
- const x = this.arr[this.top2];
- this.top2++;
- return x;
- } else {
- return -1;
- }
- }
-}
-```
-
-
-
-
-## Complexity Analysis
-
-The provided solutions efficiently implement two stacks in a single array using pointers. This approach ensures a time complexity of $O(1)$ for all stack operations and an auxiliary space complexity of $O(1)$. The algorithms are designed to handle up to $10^4$ queries efficiently without relying on dynamic data structures.
-
-**Time Complexity:** $O(1)$ for all the four methods.
-**Auxiliary Space:** $O(1)$ for all the four methods.
-
----
-
-- **GeeksforGeeks Problem:** [Implement two stack in an array](https://www.geeksforgeeks.org/problems/implement-two-stacks-in-an-array/0)
-- **Author GeeksforGeeks Profile:** [GeeksforGeeks](https://www.geeksforgeeks.org/user/GeeksforGeeks/)
-
diff --git a/dsa-solutions/gfg-solutions/Easy problems/intersection-of-two-sorted-linked-lists.md b/dsa-solutions/gfg-solutions/Easy problems/intersection-of-two-sorted-linked-lists.md
deleted file mode 100644
index e51deb4d5..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/intersection-of-two-sorted-linked-lists.md
+++ /dev/null
@@ -1,240 +0,0 @@
----
-id: intersection-of-two-sorted-linked-lists
-title: Intersection of Two Sorted Linked Lists
-sidebar_label: 6 Intersection of Two Sorted Linked Lists
-tags:
-- Linked List
-- Python
-- Java
-- C++
-- JavaScript
-- TypeScript
-description: "This document provides solutions to the problem of finding the intersection of two sorted linked lists in various programming languages."
----
-
-## Problem
-
-Given two linked lists sorted in increasing order, create a new linked list representing the intersection of the two linked lists. The new linked list should be made without changing the original lists.
-
-**Note:** The elements of the linked list are not necessarily distinct.
-
-### Examples
-
-**Example 1:**
-
-```
-Input:
-LinkedList1 = 1->2->3->4->6
-LinkedList2 = 2->4->6->8
-Output:
-2 4 6
-Explanation: For the given two linked list, 2, 4 and 6 are the elements in the intersection.
-```
-
-**Example 2:**
-
-```
-Input:
-LinkedList1 = 10->20->40->50
-LinkedList2 = 15->40
-Output:
-40
-```
-
-### Your Task
-
-You don't have to take any input or print anything. Your task is to complete the function `findIntersection()`, which will take the head of both of the linked lists as input and should find the intersection of the two linked lists and add all the elements in the intersection to the third linked list and return the head of the third linked list.
-
-**Expected Time Complexity:** $O(n + m)$
-**Expected Auxiliary Space:** $O(n + m)$
-
-**Note:** n, m are the sizes of the respective linked lists.
-
-### Constraints
-- $1 ≤ size of linked lists ≤ 5000$
-- $1 ≤ Data in linked list nodes ≤ 10^4$
-
-## Solution
-
-### Intuition & Approach
-
-To find the intersection of two sorted linked lists, we can iterate through both lists simultaneously. By comparing the elements at each step, we can identify common elements and construct a new linked list to represent the intersection. This process allows us to efficiently determine which elements are present in both lists without altering the original structures.
-
-### Implementation
-
-
-
-
-```python
-class ListNode:
- def __init__(self, x):
- self.data = x
- self.next = None
-
-class Solution:
- def findIntersection(self, head1, head2):
- intersection = ListNode(0) # dummy node
- tail = intersection
-
- while head1 and head2:
- if head1.data == head2.data:
- tail.next = ListNode(head1.data)
- tail = tail.next
- head1 = head1.next
- head2 = head2.next
- elif head1.data < head2.data:
- head1 = head1.next
- else:
- head2 = head2.next
-
- return intersection.next
-```
-
-
-
-
-```java
-class ListNode {
- int data;
- ListNode next;
- ListNode(int x) { data = x; next = null; }
-}
-
-class Solution {
- public ListNode findIntersection(ListNode head1, ListNode head2) {
- ListNode intersection = new ListNode(0); // dummy node
- ListNode tail = intersection;
-
- while (head1 != null && head2 != null) {
- if (head1.data == head2.data) {
- tail.next = new ListNode(head1.data);
- tail = tail.next;
- head1 = head1.next;
- head2 = head2.next;
- } else if (head1.data < head2.data) {
- head1 = head1.next;
- } else {
- head2 = head2.next;
- }
- }
-
- return intersection.next;
- }
-}
-```
-
-
-
-
-```cpp
-struct ListNode {
- int data;
- ListNode* next;
- ListNode(int x) : data(x), next(nullptr) {}
-};
-
-class Solution {
-public:
- ListNode* findIntersection(ListNode* head1, ListNode* head2) {
- ListNode* intersection = new ListNode(0); // dummy node
- ListNode* tail = intersection;
-
- while (head1 != nullptr && head2 != nullptr) {
- if (head1->data == head2->data) {
- tail->next = new ListNode(head1->data);
- tail = tail->next;
- head1 = head1->next;
- head2 = head2->next;
- } else if (head1->data < head2->data) {
- head1 = head1->next;
- } else {
- head2 = head2->next;
- }
- }
-
- return intersection->next;
- }
-};
-```
-
-
-
-
-```javascript
-class ListNode {
- constructor(data) {
- this.data = data;
- this.next = null;
- }
-}
-
-class Solution {
- findIntersection(head1, head2) {
- let intersection = new ListNode(0); // dummy node
- let tail = intersection;
-
- while (head1 !== null && head2 !== null) {
- if (head1.data === head2.data) {
- tail.next = new ListNode(head1.data);
- tail = tail.next;
- head1 = head1.next;
- head2 = head2.next;
- } else if (head1.data < head2.data) {
- head1 = head1.next;
- } else {
- head2 = head2.next;
- }
- }
-
- return intersection.next;
- }
-}
-```
-
-
-
-
-```typescript
-class ListNode {
- data: number;
- next: ListNode | null;
-
- constructor(data: number) {
- this.data = data;
- this.next = null;
- }
-}
-
-class Solution {
- findIntersection(head1: ListNode | null, head2: ListNode | null): ListNode | null {
- let intersection = new ListNode(0); // dummy node
- let tail = intersection;
-
- while (head1 !== null && head2 !== null) {
- if (head1.data === head2.data) {
- tail.next = new ListNode(head1.data);
- tail = tail.next;
- head1 = head1.next;
- head2 = head2.next;
- } else if (head1.data < head2.data) {
- head1 = head1.next;
- } else {
- head2 = head2.next;
- }
- }
-
- return intersection.next;
- }
-}
-```
-
-
-
-
-**Time Complexity:** $O(n + m)$
-**Auxiliary Space:** $O(n + m)$
-
-## References
-
-- **GeeksforGeeks Problem:** [Intersection of Two Sorted Linked Lists](https://www.geeksforgeeks.org/problems/intersection-of-two-sorted-linked-lists/0)
-- **Author GeeksforGeeks Profile:** [GeeksforGeeks](https://www.geeksforgeeks.org/user/GeeksforGeeks/)
diff --git a/dsa-solutions/gfg-solutions/Easy problems/leaders-in-an-array-1587115620 b/dsa-solutions/gfg-solutions/Easy problems/leaders-in-an-array-1587115620
deleted file mode 100644
index d0bc7a887..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/leaders-in-an-array-1587115620
+++ /dev/null
@@ -1,187 +0,0 @@
----
-id: array-leaders
-title: Array Leaders
-sidebar_label: 0015 - Array Leaders
-tags:
- - Easy
- - Array
- - GeeksforGeeks
- - CPP
- - Python
- - DSA
-description: "This tutorial covers the solution to the Array Leaders problem from the GeeksforGeeks website, featuring implementations in Python and C++."
----
-## Problem Description
-
-Given an array `arr` of `n` positive integers, your task is to find all the leaders in the array. An element of the array is considered a leader if it is greater than all the elements on its right side or if it is equal to the maximum element on its right side. The rightmost element is always a leader.
-
-## Examples
-
-**Example 1:**
-
-```
-Input:
-arr = [16, 17, 4, 3, 5, 2]
-Output: 17, 5, 2
-Explanation: The leaders are 17, 5, and 2.
-```
-
-**Example 2:**
-
-```
-Input:
-arr = [1, 2, 3, 4, 0]
-Output: 4, 0
-Explanation: The leaders are 4 and 0.
-```
-
-## Your Task
-
-You don't need to read input or print anything. Your task is to complete the function `leaders()` which takes the array `arr[]` and its size `n` as input parameters and returns a list of integers containing the leaders in the array.
-
-Expected Time Complexity: $O(n)$
-
-Expected Auxiliary Space: $O(n)$
-
-## Constraints
-
-* `1 ≤ n ≤ 10^7`
-* `0 ≤ arr[i] ≤ 10^7`
-
-## Problem Explanation
-
-The task is to find all the leaders in the array, where a leader is an element that is greater than or equal to all the elements to its right. The rightmost element is always a leader.
-
-## Code Implementation
-
-
-
-
-
- ```py
- class Solution:
- def leaders(self, arr, n):
- leaders = []
- max_from_right = arr[-1]
- leaders.append(max_from_right)
-
- for i in range(n-2, -1, -1):
- if arr[i] >= max_from_right:
- leaders.append(arr[i])
- max_from_right = arr[i]
-
- return leaders[::-1]
-
- # Example usage
- if __name__ == "__main__":
- solution = Solution()
- arr = [16, 17, 4, 3, 5, 2]
- print(solution.leaders(arr, len(arr))) # Expected output: [17, 5, 2]
- ```
-
-
-
-
-
- ```cpp
- //{ Driver Code Starts
- #include
- using namespace std;
-
- // } Driver Code Ends
- class Solution {
- public:
- vector leaders(int n, int arr[]) {
- vector leaders;
- int max_from_right = arr[n-1];
- leaders.push_back(max_from_right);
-
- for (int i = n-2; i >= 0; i--) {
- if (arr[i] >= max_from_right) {
- leaders.push_back(arr[i]);
- max_from_right = arr[i];
- }
- }
-
- reverse(leaders.begin(), leaders.end());
- return leaders;
- }
- };
-
- //{ Driver Code Starts.
- int main() {
- long long t;
- cin >> t; // testcases
- while (t--) {
- long long n;
- cin >> n; // total size of array
-
- int arr[n];
-
- // inserting elements in the array
- for (long long i = 0; i < n; i++) {
- cin >> arr[i];
- }
- Solution obj;
- // calling leaders() function
- vector v = obj.leaders(n, arr);
-
- // printing elements of the vector
- for (auto it = v.begin(); it != v.end(); it++) {
- cout << *it << " ";
- }
-
- cout << endl;
- }
- }
- // } Driver Code Ends
- ```
-
-
-
-
-## Example Walkthrough
-
-**Example 1:**
-
-For the array:
-```
-arr = [16, 17, 4, 3, 5, 2]
-```
-1. The rightmost element, 2, is a leader.
-2. 5 is greater than all elements to its right.
-3. 17 is greater than all elements to its right.
-
-So the leaders are 17, 5, and 2.
-
-**Example 2:**
-
-For the array:
-```
-arr = [1, 2, 3, 4, 0]
-```
-1. The rightmost element, 0, is a leader.
-2. 4 is greater than all elements to its right.
-
-So the leaders are 4 and 0.
-
-## Solution Logic:
-
-1. Traverse the array from right to left.
-2. Keep track of the maximum element encountered so far.
-3. If the current element is greater than or equal to the maximum element, it is a leader.
-4. Add the leader to the result list and update the maximum element.
-5. Return the result list in reverse order.
-
-## Time Complexity
-
-* The function iterates through the array once, so the time complexity is $O(n)$.
-
-## Space Complexity
-
-* The function uses additional space for the result list, so the auxiliary space complexity is $O(n)$.
-
-## References
-
-- **gfg Problem:** [gfg Problem](https://www.geeksforgeeks.org/problems/leaders-in-an-array-1587115620/1)
-- **Solution Author:** [arunimad6yuq](https://www.geeksforgeeks.org/user/arunimad6)
diff --git a/dsa-solutions/gfg-solutions/Easy problems/longest-common-prefix.md b/dsa-solutions/gfg-solutions/Easy problems/longest-common-prefix.md
deleted file mode 100644
index dea00542b..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/longest-common-prefix.md
+++ /dev/null
@@ -1,157 +0,0 @@
----
-id: longest-common-prefix
-title: Longest Common Prefix of Strings
-sidebar_label: 0028 - Longest Common Prefix of Strings
-tags:
- - Easy
- - Strings
- - GeeksforGeeks
- - CPP
- - DSA
-description: "This tutorial covers the solution to the Longest Common Prefix problem from the GeeksforGeeks website, featuring implementations in C++."
----
-## Problem Description
-
-Given an array of strings, return the longest common prefix among all strings present in the array. If there's no prefix common in all the strings, return "-1".
-
-## Examples
-
-**Example 1:**
-
-```
-Input:
-n = 4
-arr[] = {"geeksforgeeks", "geeks", "geek", "geezer"}
-
-Output:
-gee
-
-Explanation:
-"gee" is the longest common prefix among the input strings.
-```
-
-**Example 2:**
-
-```
-Input:
-n = 2
-arr[] = {"hello", "world"}
-
-Output:
--1
-
-Explanation:
-There is no common prefix among the input strings.
-```
-
-## Your Task
-
-You don't need to read input or print anything. Your task is to complete the function `longestCommonPrefix()` which takes the array and its size as parameters and returns the longest common prefix among all strings present in the array.
-
-Expected Time Complexity: O(N * minLength), where N is the number of strings and minLength is the length of the shortest string.
-
-Expected Auxiliary Space: O(1)
-
-## Constraints
-
-* `1 ≤ n ≤ 1000`
-* `1 ≤ |arr[i]| ≤ 1000`
-
-## Problem Explanation
-
-To find the longest common prefix, we can compare characters of each string one by one until a mismatch is found. This approach ensures that we only consider characters common in all strings.
-
-## Code Implementation
-
-### C++ Solution
-
-```cpp
-// Initial template for C++
-#include
-using namespace std;
-
-// User function template for C++
-class Solution {
- public:
- string longestCommonPrefix(int n, string arr[]) {
- if (n == 0) return "-1";
-
- string prefix = arr[0];
-
- for (int i = 1; i < n; i++) {
- while (arr[i].find(prefix) != 0) {
- prefix = prefix.substr(0, prefix.size() - 1);
- if (prefix.empty()) return "-1";
- }
- }
-
- return prefix;
- }
-};
-
-// Driver code
-int main() {
- int t;
- cin >> t;
- while (t--) {
- int n;
- cin >> n;
- string arr[n];
- for (int i = 0; i < n; ++i)
- cin >> arr[i];
-
- Solution ob;
- cout << ob.longestCommonPrefix(n, arr) << endl;
- }
- return 0;
-}
-```
-
-## Example Walkthrough
-
-**Example 1:**
-
-For the input:
-```
-n = 4
-arr[] = {"geeksforgeeks", "geeks", "geek", "geezer"}
-```
-
-1. Initialize `prefix` as the first string "geeksforgeeks".
-2. Compare `prefix` with each string in the array:
- - "geeksforgeeks" and "geeks": common prefix is "geeks".
- - "geeks" and "geek": common prefix is "geek".
- - "geek" and "geezer": common prefix is "gee".
-3. The result is "gee", which is the longest common prefix.
-
-**Example 2:**
-
-For the input:
-```
-n = 2
-arr[] = {"hello", "world"}
-```
-
-1. Initialize `prefix` as the first string "hello".
-2. Compare `prefix` with the second string "world":
- - No common prefix is found, so return "-1".
-
-## Solution Logic:
-
-1. Initialize `prefix` as the first string.
-2. Iterate through the remaining strings and update `prefix` by checking for common prefixes.
-3. If `prefix` becomes empty, return "-1".
-4. Return the final `prefix` as the result.
-
-## Time Complexity
-
-* The time complexity is \(O(N * minLength)\) where \(N\) is the number of strings and \(minLength\) is the length of the shortest string.
-
-## Space Complexity
-
-* The auxiliary space complexity is \(O(1)\) as we use a constant amount of extra space.
-
-## References
-
-- **GeeksforGeeks Problem:** [Longest Common Prefix in an array](https://www.geeksforgeeks.org/problems/longest-common-prefix-in-an-array5129/1?page=2&difficulty=Easy&sortBy=submissions)
-- **Solution Author:** [arunimad6yuq](https://www.geeksforgeeks.org/user/arunimad6yuq/)
diff --git a/dsa-solutions/gfg-solutions/Easy problems/missing-number-in-array1416 b/dsa-solutions/gfg-solutions/Easy problems/missing-number-in-array1416
deleted file mode 100644
index 9439cb936..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/missing-number-in-array1416
+++ /dev/null
@@ -1,158 +0,0 @@
----
-id: find-the-missing-number
-title: Find the Missing Number Problem (gfg)
-sidebar_label: 0005 - Find the Missing Number
-tags:
- - Intermediate
- - Array
- - Mathematical
- - GeeksforGeeks
- - CPP
- - Python
- - DSA
-description: "This tutorial covers the solution to the Find the Missing Number problem from the GeeksforGeeks website, featuring implementations in Python and C++."
----
-## Problem Description
-
-Given an array containing `n-1` distinct numbers taken from 1 to `n`, find the one number that is missing from the array.
-
-## Examples
-
-**Example 1:**
-
-```
-Input: array = [3, 1, 4]
-Output: 2
-Explanation: The missing number is 2.
-```
-
-**Example 2:**
-
-```
-Input: array = [5, 3, 1, 2]
-Output: 4
-Explanation: The missing number is 4.
-```
-
-## Your Task
-
-You don't need to read input or print anything. Your task is to complete the function `missingNumber()` which takes the size `n` of the range and the array `arr` as inputs and returns the missing number.
-
-Expected Time Complexity: $O(n)$
-
-Expected Auxiliary Space: $O(1)$
-
-## Constraints
-
-* `2 ≤ n ≤ 10^6`
-* `1 ≤ array[i] ≤ n`
-* All elements of the array are distinct.
-
-## Problem Explanation
-
-The problem is to find the missing number from an array of `n-1` elements which contains distinct numbers from 1 to `n`. The missing number is the one number that is not present in the array.
-
-## Code Implementation
-
-
-
-
-
- ```py
- class Solution:
- def missingNumber(self, n, arr):
- # Calculate the expected sum of the first n natural numbers
- total_sum = n * (n + 1) // 2
-
- # Calculate the sum of the elements in the array
- arr_sum = sum(arr)
-
- # The missing number is the difference between the expected sum and the array sum
- return total_sum - arr_sum
-
- # Example usage
- if __name__ == "__main__":
- solution = Solution()
- print(solution.missingNumber(4, [3, 1, 4])) # Expected output: 2
- print(solution.missingNumber(5, [5, 3, 1, 2])) # Expected output: 4
- ```
-
-
-
-
-
- ```cpp
- #include
- #include
- using namespace std;
-
- class Solution {
- public:
- int missingNumber(int n, vector& arr) {
- // Calculate the expected sum of the first n natural numbers
- int total_sum = n * (n + 1) / 2;
-
- // Calculate the sum of the elements in the array
- int arr_sum = 0;
- for (int num : arr) {
- arr_sum += num;
- }
-
- // The missing number is the difference between the expected sum and the array sum
- return total_sum - arr_sum;
- }
- };
-
- // Example usage
- int main() {
- int t;
- cin >> t;
- while (t--) {
- int n;
- cin >> n;
-
- vector arr(n - 1);
- for (int i = 0; i < n - 1; ++i)
- cin >> arr[i];
- Solution obj;
- cout << obj.missingNumber(n, arr) << "\n";
- }
- return 0;
- }
- ```
-
-
-
-
-## Example Walkthrough
-
-For the array `array = [3, 1, 4]` with `n = 4`:
-
-1. The expected sum of the first 4 natural numbers is `4 * (4 + 1) / 2 = 10`.
-2. The sum of the array elements is `3 + 1 + 4 = 8`.
-3. The missing number is `10 - 8 = 2`.
-
-For the array `array = [5, 3, 1, 2]` with `n = 5`:
-
-1. The expected sum of the first 5 natural numbers is `5 * (5 + 1) / 2 = 15`.
-2. The sum of the array elements is `5 + 3 + 1 + 2 = 11`.
-3. The missing number is `15 - 11 = 4`.
-
-## Solution Logic:
-
-1. Calculate the expected sum of the first `n` natural numbers using the formula `n * (n + 1) / 2`.
-2. Calculate the sum of the elements in the given array.
-3. The missing number is the difference between the expected sum and the sum of the array elements.
-
-## Time Complexity
-
-* The time complexity is $O(n)$, where n is the size of the input array.
-
-## Space Complexity
-
-* The auxiliary space complexity is $O(1)$ because we are not using any extra space proportional to the size of the input array.
-
-## References
-
-- **gfg Problem:** [gfg Problem](https://www.geeksforgeeks.org/problems/missing-number-in-array1416/1?page=1&difficulty=Easy&sortBy=submissions)
-- **Solution Author:** [arunimad6yuq](https://www.geeksforgeeks.org/user/arunimad6yuq/)
diff --git a/dsa-solutions/gfg-solutions/Easy problems/nth-fibonacci-number1335.md b/dsa-solutions/gfg-solutions/Easy problems/nth-fibonacci-number1335.md
deleted file mode 100644
index cd97f024f..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/nth-fibonacci-number1335.md
+++ /dev/null
@@ -1,154 +0,0 @@
----
-id: nth-fibonacci-number
-title: Nth Fibonacci Number Problem (gfg)
-sidebar_label: 0010 - Nth Fibonacci Number
-tags:
- - Easy
- - Dynamic Programming
- - Math
- - GeeksforGeeks
- - CPP
- - Python
- - DSA
-description: "This tutorial covers the solution to the Nth Fibonacci Number problem from the GeeksforGeeks website, featuring implementations in Python and C++."
----
-
-## Problem Description
-
-Given a positive integer `n`, find the nth Fibonacci number. Since the answer can be very large, return the answer modulo `1000000007`.
-
-Note: For this question, take the first Fibonacci number to be 1.
-
-## Examples
-
-**Example 1:**
-
-```
-Input: n = 1
-Output: 1
-```
-
-**Example 2:**
-
-```
-Input: n = 5
-Output: 5
-```
-
-## Your Task
-
-You don't need to read input or print anything. Your task is to complete the function `nthFibonacci()` which takes the integer `n` as input and returns the nth Fibonacci number modulo `1000000007`.
-
-Expected Time Complexity: $O(n)$
-
-Expected Auxiliary Space: $O(n)$ for dynamic programming or $O(1)$ for iterative approach.
-
-## Constraints
-
-- `1 ≤ n ≤ 10^7`
-
-## Problem Explanation
-
-The Fibonacci sequence is a series of numbers where each number is the sum of the two preceding ones, starting from 1 and 1. The nth Fibonacci number can be computed using the formula: `F(n) = F(n-1) + F(n-2)`. For large values of `n`, the result should be returned modulo `1000000007`.
-
-## Code Implementation
-
-
-
-
-
-```py
-MOD = 1000000007
-
-class Solution:
- def nthFibonacci(self, n: int) -> int:
- if n == 1 or n == 2:
- return 1
-
- a, b = 1, 1
- for i in range(3, n + 1):
- a, b = b, (a + b) % MOD
-
- return b
-
-# Example usage
-if __name__ == "__main__":
- solution = Solution()
- print(solution.nthFibonacci(1)) # Expected output: 1
- print(solution.nthFibonacci(5)) # Expected output: 5
-```
-
-
-
-
-
-```cpp
-//{ Driver Code Starts
-#include
-using namespace std;
-
-// } Driver Code Ends
-class Solution {
-public:
- // Function to find nth Fibonacci number
- int nthFibonacci(int n) {
- const int MOD = 1000000007;
- if (n == 1 || n == 2) return 1;
-
- int a = 1, b = 1, c;
- for (int i = 3; i <= n; ++i) {
- c = (a + b) % MOD;
- a = b;
- b = c;
- }
- return b;
- }
-};
-
-//{ Driver Code Starts.
-int main() {
- int t;
- cin >> t;
- while (t--) {
- int n;
- cin >> n;
- Solution obj;
- cout << obj.nthFibonacci(n) << endl;
- }
- return 0;
-}
-// } Driver Code Ends
-```
-
-
-
-
-## Example Walkthrough
-
-For `n = 1`:
-
-1. The first Fibonacci number is 1.
-
-For `n = 5`:
-
-1. The Fibonacci sequence starts as: `1, 1, 2, 3, 5`.
-2. The 5th Fibonacci number is 5.
-
-## Solution Logic:
-
-1. Initialize the first two Fibonacci numbers as 1.
-2. Use a loop to iterate from 3 to `n`, updating the Fibonacci numbers.
-3. Return the nth Fibonacci number modulo `1000000007`.
-
-## Time Complexity
-
-- The iterative approach has a time complexity of $O(n)$.
-
-## Space Complexity
-
-- The space complexity is $O(1)$ since we are using only a fixed amount of extra space.
-
-## References
-
-- **gfg Problem:** [gfg Problem](https://www.geeksforgeeks.org/problems/nth-fibonacci-number1335/1?page=1&difficulty=Easy&sortBy=submissions)
-- **Solution Author:** [arunimad6yuq](https://www.geeksforgeeks.org/user/arunimad6yuq/)
diff --git a/dsa-solutions/gfg-solutions/Easy problems/ount-pairs-with-given-sum.md b/dsa-solutions/gfg-solutions/Easy problems/ount-pairs-with-given-sum.md
deleted file mode 100644
index 178566c00..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/ount-pairs-with-given-sum.md
+++ /dev/null
@@ -1,194 +0,0 @@
----
-id: count-pairs-with-given-sum
-title: Count Pairs with Given Sum
-sidebar_label: 0019 - Count Pairs with Given Sum
-tags:
- - Easy
- - Array
- - Hashing
- - GeeksforGeeks
- - CPP
- - DSA
-description: "This tutorial covers the solution to the Count Pairs with Given Sum problem from the GeeksforGeeks website, featuring implementations in Python and C++."
----
-## Problem Description
-
-Given an array `arr` and an integer `k`, find the number of pairs of elements in the array whose sum is `k`.
-
-## Examples
-
-**Example 1:**
-
-```
-Input:
-arr = [1, 5, 7, 1]
-k = 6
-Output: 2
-Explanation: The pairs are (1, 5) and (5, 1).
-```
-
-**Example 2:**
-
-```
-Input:
-arr = [1, 1, 1, 1]
-k = 2
-Output: 6
-Explanation: The pairs are (1, 1), (1, 1), (1, 1), (1, 1), (1, 1), and (1, 1).
-```
-
-## Your Task
-
-You don't need to read input or print anything. Your task is to complete the function `getPairsCount()` which takes the array `arr` and the integer `k` as input and returns the number of pairs in the array whose sum is equal to `k`.
-
-Expected Time Complexity: $O(N)$
-
-Expected Auxiliary Space: $O(N)$
-
-## Constraints
-
-* `1 ≤ N ≤ 10^6`
-* `1 ≤ arr[i] ≤ 10^8`
-* `1 ≤ k ≤ 10^8`
-
-## Problem Explanation
-
-The task is to find the number of pairs in the array whose sum equals `k`. The solution should be efficient in terms of both time and space complexity.
-
-## Code Implementation
-
-
-
-
-
- ```py
- class Solution:
- def getPairsCount(self, arr, k):
- count = 0
- freq = {}
-
- for num in arr:
- if k - num in freq:
- count += freq[k - num]
-
- if num in freq:
- freq[num] += 1
- else:
- freq[num] = 1
-
- return count
-
- # Example usage
- if __name__ == "__main__":
- solution = Solution()
- print(solution.getPairsCount([1, 5, 7, 1], 6)) # Expected output: 2
- print(solution.getPairsCount([1, 1, 1, 1], 2)) # Expected output: 6
- ```
-
-
-
-
-
- ```cpp
- //{ Driver Code Starts
- // Initial template for C++
-
- #include
- using namespace std;
-
- // } Driver Code Ends
- // User function template for C++
-
- class Solution {
- public:
- int getPairsCount(const vector& arr, int k) {
- unordered_map freq;
- int count = 0;
-
- for (int num : arr) {
- if (freq.find(k - num) != freq.end()) {
- count += freq[k - num];
- }
- freq[num]++;
- }
-
- return count;
- }
- };
-
- //{ Driver Code Starts.
-
- int main() {
- int t;
- cin >> t;
- cin.ignore(); // Ignore the newline character after t
- while (t--) {
- vector arr;
- int k;
-
- cin >> k;
- cin.ignore(); // Ignore the newline character after k
-
- string input;
-
- getline(cin, input); // Read the entire line for the array elements
- stringstream ss(input);
- int number;
- while (ss >> number) {
- arr.push_back(number);
- }
-
- Solution ob;
- auto ans = ob.getPairsCount(arr, k);
- cout << ans << "\n";
- }
-
- return 0;
- }
- // } Driver Code Ends
- ```
-
-
-
-
-## Example Walkthrough
-
-**Example 1:**
-
-For the input array:
-```
-arr = [1, 5, 7, 1]
-k = 6
-```
-1. The pairs are (1, 5) and (5, 1). Hence, the output is 2.
-
-**Example 2:**
-
-For the input array:
-```
-arr = [1, 1, 1, 1]
-k = 2
-```
-1. The pairs are (1, 1), (1, 1), (1, 1), (1, 1), (1, 1), and (1, 1). Hence, the output is 6.
-
-## Solution Logic:
-
-1. Use a hash map to keep track of the frequency of each element.
-2. Traverse the array:
- - For each element, check if `k - num` exists in the hash map.
- - If it does, add the frequency of `k - num` to the count.
- - Update the frequency of the current element in the hash map.
-3. Return the count of pairs.
-
-## Time Complexity
-
-* The function traverses the array once and uses a hash map for constant time lookups, so the time complexity is $O(N)$.
-
-## Space Complexity
-
-* The function uses a hash map to store the frequency of elements, so the auxiliary space complexity is $O(N)$.
-
-## References
-
-- **GeeksforGeeks Problem:** [Count Pairs with Given Sum](https://www.geeksforgeeks.org/problems/count-pairs-with-given-sum5022/1?page=1&difficulty=Easy&sortBy=submissions)
-- **Solution Author:** [arunimad6yuq](https://www.geeksforgeeks.org/user/arunimad6yuq/)
diff --git a/dsa-solutions/gfg-solutions/Easy problems/power-of-two.md b/dsa-solutions/gfg-solutions/Easy problems/power-of-two.md
deleted file mode 100644
index e317e806e..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/power-of-two.md
+++ /dev/null
@@ -1,204 +0,0 @@
----
-id: power-of-2
-title: Power of 2
-tags:
- - Easy
- - Bit Manipulation
- - GeeksforGeeks
- - CPP
- - Python
- - DSA
-description: "This tutorial covers the solution to the Power of 2 problem from the GeeksforGeeks."
----
-
-## Problem Description
-
-Given a non-negative integer `n`, the task is to check if it is a power of 2.
-
-## Examples
-
-**Example 1:**
-
-```
-Input: n = 1
-Output: true
-Explanation: 2^0 = 1
-```
-
-**Example 2:**
-
-```
-Input: n = 16
-Output: true
-Explanation: 2^4 = 16
-```
-
-**Example 3:**
-
-```
-Input: n = 3
-Output: false
-Explanation: 3 is not a power of 2
-```
-
-## Your Task
-
-You don't need to read input or print anything. Your task is to complete the function `isPowerofTwo()` which takes an integer `n` as input and returns `true` if `n` is a power of 2, otherwise `false`.
-
-Expected Time Complexity: $O(1)$
-
-Expected Auxiliary Space: $O(1)$
-
-## Constraints
-
-- `0 ≤ n ≤ 10^18`
-
-## Problem Explanation
-
-A number is a power of 2 if there exists an integer `x` such that `n = 2^x`.
-
-## Code Implementation
-
-
-
-
-
- ```python
- class Solution:
- def isPowerofTwo(self, n: int) -> bool:
- if n <= 0:
- return False
- # A power of two has exactly one bit set in binary representation
- return (n & (n - 1)) == 0
-
- # Example usage
- if __name__ == "__main__":
- solution = Solution()
- print(solution.isPowerofTwo(16)) # Expected output: True
- print(solution.isPowerofTwo(3)) # Expected output: False
- ```
-
-
-
-
-
- ```cpp
- #include
- using namespace std;
-
- class Solution {
- public:
- // Function to check if given number n is a power of two.
- bool isPowerofTwo(long long n) {
- if (n <= 0) return false;
- // A power of two has exactly one bit set in binary representation
- return (n & (n - 1)) == 0;
- }
- };
-
- int main() {
- int t;
- cin >> t; // testcases
-
- for (int i = 0; i < t; i++) {
- long long n; // input a number n
- cin >> n;
- Solution ob;
- if (ob.isPowerofTwo(n))
- cout << "true" << endl;
- else
- cout << "false" << endl;
- }
- return 0;
- }
- ```
-
-
-
-
-
-
- ```javascript
-class Solution {
- isPowerofTwo(n) {
- if (n <= 0) return false;
- return (n & (n - 1)) == 0;
- }
-}
-
-let t = parseInt(prompt("Enter number of testcases"));
-for (let i = 0; i < t; i++) {
- let n = parseInt(prompt("Enter a number"));
- let sol = new Solution();
- console.log(sol.isPowerofTwo(n));
-}
-
- ```
-
-
-
-
-
- ```typescript
-class Solution {
- isPowerofTwo(n: number): boolean {
- if (n <= 0) return false;
- return (n & (n - 1)) == 0;
- }
-}
-
-let t: number = parseInt(prompt("Enter number of testcases"));
-for (let i: number = 0; i < t; i++) {
- let n: number = parseInt(prompt("Enter a number"));
- let sol: Solution = new Solution();
- console.log(sol.isPowerofTwo(n));
-}
-
- ```
-
-
-
-
-
-
-
- ```java
-import java.util.Scanner;
-
-class Solution {
- boolean isPowerofTwo(long n) {
- if (n <= 0) return false;
- return (n & (n - 1)) == 0;
- }
-}
-
-public class Main {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- int t = sc.nextInt();
- for (int i = 0; i < t; i++) {
- long n = sc.nextLong();
- Solution sol = new Solution();
- System.out.println(sol.isPowerofTwo(n));
- }
- }
-}
-
- ```
-
-
-
-
-## Solution Logic:
-
-1. A number `n` is a power of 2 if it has exactly one bit set in its binary representation.
-2. To check this, you can use the property: `n & (n - 1) == 0`.
-3. This expression is true only for powers of 2.
-
-## Time Complexity
-
-- The function operates in constant time, $O(1)$.
-
-## Space Complexity
-
-- The function uses constant space, $O(1)$.
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Easy problems/reverse-a-doubly-linked-list.md b/dsa-solutions/gfg-solutions/Easy problems/reverse-a-doubly-linked-list.md
deleted file mode 100644
index 6ed05592e..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/reverse-a-doubly-linked-list.md
+++ /dev/null
@@ -1,166 +0,0 @@
----
-id: reverse-doubly-linked-list
-title: Reverse a Doubly Linked List
-sidebar_label: 2 Reverse a Doubly Linked List
-tags:
-- Doubly Linked List
-- Python
-- Java
-- C++
-- JavaScript
-- TypeScript
-description: "This document explores different approaches to reversing a doubly linked list in-place, including solutions in Python, Java, C++, JavaScript, and TypeScript."
----
-
-## Problem
-
-Given a doubly linked list of n elements, the task is to reverse this list in-place.
-
-### Examples
-
-**Example 1:**
-
-```
-Input:
-LinkedList: 3 <--> 4 <--> 5
-Output:
-5 4 3
-
-Explanation:
-After reversing the list, elements are 5 <--> 4 <--> 3.
-```
-
-**Example 2:**
-
-```
-Input:
-LinkedList: 75 <--> 122 <--> 59 <--> 196
-Output:
-196 59 122 75
-
-Explanation:
-After reversing the list, elements are 196 <--> 59 <--> 122 <--> 75.
-```
-
-### Your Task
-Your task is to complete the given function `reverseDLL()`, which takes head reference as an argument and reverses the elements in-place such that the tail becomes the new head and all pointers are pointing in the right order. You need to return the new head of the reversed list.
-
-**Expected Time Complexity:** $O(N)$
-**Expected Auxiliary Space:** $O(1)$
-
-### Constraints
-- $1 ≤ number of nodes ≤ 10^4$
-- $0 ≤ value of nodes ≤ 10^4$
-
-## Solution
-
-### Approach
-
-To reverse a doubly linked list in-place, we can use three pointers: `previous_node`, `current_node`, and `next_node`. The algorithm traverses the list, updating the pointers at each step until the entire list is reversed.
-
-### Python Code
-
-
-
-
-```python
-class Solution:
- def reverseDLL(self, head):
- while head:
- head.next, head.prev = head.prev, head.next
- if not head.prev:
- return head
- head = head.prev
-```
-
-
-
-
-```java
-class Solution {
- public Node reverseDLL(Node head) {
- while (head != null) {
- Node temp = head.prev;
- head.prev = head.next;
- head.next = temp;
- if (head.prev == null) {
- return head;
- }
- head = head.prev;
- }
- return null;
- }
-}
-```
-
-
-
-
-```cpp
-class Solution {
-public:
- Node* reverseDLL(Node* head) {
- while (head != nullptr) {
- Node* temp = head->prev;
- head->prev = head->next;
- head->next = temp;
- if (head->prev == nullptr) {
- return head;
- }
- head = head->prev;
- }
- return nullptr;
- }
-};
-```
-
-
-
-
-```javascript
-class Solution {
- reverseDLL(head) {
- while (head) {
- [head.next, head.prev] = [head.prev, head.next];
- if (!head.prev) {
- return head;
- }
- head = head.prev;
- }
- return null;
- }
-}
-```
-
-
-
-
-```typescript
-class Solution {
- reverseDLL(head: Node): Node | null {
- while (head) {
- [head.next, head.prev] = [head.prev, head.next];
- if (!head.prev) {
- return head;
- }
- head = head.prev;
- }
- return null;
- }
-}
-```
-
-
-
-
-### Complexity Analysis
-
-- **Time Complexity:** $O(N),$ where N is the number of elements in the doubly linked list. We traverse the entire list once.
-- **Space Complexity:** $O(1)$, as we only use a constant amount of extra space for pointers.
-
----
-
-## References
-
-- **GeeksforGeeks Problem:** [Reverse a Doubly Linked List](https://www.geeksforgeeks.org/reverse-a-doubly-linked-list/)
-- **Author GeeksforGeeks Profile:** [GeeksforGeeks](https://www.geeksforgeeks.org/user/GeeksforGeeks/)
diff --git a/dsa-solutions/gfg-solutions/Easy problems/reverse-a-linked-list.md b/dsa-solutions/gfg-solutions/Easy problems/reverse-a-linked-list.md
deleted file mode 100644
index 126a9dbad..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/reverse-a-linked-list.md
+++ /dev/null
@@ -1,189 +0,0 @@
----
-id: reverse-linked-list
-title: Reverse a Linked List
-sidebar_label: 1 Reverse a Linked List
-tags:
-- Linked List
-- Python
-- Java
-- C++
-- JavaScript
-- TypeScript
-description: "This document explores different approaches to reversing a linked list, including solutions in Python, Java, C++, JavaScript, and TypeScript."
----
-
-## Problem
-
-Given a linked list of N nodes, the task is to reverse this list.
-
-### Examples
-
-**Example 1:**
-
-```
-Input:
-LinkedList: 1->2->3->4->5->6
-Output:
-6 5 4 3 2 1
-
-Explanation:
-After reversing the list, elements are 6->5->4->3->2->1.
-```
-
-**Example 2:**
-
-```
-Input:
-LinkedList: 2->7->8->9->10
-Output:
-10 9 8 7 2
-
-Explanation:
-After reversing the list, elements are 10->9->8->7->2.
-```
-
-### Your Task
-The task is to complete the function `reverseList()` with head reference as the only argument and should return the new head after reversing the list.
-
-**Expected Time Complexity:** $ O(N) $
-**Expected Auxiliary Space:** $ O(1) $
-
-### Constraints
-- $ 1 ≤ N ≤ 10^4 $
-
-## Solution
-
-### Approach
-
-To reverse a linked list, we can follow these steps:
-
-1. Initialize three pointers: `prev` (previous node), `curr` (current node), and `nextNode` (next node).
-2. Start with `prev = None` and `curr = head`, where `head` is the head of the original linked list.
-3. Traverse the linked list:
- - Store `nextNode` as `curr.next`.
- - Reverse the link by pointing `curr.next` to `prev`.
- - Move `prev` to `curr` and `curr` to `nextNode`.
-4. After traversing, update the new head to `prev`.
-5. Return the new head.
-
-### Implementation
-
-
-
-
-```python
-class Solution:
- # Function to reverse a linked list.
- def reverseList(self, head):
- prev = None
- curr = head
-
- while curr:
- nextNode = curr.next
- curr.next = prev
- prev = curr
- curr = nextNode
-
- head = prev
- return head
-```
-
-
-
-
-```java
-class Solution {
- public ListNode reverseList(ListNode head) {
- ListNode prev = null;
- ListNode curr = head;
-
- while (curr != null) {
- ListNode nextNode = curr.next;
- curr.next = prev;
- prev = curr;
- curr = nextNode;
- }
-
- head = prev;
- return head;
- }
-}
-```
-
-
-
-
-```cpp
-class Solution {
-public:
- ListNode* reverseList(ListNode* head) {
- ListNode* prev = nullptr;
- ListNode* curr = head;
-
- while (curr != nullptr) {
- ListNode* nextNode = curr->next;
- curr->next = prev;
- prev = curr;
- curr = nextNode;
- }
-
- head = prev;
- return head;
- }
-};
-```
-
-
-
-
-```javascript
-function reverseList(head) {
- let prev = null;
- let curr = head;
-
- while (curr) {
- let nextNode = curr.next;
- curr.next = prev;
- prev = curr;
- curr = nextNode;
- }
-
- head = prev;
- return head;
-}
-```
-
-
-
-
-```typescript
-function reverseList(head: ListNode | null): ListNode | null {
- let prev: ListNode | null = null;
- let curr: ListNode | null = head;
-
- while (curr !== null) {
- let nextNode: ListNode | null = curr.next;
- curr.next = prev;
- prev = curr;
- curr = nextNode;
- }
-
- head = prev;
- return head;
-}
-```
-
-
-
-
-### Complexity Analysis
-
-- **Time Complexity:** $O(N)$, where N is the number of nodes in the linked list. We traverse the entire list once.
-- **Space Complexity:** $O(1)$, as we only use a constant amount of extra space for pointers.
-
----
-
-## References
-
-- **GeeksforGeeks Problem:** [Reverse a Linked List](https://www.geeksforgeeks.org/reverse-a-linked-list/)
-- **Author GeeksforGeeks Profile:** [GeeksforGeeks](https://www.geeksforgeeks.org/user/GeeksforGeeks/)
diff --git a/dsa-solutions/gfg-solutions/Easy problems/reverse-words-in-a-given-string5459.md b/dsa-solutions/gfg-solutions/Easy problems/reverse-words-in-a-given-string5459.md
deleted file mode 100644
index 6815348f8..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/reverse-words-in-a-given-string5459.md
+++ /dev/null
@@ -1,168 +0,0 @@
----
-id: reverse-words-in-a-given-string
-title: Reverse Words in a Given String (gfg)
-sidebar_label: 0007 - Reverse Words in a Given String
-tags:
- - Easy
- - String
- - GeeksforGeeks
- - CPP
- - Python
- - DSA
-description: "This tutorial covers the solution to the Reverse Words in a Given String problem from the GeeksforGeeks website, featuring implementations in Python and C++."
----
-## Problem Description
-
-Given a string `S`, you need to reverse the order of words in the string. Words are separated by dots.
-
-## Examples
-
-**Example 1:**
-
-```
-Input: S = "i.like.this.program.very.much"
-Output: "much.very.program.this.like.i"
-Explanation: After reversing the words, the new string is "much.very.program.this.like.i".
-```
-
-**Example 2:**
-
-```
-Input: S = "pqr.mno"
-Output: "mno.pqr"
-Explanation: After reversing the words, the new string is "mno.pqr".
-```
-
-## Your Task
-
-You don't need to read input or print anything. Your task is to complete the function `reverseWords()` which takes the string `S` as input and returns the string with the words reversed.
-
-Expected Time Complexity: $O(|S|)$
-
-Expected Auxiliary Space: $O(|S|)$
-
-## Constraints
-
-* `1 ≤ |S| ≤ 2000`
-
-## Problem Explanation
-
-The problem is to reverse the order of words in a string where words are separated by dots.
-
-## Code Implementation
-
-
-
-
-
- ```py
- class Solution:
- def reverseWords(self, S):
- # Split the string by dots
- words = S.split('.')
- # Reverse the list of words
- words.reverse()
- # Join the reversed list back into a string with dots
- return '.'.join(words)
-
- # Example usage
- if __name__ == "__main__":
- solution = Solution()
- print(solution.reverseWords("i.like.this.program.very.much")) # Expected output: "much.very.program.this.like.i"
- print(solution.reverseWords("pqr.mno")) # Expected output: "mno.pqr"
- ```
-
-
-
-
-
- ```cpp
- //{ Driver Code Starts
- #include
- using namespace std;
-
- // } Driver Code Ends
-
- class Solution {
- public:
- // Function to reverse words in a given string.
- string reverseWords(string S) {
- // Split the string by dots
- vector words;
- string word;
- for (char c : S) {
- if (c == '.') {
- words.push_back(word);
- word.clear();
- } else {
- word += c;
- }
- }
- words.push_back(word); // Add the last word
-
- // Reverse the list of words
- reverse(words.begin(), words.end());
-
- // Join the reversed list back into a string with dots
- string result;
- for (size_t i = 0; i < words.size(); ++i) {
- if (i != 0) {
- result += '.';
- }
- result += words[i];
- }
-
- return result;
- }
- };
-
- //{ Driver Code Starts.
- int main() {
- int t;
- cin >> t;
- while (t--) {
- string s;
- cin >> s;
- Solution obj;
- cout << obj.reverseWords(s) << endl;
- }
- return 0;
- }
- // } Driver Code Ends
- ```
-
-
-
-
-## Example Walkthrough
-
-For the string `S = "i.like.this.program.very.much"`:
-
-1. Split the string by dots into `["i", "like", "this", "program", "very", "much"]`.
-2. Reverse the list to `["much", "very", "program", "this", "like", "i"]`.
-3. Join the reversed list with dots to get `"much.very.program.this.like.i"`.
-
-For the string `S = "pqr.mno"`:
-
-1. Split the string by dots into `["pqr", "mno"]`.
-2. Reverse the list to `["mno", "pqr"]`.
-3. Join the reversed list with dots to get `"mno.pqr"`.
-
-## Solution Logic:
-
-1. Split the string into words using the dot as a delimiter.
-2. Reverse the list of words.
-3. Join the reversed list back into a string with dots.
-
-## Time Complexity
-
-* The time complexity is $O(|S|)$, where |S| is the length of the input string.
-
-## Space Complexity
-
-* The auxiliary space complexity is $O(|S|)$ due to the storage required for the list of words.
-
-## References
-
-- **gfg Problem:** [gfg Problem](https://www.geeksforgeeks.org/problems/reverse-words-in-a-given-string5459/1?page=1&difficulty=Easy&sortBy=submissions)
-- **Solution Author:** [arunimad6yuq/](https://www.geeksforgeeks.org/user/arunimad6yuq/)
diff --git a/dsa-solutions/gfg-solutions/Easy problems/rotate-array.md b/dsa-solutions/gfg-solutions/Easy problems/rotate-array.md
deleted file mode 100644
index 89e256d34..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/rotate-array.md
+++ /dev/null
@@ -1,167 +0,0 @@
----
-id: rotate-array
-title: Rotate Array
-sidebar_label: 0021 - Rotate Array
-tags:
- - Easy
- - Arrays
- - Rotation
- - GeeksforGeeks
- - CPP
- - DSA
-description: "This tutorial covers the solution to the Rotate Array problem from the GeeksforGeeks website, featuring implementations in C++."
----
-## Problem Description
-
-Given an unsorted array `arr[]` of size `n`. Rotate the array to the left (counter-clockwise direction) by `d` steps, where `d` is a positive integer.
-
-## Examples
-
-**Example 1:**
-
-```
-Input:
-n = 5, d = 2
-arr = [1, 2, 3, 4, 5]
-Output: [3, 4, 5, 1, 2]
-Explanation: After rotating the array by 2 positions to the left, the array becomes [3, 4, 5, 1, 2].
-```
-
-**Example 2:**
-
-```
-Input:
-n = 7, d = 3
-arr = [2, 4, 6, 8, 10, 12, 14]
-Output: [8, 10, 12, 14, 2, 4, 6]
-Explanation: After rotating the array by 3 positions to the left, the array becomes [8, 10, 12, 14, 2, 4, 6].
-```
-
-## Your Task
-
-You don't need to read input or print anything. Your task is to complete the function `rotateArr()` which takes the array `arr`, integer `d` and integer `n`, and rotates the array by `d` elements to the left.
-
-Expected Time Complexity: $O(n)$
-
-Expected Auxiliary Space: $O(1)$
-
-## Constraints
-
-* `1 ≤ n ≤ 10^7`
-* `1 ≤ d ≤ n`
-* `0 ≤ arr[i] ≤ 10^5`
-
-## Problem Explanation
-
-The task is to rotate an array to the left by `d` elements. Rotating an array means shifting all elements to the left by a given number of positions, and the elements that fall off the start of the array reappear at the end.
-
-## Code Implementation
-
-### C++ Solution
-
-```cpp
-//{ Driver Code Starts
-#include
-using namespace std;
-
-// } Driver Code Ends
-class Solution{
- public:
- //Function to rotate an array by d elements in counter-clockwise direction.
- void rotateArr(int arr[], int d, int n){
- // Edge case: if d is 0 or d equals n, array remains unchanged
- if(d == 0 || d == n)
- return;
-
- // Normalize d if it's greater than n
- d = d % n;
-
- // Reverse the first d elements
- reverse(arr, arr + d);
-
- // Reverse the remaining n-d elements
- reverse(arr + d, arr + n);
-
- // Reverse the entire array
- reverse(arr, arr + n);
- }
-};
-
-//{ Driver Code Starts.
-
-int main() {
- int t;
- //taking testcases
- cin >> t;
-
- while(t--){
- int n, d;
-
- //input n and d
- cin >> n >> d;
-
- int arr[n];
-
- //inserting elements in the array
- for(int i = 0; i < n; i++){
- cin >> arr[i];
- }
- Solution ob;
- //calling rotateArr() function
- ob.rotateArr(arr, d, n);
-
- //printing the elements of the array
- for(int i =0; i < n; i++){
- cout << arr[i] << " ";
- }
- cout << endl;
- }
- return 0;
-}
-// } Driver Code Ends
-```
-
-## Example Walkthrough
-
-**Example 1:**
-
-For the input:
-```
-n = 5, d = 2
-arr = [1, 2, 3, 4, 5]
-```
-1. Rotate the first `d` elements: [2, 1, 3, 4, 5]
-2. Rotate the remaining `n-d` elements: [2, 1, 5, 4, 3]
-3. Rotate the entire array: [3, 4, 5, 1, 2]
-
-**Example 2:**
-
-For the input:
-```
-n = 7, d = 3
-arr = [2, 4, 6, 8, 10, 12, 14]
-```
-1. Rotate the first `d` elements: [6, 4, 2, 8, 10, 12, 14]
-2. Rotate the remaining `n-d` elements: [6, 4, 2, 14, 12, 10, 8]
-3. Rotate the entire array: [8, 10, 12, 14, 2, 4, 6]
-
-## Solution Logic:
-
-1. Use three reverse operations:
- - Reverse the first `d` elements.
- - Reverse the remaining `n-d` elements.
- - Reverse the entire array.
-2. This approach ensures that the elements are shifted in place with an $O(n)$ time complexity and $O(1)$ auxiliary space.
-
-## Time Complexity
-
-* The time complexity is $O(n)$ as the array is processed three times.
-
-## Space Complexity
-
-* The auxiliary space complexity is $O(1)$ as no additional storage is used.
-
-## References
-
-- **GeeksforGeeks Problem:** [Rotate Array](https://www.geeksforgeeks.org/problems/rotate-array-by-n-elements-1587115621/1?page=1&difficulty=Easy&sortBy=submissions)
-- **Solution Author:** [arunimad6yuq](https://www.geeksforgeeks.org/user/arunimad6yuq/)
diff --git a/dsa-solutions/gfg-solutions/Easy problems/second-largest.md b/dsa-solutions/gfg-solutions/Easy problems/second-largest.md
deleted file mode 100644
index e93f3b58d..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/second-largest.md
+++ /dev/null
@@ -1,218 +0,0 @@
----
-id: second-largest-element
-title: Second Largest Element
-sidebar_label: 0012 - Second Largest Distinct Element
-tags:
- - Easy
- - Array
- - DSA
-description: "This tutorial covers the solution to the Second Largest Distinct Element problem from the GeeksforGeeks."
----
-
-## Problem Description
-
-Given an array `arr` of size `n`, print the second largest distinct element from the array. If the second largest element doesn't exist, return `-1`.
-
-## Examples
-
-**Example 1:**
-
-```
-Input: arr = [10, 5, 10]
-Output: 5
-```
-
-**Example 2:**
-
-```
-Input: arr = [10, 10, 10]
-Output: -1
-```
-
-## Your Task
-
-You don't need to read input or print anything. Your task is to complete the function `print2largest()` which takes the array `arr` and its size `n` as input parameters and returns the second largest distinct element from the array. If no such element exists, return `-1`.
-
-Expected Time Complexity: $O(N)$, where N is the number of elements in the array.
-
-Expected Auxiliary Space: $O(1)$
-
-## Constraints
-
-- `1 ≤ n ≤ 10^5`
-- `1 ≤ arr[i] ≤ 10^5`
-
-## Problem Explanation
-
-To solve this problem, you need to find the second largest distinct element in the array. This can be achieved by keeping track of the largest and the second largest distinct elements while iterating through the array.
-
-## Code Implementation
-
-
-
-
-
-```python
-class Solution:
- def print2largest(self, arr, n):
- if n < 2:
- return -1
-
- first = second = -1
- for num in arr:
- if num > first:
- second = first
- first = num
- elif num > second and num != first:
- second = num
-
- return second
-
-# Example usage
-if __name__ == "__main__":
- solution = Solution()
- arr = [10, 5, 10]
- print(solution.print2largest(arr, len(arr))) # Expected output: 5
-```
-
-
-
-
-
-```cpp
-//{ Driver Code Starts
-#include
-using namespace std;
-
-// } Driver Code Ends
-class Solution {
-public:
- // Function returns the second largest element
- int print2largest(int arr[], int n) {
- int first = -1, second = -1;
- for (int i = 0; i < n; i++) {
- if (arr[i] > first) {
- second = first;
- first = arr[i];
- } else if (arr[i] > second && arr[i] != first) {
- second = arr[i];
- }
- }
- return second;
- }
-};
-
-//{ Driver Code Starts.
-
-int main() {
- int t;
- cin >> t;
- while (t--) {
- int n;
- cin >> n;
- int arr[n];
- for (int i = 0; i < n; i++) {
- cin >> arr[i];
- }
- Solution ob;
- auto ans = ob.print2largest(arr, n);
- cout << ans << "\n";
- }
- return 0;
-}
-
-// } Driver Code Ends
-```
-
-
-
-
-
-
-```javascript
-class Solution {
- print2largest(arr, n) {
- if (n < 2) return -1;
- let first = (second = -1);
- for (let num of arr) {
- if (num > first) {
- second = first;
- first = num;
- } else if (num > second && num != first) {
- second = num;
- }
- }
- return second;
- }
-}
-```
-
-
-
-
-
-
-```typescript
-class Solution {
-print2largest(arr: number[], n: number): number {
- if (n < 2) return -1;
- let first: number = second: number = -1;
- for (let num of arr) {
- if (num > first) {
- second = first;
- first = num;
- } else if (num > second && num != first) {
- second = num;
- }
- }
- return second;
-}
-}
-
-```
-
-
-
-
-
-
-```java
-public class Solution {
-public int print2largest(int[] arr, int n) {
- if (n < 2) return -1;
- int first = Integer.MIN_VALUE;
- int second = Integer.MIN_VALUE;
- for (int num : arr) {
- if (num > first) {
- second = first;
- first = num;
- } else if (num > second && num != first) {
- second = num;
- }
- }
- return second;
-}
-}
-public class Main {
-public static void main(String[] args) {
- Solution solution = new Solution();
- int[] arr = {10, 5, 10};
- System.out.println(solution.print2largest(arr, arr.length)); // Expected output: 5
-}
-}
-
-```
-
-
-
-
-## Solution Logic:
-
-1. Iterate through the array and keep track of the largest and the second largest distinct elements.
-2. Return the second largest distinct element or `-1` if it doesn't exist.
-
-## Time Complexity
-
-- The function visits each element once, so the time complexity is $O(n)$, where n is the length of the array. This is because we are iterating through the array once.
-
-- The space complexity of the solution is $O(1)$, which means the space required does not change with the size of the input array. This is because we are using a fixed amount of space to store the variables first, second, and num.
diff --git a/dsa-solutions/gfg-solutions/Easy problems/sorted-array-search.md b/dsa-solutions/gfg-solutions/Easy problems/sorted-array-search.md
deleted file mode 100644
index 93914e3fa..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/sorted-array-search.md
+++ /dev/null
@@ -1,152 +0,0 @@
----
-id: sorted-arrray-search
-title: Sorted Array Search
-sidebar_label: Sorted-Array-Search
-tags:
- - Searching
- - Binary Search
- - Algorithms
-description: "This tutorial covers the solution to the Sorted Array Search problem from the GeeksforGeeks website."
----
-## Problem Description
-Given an array `arr[]` sorted in ascending order of size `N` and an integer `K`. Check if `K` is present in the array or not.
-
-## Examples
-
-**Example 1:**
-
-```
-Input:
-N = 5, K = 6
-arr[] = {1,2,3,4,6}
-Output: 1
-Exlpanation: Since, 6 is present in
-the array at index 4 (0-based indexing),
-output is 1.
-```
-
-**Example 2:**
-
-```
-Input:
-N = 5, K = 2
-arr[] = {1,3,4,5,6}
-Output: -1
-Exlpanation: Since, 2 is not present
-in the array, output is -1.
-```
-
-## Your Task
-
-You don't need to read input or print anything. Complete the function searchInSorted() which takes the sorted array arr[], its size N and the element K as input parameters and returns 1 if K is present in the array, else it returns -1.
-
-
-
-Expected Time Complexity: O(Log N)
-
-Expected Auxiliary Space: O(1)
-
-## Constraints
-
-* `1 <= arr[i] <= 10^6`
-
-## Problem Explanation
-
-The task is to traverse the array and find the reuired element.
-
-## Code Implementation
-
-### C++ Solution
-
-```cpp
-class Solution{
- public:
- // Function to find element in sorted array
- // arr: input array
- // N: size of array
- // K: element to be searche
- int searchInSorted(int arr[], int N, int K)
- {
- int cnt = 0;
- for(int i=0; i
-
-
-```python
-class Solution:
- def floorSqrt(self, x: int) -> int:
- if x == 0 or x == 1:
- return x
- start, end = 1, x
- ans = 0
- while start <= end:
- mid = (start + end) // 2
- if mid * mid == x:
- return mid
- if mid * mid < x:
- start = mid + 1
- ans = mid
- else:
- end = mid - 1
- return ans
-```
-
-
-
-
-```java
-class Solution {
- long floorSqrt(long x) {
- if (x == 0 || x == 1) {
- return x;
- }
- long start = 1, end = x, ans = 0;
- while (start <= end) {
- long mid = (start + end) / 2;
- if (mid * mid == x) {
- return mid;
- }
- if (mid * mid < x) {
- start = mid + 1;
- ans = mid;
- } else {
- end = mid - 1;
- }
- }
- return ans;
- }
-}
-```
-
-
-
-
-```cpp
-class Solution {
-public:
- long long int floorSqrt(long long int x) {
- if (x == 0 || x == 1)
- return x;
- long long int start = 1, end = x, ans = 0;
- while (start <= end) {
- long long int mid = (start + end) / 2;
- if (mid * mid == x)
- return mid;
- if (mid * mid < x) {
- start = mid + 1;
- ans = mid;
- } else {
- end = mid - 1;
- }
- }
- return ans;
- }
-};
-```
-
-
-
-
-```javascript
-class Solution {
- floorSqrt(x) {
- if (x === 0 || x === 1) {
- return x;
- }
- let start = 1,
- end = x,
- ans = 0;
- while (start <= end) {
- let mid = Math.floor((start + end) / 2);
- if (mid * mid === x) {
- return mid;
- }
- if (mid * mid < x) {
- start = mid + 1;
- ans = mid;
- } else {
- end = mid - 1;
- }
- }
- return ans;
- }
-}
-```
-
-
-
-
-```typescript
-class Solution {
- floorSqrt(x: number): number {
- if (x === 0 || x === 1) {
- return x;
- }
- let start = 1,
- end = x,
- ans = 0;
- while (start <= end) {
- let mid = Math.floor((start + end) / 2);
- if (mid * mid === x) {
- return mid;
- }
- if (mid * mid < x) {
- start = mid + 1;
- ans = mid;
- } else {
- end = mid - 1;
- }
- }
- return ans;
- }
-}
-```
-
-
-
-
-## Complexity Analysis
-
-The provided solutions efficiently find the floor value of the square root of a given integer `x` using binary search. This approach ensures a time complexity of $ O(log N) and an auxiliary space complexity of $O(1)$. The algorithms are designed to handle large values of `x` up to 10^7 efficiently without relying on built-in square root functions.
-
-**Time Complexity:** $O(log N)$
-**Auxiliary Space:** $O(1)$
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Easy problems/transpost-of-matrix.md b/dsa-solutions/gfg-solutions/Easy problems/transpost-of-matrix.md
deleted file mode 100644
index 4ce120b96..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/transpost-of-matrix.md
+++ /dev/null
@@ -1,124 +0,0 @@
----
-id: transpose-of-matrix
-title: Transpose Of Matrix
-sidebar_label: Transpose-Of-Matrix
-tags:
- - Matrix
- - Data Structure
-description: "This tutorial covers the solution to the Transpose of Matrix problem from the GeeksforGeeks."
----
-## Problem Description
-
-Write a program to find the transpose of a square matrix of size `N*N`. Transpose of a matrix is obtained by changing rows to columns and columns to rows.
-
-## Examples
-
-**Example 1:**
-
-```
-Input:
-N = 4
-mat[][] = {{1, 1, 1, 1},
- {2, 2, 2, 2}
- {3, 3, 3, 3}
- {4, 4, 4, 4}}
-Output:
-{{1, 2, 3, 4},
- {1, 2, 3, 4}
- {1, 2, 3, 4}
- {1, 2, 3, 4}}
-```
-
-**Example 2:**
-
-```
-Input:
-N = 2
-mat[][] = {{1, 2},
- {-9, -2}}
-Output:
-{{1, -9},
- {2, -2}}
-```
-
-## Your Task
-You dont need to read input or print anything. Complete the function transpose() which takes matrix[][] and N as input parameter and finds the transpose of the input matrix. You need to do this in-place. That is you need to update the original matrix with the transpose.
-
-
-## Constraints
-
-* `-10^9 <= mat[i][j] <= 10^9`
-
-## Problem Explanation
-
-The task is to traverse the matrix and transpose it.
-
-## Code Implementation
-
-### C++ Solution
-
-```cpp
-
-#include
-#include
-
-std::vector> transposeMatrix(const std::vector>& matrix) {
- int rows = matrix.size();
- int cols = matrix[0].size();
- std::vector> transpose(cols, std::vector(rows));
- for (int i = 0; i < rows; ++i) {
- for (int j = 0; j < cols; ++j) {
- transpose[j][i] = matrix[i][j];
- }
- }
- return transpose;
-}
-```
-
-```java
-public static int[][] transposeMatrix(int[][] matrix) {
- int rows = matrix.length;
- int cols = matrix[0].length;
- int[][] transpose = new int[cols][rows];
- for (int i = 0; i < rows; ++i) {
- for (int j = 0; j < cols; ++j) {
- transpose[j][i] = matrix[i][j];
- }
- }
- return transpose;
-}
-
-
-```
-
-```python
-
-def transpose_matrix(matrix):
- return list(zip(*matrix))
-
-```
-
-```javascript
-function transposeMatrix(matrix) {
- return matrix[0].map((_, colIndex) => matrix.map(row => row[colIndex]));
-}
-
-```
-
-## Solution Logic:
-
-1. Create an empty matrix (2D array) to store the transposed matrix.
-2. Iterate through the original matrix:
- - For each element in the original matrix, swap its row and column indices to get the corresponding element in the transposed matrix.
- - Assign the value of the original element to the transposed element.
-3. Return the transposed matrix.
-
-
-## Time Complexity
-
-* The time complexity is $O(n*m)$ as where n is the number of rows in the matrix and m is the number of columns. This is because the solution iterates through each element in the matrix once.
-
-
-## Space Complexity
-
-* The space complexity of the solution is O(n*m), where n is the number of rows in the matrix and m is the number of columns. This is because the solution creates a new matrix to store the transposed matrix, which has the same size as the original matrix.
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Easy problems/wave-array.md b/dsa-solutions/gfg-solutions/Easy problems/wave-array.md
deleted file mode 100644
index 5e4d44ab7..000000000
--- a/dsa-solutions/gfg-solutions/Easy problems/wave-array.md
+++ /dev/null
@@ -1,138 +0,0 @@
----
-id: wave-array
-title: Wave Array
-sidebar_label: 0023 - Wave Array
-tags:
- - Easy
- - Array
- - GeeksforGeeks
- - CPP
- - DSA
-description: "This tutorial covers the solution to the Wave Array problem from the GeeksforGeeks website, featuring implementations in C++."
----
-## Problem Description
-
-Given a sorted array arr[] of distinct integers, sort the array into a wave-like array in place. In other words, arrange the elements into a sequence such that `arr[1] >= arr[2] <= arr[3] >= arr[4] <= arr[5].....`
-If there are multiple solutions, find the lexicographically smallest one.
-
-Note: The given array is sorted in ascending order, and you don't need to return anything to change the original array.
-
-## Examples
-
-**Example 1:**
-
-```
-Input:
-arr[] = {1, 2, 3, 4, 5}
-
-Output:
-2 1 4 3 5
-```
-
-**Example 2:**
-
-```
-Input:
-arr[] = {2, 4, 7, 8, 9, 10}
-
-Output:
-4 2 8 7 10 9
-```
-
-## Your Task
-
-You don't need to read input or print anything. Your task is to complete the function `convertToWave()` which takes the array and its size as parameters and modifies the array into a wave-like array.
-
-Expected Time Complexity: O(n)
-
-Expected Auxiliary Space: O(1)
-
-## Constraints
-
-* `1 ≤ n ≤ 10^6`
-* `0 ≤ arr[i] ≤ 10^6`
-
-## Problem Explanation
-
-To convert the array into a wave-like array, we can follow these steps:
-
-1. Iterate over the array with a step of 2.
-2. Swap every adjacent pair of elements.
-
-## Code Implementation
-
-### C++ Solution
-
-```cpp
-//{ Driver Code Starts
-#include
-using namespace std;
-
-// } Driver Code Ends
-class Solution{
- public:
- // arr: input array
- // n: size of array
- // Function to sort the array into a wave-like array.
- void convertToWave(int n, vector& arr){
- for (int i = 0; i < n - 1; i += 2) {
- swap(arr[i], arr[i + 1]);
- }
- }
-};
-
-//{ Driver Code Starts.
-
-int main() {
- int t, n;
- cin >> t; // Input testcases
- while (t--) // While testcases exist
- {
- cin >> n; // Input size of array
- vector a(n); // Declare vector of size n
- for (int i = 0; i < n; i++)
- cin >> a[i]; // Input elements of array
-
- Solution ob;
- ob.convertToWave(n, a);
-
- for (int i = 0; i < n; i++)
- cout << a[i] << " "; // Print array
-
- cout << endl;
- }
-}
-// } Driver Code Ends
-```
-
-## Example Walkthrough
-
-**Example 1:**
-
-For the input:
-```
-arr[] = {1, 2, 3, 4, 5}
-```
-1. Start with the first pair (1, 2) and swap them to get {2, 1, 3, 4, 5}.
-2. Move to the next pair (3, 4) and swap them to get {2, 1, 4, 3, 5}.
-3. There are no more pairs to process.
-
-The result is [2, 1, 4, 3, 5].
-
-## Solution Logic:
-
-1. Iterate through the array with a step of 2.
-2. For each pair of adjacent elements, swap them.
-
-## Time Complexity
-
-* The time complexity is $O(n)$ where $n$ is the number of elements in the array, as we only iterate through the array once.
-
-## Space Complexity
-
-* The auxiliary space complexity is $O(1)$ as we are modifying the array in place.
-
-## References
-
-- **GeeksforGeeks Problem:** [Wave Array](https://www.geeksforgeeks.org/problems/wave-array-1587115621/1?page=2&difficulty=Easy&sortBy=submissions)
-- **Solution Author:** [arunimad6yuq](https://www.geeksforgeeks.org/user/arunimad6yuq/)
diff --git a/dsa-solutions/gfg-solutions/Hard/0101-0200/0102-Minimum-BST-Sum-Subtree.md b/dsa-solutions/gfg-solutions/Hard/0101-0200/0102-Minimum-BST-Sum-Subtree.md
deleted file mode 100644
index 703674b26..000000000
--- a/dsa-solutions/gfg-solutions/Hard/0101-0200/0102-Minimum-BST-Sum-Subtree.md
+++ /dev/null
@@ -1,211 +0,0 @@
----
-id: minimum-bst-sum-subtree
-title: Minimum-BST-Sum-Subtree (Geeks for Geeks)
-sidebar_label: Minimum BST Sum Subtree
-tags:
- - Intermediate
- - Geeks for Geeks
- - CPP
- - Python
- - DSA
-description: "This is a solution to the Minimum BST Sum Subtree problem on Geeks for Geeks."
----
-## Problem Description
-Every house in the colony has at most one pipe going into it and at most one pipe going out of it. Tanks and taps are to be installed in a manner such that every house with one outgoing pipe but no incoming pipe gets a tank installed on its roof and every house with only an incoming pipe and no outgoing pipe gets a tap.
-Given two integers n and p denoting the number of houses and the number of pipes. The connections of pipe among the houses contain three input values: a_i, b_i, d_i denoting the pipe of diameter d_i from house a_i to house b_i, find out the efficient solution for the network.
-The output will contain the number of pairs of tanks and taps t installed in first line and the next t lines contain three integers: house number of tank, house number of tap and the minimum diameter of pipe between them.
-
-## Examples
-**Example 1:**
-**Input:**
-```
- 5
- / \
- 4 6
- / \
- 3 7
- /
- 1
-```
-**Output:** 1
-**Example 2:**
-**Input:**
-```
- 9
- \
- 10
- \
- 11
-```
-**Output:** 9
-## Your Task
-The task is to complete the function minValue() which takes root as the argument and returns the minimum element of BST. If the tree is empty, there is no minimum element, so return -1 in that case.
-Expected Time Complexity: $O(Height of the BST)$
-Expected Auxiliary Space: $O(1)$.
-## Constraints
-- `0 <= n <= 10^4`
-
-
-## Your Task
-The task is to complete the function minValue() which takes root as the argument and returns the minimum element of BST. If the tree is empty, there is no minimum element, so return -1 in that case.
-
-Expected Time Complexity: $O(Height of the BST)$
-Expected Auxiliary Space: $O(1)$.
-
-## Constraints
-
-- `0 <= n <= 10^4`
-
-## Problem Explanation
-
-The "Smallest Subtree with all the Deepest Nodes" is a problem where given a binary tree, you need to find the smallest subtree that contains all the deepest nodes. Let's break down the problem step-by-step:
-
-**Problem Statement**
-You are given a binary tree.
-Your task is to find the smallest subtree that contains all the deepest nodes in the original tree.
-**Key Points**
-Deepest Nodes: Nodes that are at the maximum depth from the root of the tree.
-Smallest Subtree: Among all subtrees containing these deepest nodes, the one with the smallest number of nodes.
-
-### Code Implementation
-
-
-
- ```python
-class Solution:
- def lca(self, root, p, q):
- if root in (None, p, q): return root
- l = self.lca(root.left, p, q)
- r = self.lca(root.right, p, q)
- return root if l and r else l or r
- def subtreeWithAllDeepest(self, root: TreeNode) -> TreeNode:
- a = []
- def dfs(node, h):
- if not node:
- return
- if len(a) == h:
- a.append([])
- a[h].append(node)
- dfs(node.left, h+1)
- dfs(node.right, h+1)
- dfs(root, 0)
- p, q = a[-1][0], a[-1][-1]
- return self.lca(root, p, q)
- ```
-
-
-
- ```cpp
-class Solution {
-public:
- TreeNode* subtreeWithAllDeepest(TreeNode* root) {
- vector temp;
- vector> level;
- unordered_map hash;
- queue> q;
- q.push({root,NULL});
- q.push({NULL,NULL});
- hash[root] = NULL;
- while (!q.empty())
- {
- auto [node,parent] = q.front();q.pop();
- if (node == NULL)
- {
- level.push_back(temp);
- temp.clear();
- if (q.size()>0)
- {
- q.push({NULL,NULL});
- }
- }
- else
- {
- temp.push_back(node);
- hash[node] = parent;
- if (node->left)
- {
- q.push({node->left,node});
- }
- if (node->right)
- {
- q.push({node->right,node});
- }
- }
- }
- temp = level.back();
- queue qe;
- unordered_map vis;
- for (auto leaves : temp)
- {
- vis[leaves] = 1;
- qe.push(leaves);
- }
- while (!qe.empty())
- {
- int sz = qe.size();
- if (sz == 1)
- {
- return qe.front();
- }
- while (sz--)
- {
- auto node = qe.front();qe.pop();
-
- while (sz--)
- {
- auto node = qe.front();qe.pop();
- auto parent = hash[node];
- if (vis.find(parent) == vis.end())
- {
- vis[parent] = 1;
- qe.push(parent);
- }
- }
- }
- return NULL;
- }
-};
- ```
-
-
-
-
-## Solution Logic
-**DFS to Collect Nodes by Depth:**
-- You initialize an empty list a to store nodes at each depth.
-- The dfs function is called with the root node and depth 0.
-- For each node, if the current depth h matches the length of a, it means you have reached a new depth level, so you append an empty list to a.
-- The node is then added to the appropriate sublist corresponding to its depth.
-- The function is recursively called for left and right children, incrementing the depth by 1 for each recursive call.
-**Finding the LCA:**
-- After collecting all nodes, p and q are set to the first and last nodes in the deepest level sublist (a[-1]).
-- The lca function is a recursive function that finds the lowest common ancestor of p and q.
-- If the current node root is None, p, or q, it returns root.
-- Otherwise, it recursively calls lca on the left and right children.
-- If both recursive calls return non-None values, it means p and q are found in different subtrees, and thus the current node root is their LCA.
-- If only one side returns a non-None value, it means both p and q are in the same subtree, so the LCA is in that subtree.
-## Time Complexity
-$O(Height of the BST)$
-## Space Complexity
-Expected Auxiliary Space: $O(1)$.
-## Resources
-- **GFG Problem:** [GFG Problem](https://www.geeksforgeeks.org/find-the-minimum-element-in-a-binary-search-tree/)
-- **LeetCode Problem:** [LeetCode Problem](https://leetcode.com/problems/smallest-subtree-with-all-the-deepest-nodes/)
-- **Author's Geeks for Geeks Profile:** | [DaminiChachane](https://leetcode.com/u/divcxl15/) |
-This format ensures that all necessary details about the problem and its solution are clearly presented and easy to follow.
-
-## Time Complexity
-$O(Height of the BST)$
-
-## Space Complexity
-
-Expected Auxiliary Space: $O(1)$.
-
-## Resources
-
-- **GFG Problem:** [GFG Problem](https://www.geeksforgeeks.org/find-the-minimum-element-in-a-binary-search-tree/)
-- **LeetCode Problem:** [LeetCode Problem](https://leetcode.com/problems/smallest-subtree-with-all-the-deepest-nodes/)
-- **Author's Geeks for Geeks Profile:** | [DaminiChachane](https://leetcode.com/u/divcxl15/) |
-
-This format ensures that all necessary details about the problem and its solution are clearly presented and easy to follow.
-
diff --git a/dsa-solutions/gfg-solutions/Hard/0101-0200/0105-Scrambled-String.md b/dsa-solutions/gfg-solutions/Hard/0101-0200/0105-Scrambled-String.md
deleted file mode 100644
index 95d7402d9..000000000
--- a/dsa-solutions/gfg-solutions/Hard/0101-0200/0105-Scrambled-String.md
+++ /dev/null
@@ -1,275 +0,0 @@
----
-id: Scrambled-String
-title: Scrambled-String (Geeks for Geeks)
-sidebar_label: Scrambled-String
-tags:
- - Intermediate
- - Geeks for Geeks
- - CPP
- - Python
- - DSA
-description: "This is a solution to the Scrambled-String problem on Geeks for Geeks."
----
-
-## Problem Description
-
-Given two strings S1 and S2 of equal length, the task is to determine if S2 is a scrambled form of S1.
-
-Scrambled string: Given string str, we can represent it as a binary tree by partitioning it into two non-empty substrings recursively.
-Below is one possible representation of str = coder:
-
-To scramble the string, we may choose any non-leaf node and swap its two children.
-Suppose, we choose the node co and swap its two children, it produces a scrambled string ocder.
-Similarly, if we continue to swap the children of nodes der and er, it produces a scrambled string ocred.
-
-Note: Scrambled string is not the same as an Anagram.
-Print "Yes" if S2 is a scrambled form of S1 otherwise print "No".
-
-
-## Examples
-
-**Example:**
-
-Consider the following graph:
-
-```
- ocder
- / \
- oc der
- / \
- o c
-```
-**Input:** S1="coder", S2="ocder"
-**Explanation:** ocder is a scrambled
-form of coder.
-**Output:** Yes
-
-## Your Task
-
-You don't need to read input or print anything. You only need to complete the function isScramble() which takes two strings S1 and S2 as input and returns a boolean value.
-
-Expected Time Complexity: $O(N2)$.
-Expected Auxiliary Space: $O(N2)$.
-
-## Constraints
-
-- S1.length = S2.length
-- `S1.length<=31`
-- S1 and S2 consist of lower-case English letters.
-
-## Problem Explanation
-
-Here's the step-by-step breakdown of the Scrambled String process:
-
-**Step 1 :** A scrambled string is defined based on recursive partitioning and swapping of substrings. Here’s a more detailed explanation:
-
-**Step 2 :** Binary Tree Representation:Given a string str, you can represent it as a binary tree by recursively partitioning it into two non-empty substrings.
-**Step 3 :** For example, for the string "coder": You can split it into "co" and "der".
-Each of these can be further split recursively, forming a binary tree structure.
-**Step 4 :**Scrambling: A string S2 is a scrambled form of string S1 if S2 can be obtained by swapping the left and right children of some non-leaf nodes in the binary tree representation of S1.
-For instance, "coder" can be scrambled to "ocder" by swapping "co" and "der", then further scrambling "co" to "oc".
-
-### Code Implementation
-
-
-
-
- ```python
-class Solution(object):
- def isScramble(self, s1, s2):
- """
- :type s1: str
- :type s2: str
- :rtype: bool
- """
- # Base cases
-
- n = len(s1)
-
- # If both strings are not equal in size
- if len(s2) != n:
- return False
-
- # If both strings are equal
- if s1 == s2:
- return True
-
- # If code is reached to this condition then following this are sure:
- # 1. size of both string is equal
- # 2. string are not equal
- # so size is equal (where size==1) and they are not equal then obviously false
- # example 'a' and 'b' size is equal, string are not equal
- if n == 1:
- return False
-
- key = s1 + " " + s2
-
- # Check if this problem has already been solved
- if key in self.mp:
- return self.mp[key]
-
- # For every iteration it can two condition
- # 1. We should proceed without swapping
- # 2. We should swap before looking next
- for i in range(1, n):
- # ex of without swap: gr|eat and rg|eat
- without_swap = (
- # Left part of first and second string
- self.isScramble(s1[:i], s2[:i])
- and
- # Right part of first and second string;
- self.isScramble(s1[i:], s2[i:])
- )
-
- # If without swap gives us the right answer then we do not need
- # to call the recursion with swap
- if without_swap:
- return True
-
- # ex of with swap: gr|eat rge|at
- # here we compare "gr" with "at" and "eat" with "rge"
- with_swap = (
- # Left part of first and right part of second
- self.isScramble(s1[:i], s2[n-i:])
- and
- # Right part of first and left part of second
- self.isScramble(s1[i:], s2[:n-i])
- )
-
- # If with swap gives us the right answer then we return True
- # otherwise, the for loop does its work
- if with_swap:
- return True
-
- self.mp[key] = False
- return False
-
- # for storing already solved problems
- mp = {}
- ```
-
-
-
-
- ```cpp
-class Solution {
-public:
-//for storing already solved problems
- unordered_map mp;
-
-
- bool isScramble(string s1, string s2) {
- //base cases
-
- int n = s1.size();
-
- //if both string are not equal in size
- if(s2.size()!=n)
- return false;
-
- //if both string are equal
- if(s1==s2)
- return true;
-
-
-
- //if code is reached to this condition then following this are sure:
- //1. size of both string is equal
- //2. string are not equal
- //so size is equal (where size==1) and they are not equal then obviously false
- //example 'a' and 'b' size is equal ,string are not equal
- if(n==1)
- return false;
-
- string key = s1+" "+s2;
-
- //check if this problem has already been solved
- if(mp.find(key)!=mp.end())
- return mp[key];
-
- //for every iteration it can two condition
- //1.we should proceed without swapping
- //2.we should swap before looking next
- for(int i=1;i
-
-
-## Solution Logic
-
-**1.Base Cases:**If the lengths of the two strings are not equal, they cannot be scrambled forms of each other, so return false.
-If the two strings are identical, they are trivially scrambled forms of each other, so return true.
-If the length of the string is 1 and the strings are not equal, return false.
-**2.Memoization:** Use a map mp to store already solved subproblems to avoid redundant computations.
-The key for the map is a combination of the two strings, represented as s1 + " " + s2.
-**3.Recursive Check:** Iterate over possible split points of the strings.
-For each split point, there are two cases to consider:
-1.Without swapping:
-Compare the left part of s1 with the left part of s2 and the right part of s1 with the right part of s2.
-2.With swapping:
-Compare the left part of s1 with the right part of s2 and the right part of s1 with the left part of s2.
-**4.Return Result:** If either of the conditions (with or without swapping) is satisfied, return true.
-If none of the conditions are satisfied after checking all possible split points, store the result as false in the memoization map and return false.1.
-
-## Time Complexity
-
- $O(N2)$.
-
-## Space Complexity
-
- $O(N2)$.
-
-## Resources
-
-- **GFG Problem:** [GFG Problem](https://www.geeksforgeeks.org/problems/scrambled-string/1)
-- **LeetCode Problem:** [LeetCode Problem](https://leetcode.com/problems/scramble-string/description/)
-- **Author's Geeks for Geeks Profile:** | [DaminiChachane](https://leetcode.com/u/divcxl15/) |
-
-This format ensures that all necessary details about the problem and its solution are clearly presented and easy to follow.
diff --git a/dsa-solutions/gfg-solutions/Hard/0101-0200/0106-Travelling-Salesperson-Problem.md b/dsa-solutions/gfg-solutions/Hard/0101-0200/0106-Travelling-Salesperson-Problem.md
deleted file mode 100644
index 3eba2d8fd..000000000
--- a/dsa-solutions/gfg-solutions/Hard/0101-0200/0106-Travelling-Salesperson-Problem.md
+++ /dev/null
@@ -1,190 +0,0 @@
----
-id: travelling-salesperson-problem
-title: Travelling-Salesperson-Problem (Geeks for Geeks)
-sidebar_label: Travelling Salesperson Problem
-tags:
- - Intermediate
- - Geeks for Geeks
- - CPP
- - Python
- - DSA
-description: "This is a solution to the Travelling-Salesperson-Problem on Geeks for Geeks."
----
-
-## Problem Description
-
-Given an array of strings words, return the smallest string that contains each string in words as a substring. If there are multiple valid strings of the smallest length, return any of them.
-You may assume that no string in words is a substring of another string in words.
-Given a matrix cost of size n where cost[i][j] denotes the cost of moving from city i to city j. Your task is to complete a tour from city 0 (0-based index) to all other cities such that you visit each city exactly once and then at the end come back to city 0 at minimum cost.
-
-## Examples
-
-**Example:**
-
-Consider the following graph:
-
-**Input:** `cost = {{0,111},{112,0}}`
-**Output:** 223
-**Explanation:** We can visit `0->1->0` and
-
-```
-Input: `cost = {{0,111},{112,0}}`
-Output: 223
-Explanation: We can visit 0->1->0 and
-cost = 111 + 112.
-```
-
-## Your Task
-
-You don't need to read or print anything. Your task is to complete the function total_cost() which takes cost as the input parameter and returns the total cost to visit each city exactly once starting from city 0 and again coming back to city 0.
-Expected Time Complexity: $O(2n * n2)$.
-Expected Auxiliary Space: $O(2n * n)$.
-
-## Constraints
-- $1 \leq n \leq 20$
-- $1 \leq \text{cost[i][j]} \leq (103)$
-
-## Problem Explanation
-
-Here's the step-by-step breakdown of the Travelling Salesperson process:
-
-**Step 1 :** Given a list of cities and the distances between each pair of cities, the task is to find the shortest possible route that visits each city exactly once and returns to the origin city.
-
-**Step 2 :** Key Characteristics:
-Input: A set of n cities. A distance matrix D where D[i][j] represents the distance between city i and city j.
-Output: The shortest possible route (a permutation of the cities) that starts and ends at the same city and visits each city exactly once.
-
-### Code Implementation
-
-
-
-
- ```python
- class Solution:
- def shortestSuperstring(self, words: List[str]) -> str:
- def getMinSuffix(w1, w2):
- n = min(len(w1), len(w2))
- for i in range(n, 0, -1):
- if w1[-i:] == w2[:i]:
- return w2[i:]
- return w2
- n = len(words)
- suffix = defaultdict(dict)
- for i in range(n):
- for j in range(n):
- suffix[i][j] = getMinSuffix(words[i], words[j])
- dp = [['']*n for _ in range(1<
-
-
- ```cpp
- class Solution {
- public:
- string shortestSuperstring(vector& A) {
- int dp[4096][12] = {0};
- int failure[12][20] = {0};
- int cost[12][12] = {0};
- int trace_table[4096][12] = {0};
- const int sz = A.size();
- const int dp_sz = 1 << sz;
-
- for (int i = 0; i < sz; i++) {
- const int str_sz = A[i].size();
-
- failure[i][0] = -1;
-
- for (int j = 1, k = -1; j < str_sz; j++) {
- while (k >= 0 && A[i][k + 1] != A[i][j])
- k = failure[i][k];
-
- if (A[i][k + 1] == A[i][j]) k++;
-
- failure[i][j] = k;
- }
- }
- for (int i = 0; i < sz; i++) {
- const int i_sz = A[i].size();
-
- for (int j = 0; j < sz; j++) {
- if (i != j) {
- const int j_sz = A[j].size();
- int h = -1;
-
- for (int k = 0; k < j_sz; k++) {
- while (h >= 0 && A[i][h + 1] != A[j][k])
- h = failure[i][h];
-
- if (A[i][h + 1] == A[j][k])
- h++;
- }
- cost[j][i] = i_sz - h - 1;
- }
- }
- }
- for (int i = 0; i < sz; i++)
- dp[1 << i][i] = A[i].size();
-
- for (int state = 1; state < dp_sz; state++) {
- for (int t1 = state, b1 = t1 & (-t1); t1 ; t1 ^= b1 , b1 = t1 & (-t1)) {
- const int state1 = state ^ b1;
- const int i = __builtin_ctz(b1);
- const int i_sz = A[i].size();
-
- for (int t2 = state1, b2 = t2 & (-t2); t2; t2 ^= b2, b2 = t2 & (-t2)) {
- const int j = __builtin_ctz(b2);
- const int tmp = dp[state1][j] + cost[j][i];
-
- if (!dp[state][i] || tmp < dp[state][i]) {
- dp[state][i] = tmp;
- trace_table[state][i] = j;
- }
- }
- }
- }
- const auto& last = dp[dp_sz - 1];
- string res;
- int i = std::distance(last, std::min_element(last, last + sz));
-
- for (int state = dp_sz - 1, j = trace_table[state][i]; state & (state - 1); state ^= (1 << i), i = j, j = trace_table[state][i])
- res = A[i].substr(A[i].size() - cost[j][i]) + res;
-
- return A[i] + res;
- }
- };
- ```
-
-
-
-
-## Solution Logic
-
-**1.Helper Function:** getMinSuffix(w1, w2): This function calculates the minimum suffix of w2 that can be appended to w1 to create the shortest possible concatenation of w1 and w2 while overlapping the end of w1 with the start of w2. It checks from the longest possible overlap down to the shortest and returns the suffix of w2 that doesn't overlap.
-**2.Suffix Dictionary:** suffix is a nested dictionary where suffix[i][j] stores the minimum suffix of words[j] that can be appended to words[i]. This pre-computation helps in efficiently constructing the superstring later.
-**3.Dynamic Programming (DP) Array:** dp is a 2D list where dp[mask][i] represents the shortest superstring that can be formed using the set of words represented by mask, ending with the i-th word. mask is a bitmask representing the set of words included in the current superstring. For example, if n = 3 and mask = 5 (binary 101), it indicates that the 0th and 2nd words are included in the current set.
-**4.DP Initialization and Iteration:** The outer loop iterates over all possible bitmasks from 1 to $2^n - 1$. For each bitmask, the inner loop iterates over all possible ending words j.For each ending word j, the algorithm finds the best possible previous word j2 in the current set (excluding j) and constructs the superstring by appending the precomputed suffix.
-**5.Result Extraction:** After filling the DP table, the algorithm finds the shortest superstring from `dp[(1 << n) - 1][i]` for all i from 0 to n-1. The bitmask `(1 << n) - 1` represents the set containing all words.
-**5.Result Extraction:** After filling the DP table, the algorithm finds the shortest superstring from `dp[(1 << n) - 1][i]` for all i from 0 to n-1. The bitmask `(1 << n) - 1` represents the set containing all words.
-
-## Time Complexity
-
-$O(2n * n2)$.
-
-## Space Complexity
-
-$O(2n * n)$.
-
-## Resources
-
-- **GFG Problem:** [GFG Problem](https://www.geeksforgeeks.org/traveling-salesman-problem-tsp-implementation/)
-- **LeetCode Problem:** [LeetCode Problem](https://leetcode.com/problems/shortest-path-visiting-all-nodes/)
-- **Author's Geeks for Geeks Profile:** | [DaminiChachane](https://leetcode.com/u/divcxl15/) |
-This format ensures that all necessary details about the problem and its solution are clearly presented and easy to follow.
-Footer
diff --git a/dsa-solutions/gfg-solutions/Hard/0101-0200/0110-Median-of-the-Subarrays.md b/dsa-solutions/gfg-solutions/Hard/0101-0200/0110-Median-of-the-Subarrays.md
deleted file mode 100644
index a21569100..000000000
--- a/dsa-solutions/gfg-solutions/Hard/0101-0200/0110-Median-of-the-Subarrays.md
+++ /dev/null
@@ -1,209 +0,0 @@
----
-id: median-of-the-subarrays
-title: Median of the Subarrays
-difficulty: Hard
-sidebar_label: 0110-Median of the Subarrays
-tags:
- - Array
- - Backtracking
- - DSA
- - Python
- - C++
----
-
-## Problem Description
-
-Steps to solve a problem Median of the Subarrays .
-
-You are given an array nums of size n consisting of distinct integers from 1 to n and a positive integer k.
-
-Return the number of non-empty subarrays in nums that have a median equal to k.
-
-Note:
-
-The median of an array is the middle element after sorting the array in ascending order. If the array is of even length, the median is the left middle element.
-For example, the median of [2,3,1,4] is 2, and the median of [8,4,3,5,1] is 4.
-A subarray is a contiguous part of an array.
-
-
-
-### Examples
-
-#### Example 1:
-
-**Input:** `N = 5, M = 2 ,A[] = {2, 1, 3, 5, 4}`
-**Output: ** 3
-**Explanation: ** The subarrays which has median equal to M
-are [2], [2,1,3] and [2,1,3,5]
-#### Example 2:
-Input:
-N = 1, M = 1
-A[] = {1}
-Output:
-1
-Explanation:
-The subarrays which has median equal to M
-is [1].
-
-
-
-### Constraints
-
-- `1 ≤ N ≤ 105`
-- `1 ≤ A[] ≤ 105`
-- `1 ≤ M ≤ N`
-### Approach
-
-**Step 1 :Convert Array Values:**
-
-The first step is to find the index of the value k in the array nums.
-- Convert each element in nums such that:
- - If `nums[i] < k`, set `nums[i] = -1`.
- - If `nums[i] > k`, set `nums[i] = 1`.
- - If `nums[i] == k`, set `nums[i] = 0` and store this index in idxK.
-**Step 2 : Compute Prefix Sum:**
-- Create a prefixSum array where each element at index i is the sum of the first i elements of the modified nums array.
-- This helps in quickly calculating the sum of any subarray.
-**Step 3 : Helper Function:**
-- A helper function is used to calculate the number of subarrays in a given range [l, r] where the subarray sum is either 0 or 1.
-- This is done using a hashmap to count the frequency of each prefix sum encountered so far.
-**Step 4 : Calculate Result:**
-- Use the helper function to calculate:
- -left: Subarrays in the range [0, idxK-1].
- -right: Subarrays in the range [idxK+1, nums.length-1].
- -total: Subarrays in the range [0, nums.length-1].
-- The result is obtained by subtracting left and right from total to get the count of subarrays that include the element k and have the median equal to k.
-
-### Solution Code
-
-#### Java
-
-```
-class Solution {
- public int countSubarrays(int[] nums, int k) {
- // 1. find index of k, and convert array into -1, 0, 1
- int idxK = -1;
- for (int i = 0; i < nums.length; i++) {
- if (nums[i] < k) nums[i] = -1;
- else if (nums[i] > k) nums[i] = 1;
- else {
- idxK = i;
- nums[i] = 0;
- }
- }
- // 2. calculate the prefix Sum
- int[] prefixSum = new int[nums.length + 1];
-
- for (int i = 1; i < prefixSum.length; i++) prefixSum[i] = prefixSum[i - 1] + nums[i - 1];
-
- // 3. calculate three range: total [0, n - 1] - left[0, idxK - 1] - right[idxK + 1];
- int left = helper(0, idxK, prefixSum);
- int right = helper(idxK + 1, nums.length, prefixSum);
- int total = helper( 0, nums.length, prefixSum);
-
- return total - left - right;
- }
-
- // calculate current interval, subarray sum = 0 and 1;
- private int helper(int l, int r, int[] prefixSum) {
- Map counter = new HashMap<>();
-
- int ans = 0;
- for (int i = l; i <= r; i++) {
- int currSum = prefixSum[i];
-
- if (counter.containsKey(currSum)) {
- ans += counter.get(currSum);
- }
-
- if (counter.containsKey(currSum - 1)) {
- ans += counter.get(currSum - 1);
- }
-
- counter.put(currSum, counter.getOrDefault(currSum, 0) + 1);
- }
-
- return ans;
- }
-}
-
-```
-
-#### C++
-
-```
- class Solution {
-public:
- int countSubarrays(vector& nums, int k) {
- //valid subarrays will be starting from 0 to i where i being the index of k and ending at i to n
- //suppose i foudn a valid subarray between s and e
- //numbers greater than k between s to i be g1
- //number smaller than k be s1
- //from i to end
- //number greater than k be g2 and less than be s2
- // from given we know (g1+g2)-(s1+s2)=0 0r 1
- //----> (g1-s1)+(g2-s2)==0 o1 1
- //in first for loop we are calucalting g2-s2 at every index
-
- int n=nums.size();
- int ind=-1;
- for(int i=0;imap;
- int diff=0;
- map[0]++;
- for(int i=ind+1;ik)
- {
- diff++;
- }
-
- else if(nums[i]=0;i--)
- {
- if(nums[i]>k)
- {
- diff++;
- }
- else if(nums[i]left);
- if( prev!=NULL && root->val < prev->val){
- if(first==NULL){
- first = prev;
- middle = root;
- }
- else last = root;
- }
- prev = root;
- inorder(root-> right);
- }
-public:
-
- void recoverTree(TreeNode* root) {
- first = middle = last = NULL;
- prev = new TreeNode(INT_MIN);
- inorder(root);
- if( first && last){
- swap(first -> val, last->val);
- }
-
- else if( first && middle ){
- swap(first->val, middle-> val);
- }
-
- }
-};
-
-```
-## Your Task
-
-You don't need to take any input. Just complete the function correctBst() that takes root node as parameter. The function should return the root of corrected BST. BST will then be checked by driver code and 0 or 1 will be printed.
-N = number of nodes
-Expected Time Complexity: $O(N)$
-Expected Auxiliary Space: $O(logN)$
-
-
-
-| Problem Statement | Solution Link | LeetCode Profile |
-| :---------------- | :------------ | :--------------- |
-| [Fixing Two swapped nodes of a BST](https://www.geeksforgeeks.org/problems/fixing-two-swapped-nodes-of-a-bst--170646/1) | [Fixing Two swapped nodes of a BST](https://leetcode.com/problems/recover-binary-search-tree/solutions/3647453/easy-c-solution-inorder-efficient/) | [DaminiChachane](https://leetcode.com/u/divcxl15/) |
-
diff --git a/dsa-solutions/gfg-solutions/Hard/0101-0200/0114-Water-Connection-Problem.md b/dsa-solutions/gfg-solutions/Hard/0101-0200/0114-Water-Connection-Problem.md
deleted file mode 100644
index 50376e838..000000000
--- a/dsa-solutions/gfg-solutions/Hard/0101-0200/0114-Water-Connection-Problem.md
+++ /dev/null
@@ -1,129 +0,0 @@
----
-id: water-connection-problem
-title: Water-Connection-Problem (Geeks for Geeks)
-sidebar_label: Water Connection Problem
-tags:
- - Intermediate
- - Geeks for Geeks
- - CPP
- - Python
- - DSA
-description: "This is a solution to the Water Connection Problem problem on Geeks for Geeks."
----
-
-## Problem Description
-
-Every house in the colony has at most one pipe going into it and at most one pipe going out of it. Tanks and taps are to be installed in a manner such that every house with one outgoing pipe but no incoming pipe gets a tank installed on its roof and every house with only an incoming pipe and no outgoing pipe gets a tap.
-
-Given two integers n and p denoting the number of houses and the number of pipes. The connections of pipe among the houses contain three input values: a_i, b_i, d_i denoting the pipe of diameter d_i from house a_i to house b_i, find out the efficient solution for the network.
-
-The output will contain the number of pairs of tanks and taps t installed in first line and the next t lines contain three integers: house number of tank, house number of tap and the minimum diameter of pipe between them.
-
-
-## Examples
-
-**Example:**
-**Input:**
-```
- 4 2
- 1 2 60
- 3 4 50
-```
-**Output:**
-```
- 2
- 1 2 60
- 3 4 50
-```
-**Explanation:**
-Connected components are: `1->2` and `3->4`
-Therefore, our answer is 2 followed by `1 2 60` and `3 4 50`.
-## Your Task
-You don't need to read input or print anything. Your task is to complete the function solve() which takes an integer n(the number of houses), p(the number of pipes),the array a[] , b[] and d[] (where d[i] denoting the diameter of the ith pipe from the house a[i] to house b[i]) as input parameter and returns the array of pairs of tanks and taps installed i.e ith element of the array contains three integers: house number of tank, house number of tap and the minimum diameter of pipe between them. Note that, returned array must be sorted based on the house number containing a tank (i.e. smaller house number should come before a large house number).
-
-Expected Time Complexity: $O(n+p)$.
-Expected Auxiliary Space: $O(n+p)$.
-
-## Constraints
-
-- `1<=n<=20`
-- `1<=p<=50`
-- `1<=a[i]`,`b[i]<=20`
-- `1<=d[i]<=100`
-
-## Problem Explanation
-
-There are n houses and p water pipes in Geek Colony. Every house has at most one pipe going into it and at most one pipe going out of it. Geek needs to install pairs of tanks and taps in the colony according to the following guidelines.
-**Step 1 :** Every house with one outgoing pipe but no incoming pipe gets a tank on its roof.
-**Step 2 :** Every house with only one incoming and no outgoing pipe gets a tap.
-The Geek council has proposed a network of pipes where connections are denoted by three input values: ai, bi, di denoting the pipe of diameter di from house ai to house bi.
-**Step 3 :** Find a more efficient way for the construction of this network of pipes. Minimize the diameter of pipes wherever possible.
-Note: The generated output will have the following format. The first line will contain t, denoting the total number of pairs of tanks and taps installed. The next t lines contain three integers each: house number of tank, house number of tap, and the minimum diameter of pipe between them.
-
-
-
-### Code Implementation
-
-
-
-
- ```python
-class Solution:
- def canMeasureWater(self, jug1Capacity: int, jug2Capacity: int, targetCapacity: int) -> bool:
-
- seen = set()
-
- def dfs(tot):
- if tot == targetCapacity:
- return True
- if tot in seen or tot < 0 or tot > jug1Capacity + jug2Capacity:
- return False
-
- seen.add(tot)
-
- return dfs(tot+jug1Capacity) or dfs(tot-jug1Capacity) or dfs(tot+jug2Capacity) or dfs(tot-jug2Capacity)
-
- return dfs(0)
- ```
-
-
-
-
- ```cpp
-class Solution {
-public:
- bool canMeasureWater(int jug1Capacity, int jug2Capacity, int targetCapacity) {
- int x = gcd(jug1Capacity,jug2Capacity) ;
- if(jug1Capacity+ jug2Capacity < targetCapacity) return false;
- if(targetCapacity % x == 0 ) return true ;
- return false ;
- }
-};
- ```
-
-
-
-## Solution Logic
-To solve the problem of determining if it is possible to measure exactly targetCapacity liters using two jugs with capacities jug1Capacity and jug2Capacity, we can use mathematical reasoning involving the greatest common divisor (GCD). Here are the steps involved in the solution logic:
-
-**1.Calculate the Greatest Common Divisor (GCD):** Compute the GCD of the two jug capacities, jug1Capacity and jug2Capacity. The GCD is the largest integer that divides both numbers without leaving a remainder.
-**2.Check if Total Capacity is Less Than Target:** If the sum of the two jug capacities (jug1Capacity + jug2Capacity) is less than the targetCapacity, return false. This is because even if we fill both jugs to their maximum, we still cannot reach the targetCapacity.
-**3.Check Divisibility by GCD:** Check if the targetCapacity is divisible by the GCD. If targetCapacity % GCD == 0, return true. This is because if targetCapacity is a multiple of the GCD of the two jug capacities, it is possible to measure exactly targetCapacity liters using the two jugs. This stems from a property of the GCD which states that any linear combination of the two numbers (with integer coefficients) can be written as a multiple of their GCD.
-**Default Case:** If none of the above conditions are met, return false.
-The algorithm is based on the mathematical fact derived from Bezout's identity which states that the equation `𝑎𝑥 + 𝑏𝑦 = 𝑑` has a solution if and only if `d` (the GCD of `a` and `b`) divides `c`.
-This logic ensures that the solution is efficient and correct, leveraging properties of number theory to make the determination.
-## Time Complexity
-
-$O(n+p)$
-
-## Space Complexity
-
-$O(n+p)$
-
-## Resources
-
-- **GFG Problem:** [GFG Problem](https://www.geeksforgeeks.org/problems/water-connection-problem5822/)
-- **LeetCode Problem:** [LeetCode Problem](https://leetcode.com/problems/water-and-jug-problem/)
-- **Author's Geeks for Geeks Profile:** | [DaminiChachane](https://leetcode.com/u/divcxl15/) |
-
-This format ensures that all necessary details about the problem and its solution are clearly presented and easy to follow.
diff --git a/dsa-solutions/gfg-solutions/Hard/0101-0200/0115-Binary-Tree-To-DLL.md b/dsa-solutions/gfg-solutions/Hard/0101-0200/0115-Binary-Tree-To-DLL.md
deleted file mode 100644
index addf24b86..000000000
--- a/dsa-solutions/gfg-solutions/Hard/0101-0200/0115-Binary-Tree-To-DLL.md
+++ /dev/null
@@ -1,271 +0,0 @@
----
-id: binary-tree-to-dll
-title: Binary Tree to DLL
-sidebar_label: Binary Tree to DLL
-
-tags:
-- Binary tree
-- DLL
-
-description: "This is a solution to the Binary Tree to DLL problem on GeeksForGeeks."
----
-
-## Problem Description
-Given a Binary Tree (BT), convert it to a Doubly Linked List(DLL) In-Place. The left and right pointers in nodes are to be used as previous and next pointers respectively in converted DLL. The order of nodes in DLL must be same as Inorder of the given Binary Tree. The first node of Inorder traversal (leftmost node in BT) must be the head node of the DLL.
-Note: H is the height of the tree and this space is used implicitly for the recursion stack.
-
-### Examples
-
-**Example 1:**
-```
-Input:
- 1
- / \
- 3 2
-
-Output:
-3 1 2
-2 1 3
-
-Explanation: Explanation: DLL would be 3<=>1<=>2
-```
-
-**Example 2:**
-```
-Input:
- 10
- / \
- 20 30
- / \
- 40 60
-
-Output:
-40 20 60 10 30
-30 10 60 20 40
-
-Explanation:
-DLL would be
-40<=>20<=>60<=>10<=>30.
-```
-
-
-### Constraints
-- `1 ≤ Number of nodes ≤ 10^5`
-- `0 ≤ Data of a node ≤ 10^5`
-
-
-## Solution for Binary Tree to DLL
-### Approach
-#### Brute Force
-- **Inorder Traversal**: Perform an inorder traversal of the binary tree to collect nodes in the order they would appear in the DLL.
-- **Construct DLL**: As you traverse the tree in inorder
- - Keep track of the previously visited node.
- - Adjust pointers (`left` and `right`) of each node to convert it into a DLL node.
- - Update the head of the DLL once you reach the leftmost node (first node in inorder traversal).
-
-**Implementation:**
-```cpp
-// Definition for a binary tree node.
-struct TreeNode {
- int val;
- TreeNode* left;
- TreeNode* right;
- TreeNode(int x) : val(x), left(NULL), right(NULL) {}
-};
-
-class Solution {
-public:
- TreeNode* treeToDoublyList(TreeNode* root) {
- if (root == nullptr)
- return nullptr;
-
- TreeNode* head = nullptr; // Head of the DLL
- TreeNode* prev = nullptr; // Previous node in inorder traversal
-
- inorder(root, prev, head);
-
- // Connect head and tail for circular DLL
- head->left = prev;
- prev->right = head;
-
- return head;
- }
-
- void inorder(TreeNode* node, TreeNode*& prev, TreeNode*& head) {
- if (node == nullptr)
- return;
-
- // Recursively traverse left subtree
- inorder(node->left, prev, head);
-
- // Process current node
- if (prev == nullptr) {
- // This is the leftmost node (head of DLL)
- head = node;
- } else {
- // Connect previous node with current node
- prev->right = node;
- node->left = prev;
- }
- prev = node; // Update prev to current node
-
- // Recursively traverse right subtree
- inorder(node->right, prev, head);
- }
-};
-```
-
-
-#### Optimized Approach
-- **Algorithm**:
- - Use a recursive approach to perform an inorder traversal while adjusting the pointers to form a doubly linked list on the fly.
- - Maintain a reference to the previously processed node to set the `left` and `right` pointers correctly.
-- **Steps**:
- - Initialize `prev` as `None` and `head` as `None` to keep track of the previous node and the head of the DLL, respectively.
- - Define a recursive function `convert_to_dll` that:
- - Recursively converts the left subtree.
- - Adjusts the pointers of the current node based on the `prev` node.
- - Updates `prev` to the current node.
- - Recursively converts the right subtree.
- - Call the recursive function with the root node.
- - Return the `head` of the DLL.
-
-**Complexity:**
-- Time Complexity: O(N), where N is the number of nodes in the binary tree. Each node is visited exactly once.
-- Space Complexity: O(H), where H is the height of the binary tree. This is the space required for the recursion stack.
-
-**Corner Cases:**
-- The binary tree is empty (i.e., the root is `None`).
-- The binary tree has only one node.
-
-
-## Code in Different Languages
-
-
-
-
-
-
- ```python
- class Solution:
- def __init__(self):
- self.prev = None
- self.head = None
-
-
- def bToDLL(self, root):
- if not root:
- return None
-
- def inorder(node):
- if not node:
- return
-
- inorder(node.left)
-
- if self.prev:
- self.prev.right = node
- node.left = self.prev
- else:
- self.head = node
-
- self.prev = node
-
- inorder(node.right)
-
- inorder(root)
- return self.head
- ```
-
-
-
-
-
-
- ```
- class Solution
- {
- //Function to convert binary tree to doubly linked list and return it.
- Node prev = null;
- Node head = null;
-
- // Function to convert binary tree to doubly linked list and return it.
- public Node bToDLL(Node root) {
- if (root == null) {
- return null;
- }
-
- inorder(root);
- return head;
- }
-
- private void inorder(Node node) {
- if (node == null) {
- return;
- }
-
- inorder(node.left);
-
- if (prev != null) {
- prev.right = node;
- node.left = prev;
- } else {
- head = node;
- }
-
- prev = node;
-
- inorder(node.right);
- }
- }
- ```
-
-
-
-
-
-
- ```cpp
- class Solution {
- public:
- Node* prev = nullptr;
- Node* head = nullptr;
-
- // Function to convert binary tree to doubly linked list and return it.
- Node* bToDLL(Node* root) {
- if (root == nullptr) {
- return nullptr;
- }
-
- inorder(root);
- return head;
- }
-
- private:
- void inorder(Node* node) {
- if (node == nullptr) {
- return;
- }
-
- inorder(node->left);
-
- if (prev != nullptr) {
- prev->right = node;
- node->left = prev;
- } else {
- head = node;
- }
-
- prev = node;
-
- inorder(node->right);
- }
- };
- ```
-
-
-
-
-## References
-
-- **LeetCode Problem**: [Binary Tree to DLL](https://www.geeksforgeeks.org/problems/binary-tree-to-dll/1)
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Hard/0101-0200/0116-LRU-Cache.md b/dsa-solutions/gfg-solutions/Hard/0101-0200/0116-LRU-Cache.md
deleted file mode 100644
index 9bd92ee7f..000000000
--- a/dsa-solutions/gfg-solutions/Hard/0101-0200/0116-LRU-Cache.md
+++ /dev/null
@@ -1,296 +0,0 @@
----
-id: lru-cache
-title: LRU Cache
-sidebar_label: LRU Cache
-
-tags:
-- Linked List
-- DLL
-- Hash
-- Queue
-- Design Pattern
-- Data Structures
-
-description: "This is a solution to the LRU Cache problem on GeeksForGeeks."
----
-
-## Problem Description
-Design a data structure that works like a LRU Cache. Here **cap** denotes the capacity of the cache and Q denotes the number of queries. Query can be of two types:
-- **SET x y**: sets the value of the key x with value y
-- **GET x**: gets the key of x if present else returns -1.
-
-The LRUCache class has two methods get() and set() which are defined as follows.
-- **get(key)**: returns the value of the key if it already exists in the cache otherwise returns -1.
-- **set(key, value)**: if the key is already present, update its value. If not present, add the key-value pair to the cache. If the cache reaches its capacity it should invalidate the least recently used item before inserting the new item.
-- In the constructor of the class the capacity of the cache should be initialized.
-
-### Examples
-
-**Example 1:**
-```
-Input:
-cap = 2
-Q = 2
-Queries = SET 1 2 GET 1
-
-Output:
-2
-
-Explanation:
-Cache Size = 2
-
-SET 1 2 GET 1
-SET 1 2 : 1 -> 2
-
-GET 1 : Print the value corresponding
-to Key 1, ie 2.
-```
-
-**Example 2:**
-```
-Input:
-cap = 2
-Q = 8
-Queries = SET 1 2 SET 2 3 SET 1 5
-SET 4 5 SET 6 7 GET 4 SET 1 2 GET 3
-
-Output:
-5 -1
-
-Explanation:
-Cache Size = 2
-SET 1 2 : 1 -> 2
-
-SET 2 3 : 1 -> 2, 2 -> 3 (the most recently
-used one is kept at the rightmost position)
-
-SET 1 5 : 2 -> 3, 1 -> 5
-
-SET 4 5 : 1 -> 5, 4 -> 5 (Cache size is 2, hence
-we delete the least recently used key-value pair)
-
-SET 6 7 : 4 -> 5, 6 -> 7
-
-GET 4 : Prints 5 (The cache now looks like
-6 -> 7, 4->5)
-
-SET 1 2 : 4 -> 5, 1 -> 2
-(Cache size is 2, hence we delete the least
-recently used key-value pair)
-
-GET 3 : No key value pair having
-key = 3. Hence, -1 is printed.
-```
-
-
-### Constraints
-- `1 ≤ Cap ≤ 10^3`
-- `1 ≤ Q ≤ 10^5`
-- `1 ≤ x,y ≤ 10^4`
-
-
-## Solution for LRU Cache
-### Approach
-#### Brute Force
-In the brute force approach, we'll use a list to maintain the order of elements and a dictionary to store key-value pairs. This solution will not meet the requirement of O(1) time complexity for both `get()` and `set()` operations but will help in understanding the mechanism.
-- **Initialization**: Use a dictionary `cache` to store the key-value pairs and a list order to store the keys in the `order` of their usage.
-- **GET Operation:**
- - If the key exists in the cache, move the key to the end of the order list (to mark it as recently used) and return the value.
- - If the key does not exist, return -1.
-- **SET Operation:**
- - If the key already exists, update the value and move the key to the end of the `order` list.
- - If the key does not exist and the cache is not full, add the key-value pair and append the key to the end of the `order` list.
- - If the cache is full, remove the least recently used item (the first item in the `order` list), then add the new key-value pair and append the key to the end of the `order` list.
-
-
-**Implementation:**
-```python
-class LRUCache:
- def __init__(self, capacity: int):
- self.capacity = capacity
- self.cache = {}
- self.order = []
-
- def get(self, key: int) -> int:
- if key in self.cache:
- self.order.remove(key)
- self.order.append(key)
- return self.cache[key]
- return -1
-
- def set(self, key: int, value: int) -> None:
- if key in self.cache:
- self.cache[key] = value
- self.order.remove(key)
- else:
- if len(self.cache) >= self.capacity:
- lru = self.order.pop(0)
- del self.cache[lru]
- self.cache[key] = value
- self.order.append(key)
-
-# Example usage
-lru_cache = LRUCache(2)
-lru_cache.set(1, 2)
-print(lru_cache.get(1)) # Output: 2
-```
-
-#### Complexity Analysis:
-- Time Complexity:
- - `get()`: O(n) due to list removal and append operations.
- - `set()`: O(n) due to list removal and append operations.
-- Space Complexity:
- - O(n) where n is the capacity of the cache.
-
-
-#### Optimized Approach
- For an optimized solution, we can use an OrderedDict from the collections module in Python, which maintains the order of insertion and provides O(1) time complexity for both get() and set() operations.
-- **Steps**:
- - Initialization: Use an OrderedDict to store the key-value pairs and maintain the order of insertion.
- - GET Operation:
- - If the key exists in the cache, move the key to the end (to mark it as recently used) and return the value.
- - If the key does not exist, return -1.
- - SET Operation:
- - If the key already exists, update the value and move the key to the end.
- - If the key does not exist and the cache is not full, add the key-value pair.
- - If the cache is full, remove the first item (the least recently used item), then add the new key-value pair.
-
-**Implementation:**
-```python
-from collections import OrderedDict
-
-class LRUCache:
- def __init__(self, capacity: int):
- self.cache = OrderedDict()
- self.capacity = capacity
-
- def get(self, key: int) -> int:
- if key in self.cache:
- self.cache.move_to_end(key)
- return self.cache[key]
- return -1
-
- def set(self, key: int, value: int) -> None:
- if key in self.cache:
- self.cache.move_to_end(key)
- self.cache[key] = value
- if len(self.cache) > self.capacity:
- self.cache.popitem(last=False)
-
-# Example usage
-lru_cache = LRUCache(2)
-lru_cache.set(1, 2)
-print(lru_cache.get(1)) # Output: 2
-```
-
-**Complexity:**
-- Time Complexity: O(1) for both `get()` and `set()`.
-- Space Complexity: O(n) where n is the capacity of the cache.
-
-**Corner Cases:**
-- When the cache is empty, `get()` should return -1 for any key.
-- When inserting into a full cache, ensure the least recently used item is removed.
-- Ensure `set()` updates the value and position if the key already exists.
-- Handling of negative and zero capacity should be considered (though usually, capacity will be a positive integer).
-
-
-## Code in Different Languages
-
-
-
-
-
-
- ```java
- import java.util.LinkedHashMap;
- import java.util.Map;
-
- class LRUCache {
- private final int capacity;
- private final Map cache;
-
- public LRUCache(int capacity) {
- this.capacity = capacity;
- this.cache = new LinkedHashMap(capacity, 0.75f, true) {
- protected boolean removeEldestEntry(Map.Entry eldest) {
- return size() > capacity;
- }
- };
- }
-
- public int get(int key) {
- return cache.getOrDefault(key, -1);
- }
-
- public void set(int key, int value) {
- cache.put(key, value);
- }
-
- public static void main(String[] args) {
- LRUCache lruCache = new LRUCache(2);
- lruCache.set(1, 2);
- System.out.println(lruCache.get(1)); // Output: 2
- }
- }
-
- ```
-
-
-
-
-
-
- ```cpp
- #include
- #include
- #include
- using namespace std;
-
- class LRUCache {
- private:
- int capacity;
- list> cache;
- unordered_map>::iterator> map;
-
- public:
- LRUCache(int capacity) : capacity(capacity) {}
-
- int get(int key) {
- if (map.find(key) == map.end()) {
- return -1;
- } else {
- cache.splice(cache.begin(), cache, map[key]);
- return map[key]->second;
- }
- }
-
- void set(int key, int value) {
- if (map.find(key) != map.end()) {
- cache.splice(cache.begin(), cache, map[key]);
- map[key]->second = value;
- return;
- }
- if (cache.size() == capacity) {
- int k = cache.back().first;
- cache.pop_back();
- map.erase(k);
- }
- cache.push_front({key, value});
- map[key] = cache.begin();
- }
- };
-
- int main() {
- LRUCache lruCache(2);
- lruCache.set(1, 2);
- cout << lruCache.get(1) << endl; // Output: 2
- return 0;
- }
- ```
-
-
-
-
-## References
-
-- **GeekForGeeks Problem**: [LRU Cache](https://www.geeksforgeeks.org/problems/lru-cache/1)
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/Hard/0101-0200/111-Maximum-Number-of-coins.md b/dsa-solutions/gfg-solutions/Hard/0101-0200/111-Maximum-Number-of-coins.md
deleted file mode 100644
index 472aa1af7..000000000
--- a/dsa-solutions/gfg-solutions/Hard/0101-0200/111-Maximum-Number-of-coins.md
+++ /dev/null
@@ -1,118 +0,0 @@
----
-id: 111-maximum-number-of-coins
-title: Maximum Number of coins (Geeks for Geeks)
-sidebar_label: Maximum Number of coins Problem
-tags:
- - Intermediate
- - Geeks for Geeks
- - CPP
- - Python
- - DSA
-description: "This is a solution to the Maximum Number of coins Problem on Geeks for Geeks."
----
-
-## Problem Description
-
-We have been given N balloons, each with a number of coins associated with it. On bursting a balloon i, the number of coins gained is equal to A[i-1]*A[i]*A[i+1].
-Also, balloons i-1 and i+1 now become adjacent. Find the maximum possible profit earned after bursting all the balloons. Assume an extra 1 at each boundary.
-
-## Examples
-
-**Example:**
-
-Consider the following graph:
-
-**Input:** ` N=2 , a[]={5, 10}`
-**Output:** `60`
-**Explanation:** First Burst `5`, Coins = `1*5*10` , Then burst `10`, Coins+=` 1*10*1` , Total = `60`
-
-**Example:**
-
-**Input:** `N=4 , a[] = {3,1,5,8}`
-**Output:** 167
-**Explanation:**
-`nums = [3,1,5,8] --> [3,5,8] --> [3,8] --> [8] --> []`
-`coins = 3*1*5 + 3*5*8 + 1*3*8 + 1*8*1 = 167.`
-
-## Your Task
-
-You don't need to read input or print anything. Your task is to complete the function maxCoins() which takes the array arr[], its size N, and returns the maximum number of coins that can be collected.
-
-Expected Time Complexity: $O(N^3)$
-Expected Space Complexity: $O(N^2)$
-
-## Constraints
-- `1 <= N <= 400`
-- `0 <= a[i] <= 100`
-
-## Problem Explanation
-
-Here's the step-by-step breakdown of the Maximum Number of coins process:
-
-There are 3n piles of coins of varying size, you and your friends will take piles of coins as follows:
-
-**Step 1:** In each step, you will choose any 3 piles of coins (not necessarily consecutive).
-**Step 2 :**Of your choice, Alice will pick the pile with the maximum number of coins.
-**Step 3 :**You will pick the next pile with the maximum number of coins.
-**Step 4 :**Your friend Bob will pick the last pile.
-**Step 5 :**Repeat until there are no more piles of coins.
-
-Given an array of integers piles where piles[i] is the number of coins in the ith pile. Return the maximum number of coins that you can have.
-
-### Code Implementation
-
-
-
-
- ```python
-
-class Solution:
- def maxCoins(self, piles: List[int]) -> int:
- piles.sort()
- return sum(piles[-2:(len(piles)//3)-1:-2])
-
- ```
-
-
-
- ```cpp
- class Solution {
-public:
-
- int maxCoins(vector& piles) {
- // sort the piles in non-increasing order
- sort(piles.begin(), piles.end(), greater());
-
- // greedy using two-pointers
- int sum = 0;
- for (int l = 0, r = piles.size() - 1; l < r; l += 2, r--) {
- sum += piles[l + 1];
- }
- return sum;
- }
-};
- ```
-
-
-
-
-## Solution Logic
- - Sort the piles in non-increasing order
- - Greedy using two-pointers
-
-
-## Time Complexity
-
-$$O(N^3)$$.
-
-## Space Complexity
-
-$$O(N^2)$$.
-
-## Resources
-
-- **GFG Problem:** [GFG Problem](https://www.geeksforgeeks.org/problems/maximum-number-of-coins--170647/1)
-- **LeetCode Problem:** [LeetCode Problem](https://leetcode.com/problems/maximum-number-of-coins-you-can-get/description/)
-- **Author's Geeks for Geeks Profile:** | [DaminiChachane](https://leetcode.com/u/divcxl15/) |
-
-This format ensures that all necessary details about the problem and its solution are clearly presented and easy to follow.
diff --git a/dsa-solutions/gfg-solutions/Hard/0101-0200/image-1.png b/dsa-solutions/gfg-solutions/Hard/0101-0200/image-1.png
deleted file mode 100644
index e31c4adcd..000000000
Binary files a/dsa-solutions/gfg-solutions/Hard/0101-0200/image-1.png and /dev/null differ
diff --git a/dsa-solutions/gfg-solutions/Hard/0101-0200/image.png b/dsa-solutions/gfg-solutions/Hard/0101-0200/image.png
deleted file mode 100644
index 9b9079215..000000000
Binary files a/dsa-solutions/gfg-solutions/Hard/0101-0200/image.png and /dev/null differ
diff --git a/dsa-solutions/gfg-solutions/Hard/0101-0200/median-of-2-sorted-arrays-of-different-sizes b/dsa-solutions/gfg-solutions/Hard/0101-0200/median-of-2-sorted-arrays-of-different-sizes
deleted file mode 100644
index 93f84f038..000000000
--- a/dsa-solutions/gfg-solutions/Hard/0101-0200/median-of-2-sorted-arrays-of-different-sizes
+++ /dev/null
@@ -1,197 +0,0 @@
-
----
-id: median-of-2-sorted-arrays-of-different-sizes
-title: Median of Two Sorted Arrays Problem (gfg)
-sidebar_label: 0004 - Median of Two Sorted Arrays
-tags:
- - Intermediate
- - Array
- - Binary Search
- - LeetCode
- - CPP
- - Python
- - DSA
-description: "This is a solution to the Median of Two Sorted Arrays problem on LeetCode."
----
-
-This tutorial contains a complete walk-through of the Median of Two Sorted Arrays problem from the LeetCode website. It features the implementation of the solution code in two programming languages: Python and C++.
-
-## Problem Description
-
-Given two sorted arrays array1 and array2 of size m and n respectively, find the median of the two sorted arrays.
-
-## Examples
-
-**Example 1:**
-
-```
-Input : array1 = [1, 3], array2 = [2]
-Output : 2.0
-Explanation : The median is 2.0.
-```
-
-**Example 2:**
-
-```
-Input : array1 = [1, 2], array2 = [3, 4]
-Output : 2.5
-Explanation : The median is (2 + 3)/2 = 2.5.
-```
-
-## Your Task
-
-You don't need to read input or print anything. Your task is to complete the function `MedianOfArrays()` which takes the arrays `array1`, `array2` and their sizes `m` and `n` as inputs and return the median of the two sorted arrays.
-
-Expected Time Complexity: $O(log(min(m, n)))$
-
-Expected Auxiliary Space: $O(1)$
-
-## Constraints
-
-* `0 ≤ m, n ≤ 1000`
-* `1 ≤ array1[i], array2[i] ≤ 1000000`
-
-## Problem Explanation
-
-The problem is to find the median of two sorted arrays. The median is the middle value in the sorted order of the combined array. If the total number of elements is even, the median is the average of the two middle numbers.
-
-## Code Implementation
-
-
-
-
-
- ```py
- class Solution:
- def MedianOfArrays(self, array1, array2):
- if len(array1) > len(array2):
- array1, array2 = array2, array1
-
- m, n = len(array1), len(array2)
- imin, imax, half_len = 0, m, (m + n + 1) // 2
-
- while imin <= imax:
- i = (imin + imax) // 2
- j = half_len - i
-
- if i < m and array1[i] < array2[j-1]:
- imin = i + 1
- elif i > 0 and array1[i-1] > array2[j]:
- imax = i - 1
- else:
- if i == 0: max_of_left = array2[j-1]
- elif j == 0: max_of_left = array1[i-1]
- else: max_of_left = max(array1[i-1], array2[j-1])
-
- if (m + n) % 2 == 1:
- return max_of_left
-
- if i == m: min_of_right = array2[j]
- elif j == n: min_of_right = array1[i]
- else: min_of_right = min(array1[i], array2[j])
-
- return (max_of_left + min_of_right) / 2.0
- ```
-
-
-
-
-
- ```cpp
- #include
- #include
- #include
- #include
- #include
-
- class Solution {
- public:
- double MedianOfArrays(std::vector& array1, std::vector& array2) {
- if (array1.size() > array2.size()) {
- return MedianOfArrays(array2, array1);
- }
-
- int m = array1.size();
- int n = array2.size();
- int low = 0, high = m;
-
- while (low <= high) {
- int partition1 = (low + high) / 2;
- int partition2 = (m + n + 1) / 2 - partition1;
-
- int maxLeft1 = (partition1 == 0) ? INT_MIN : array1[partition1 - 1];
- int minRight1 = (partition1 == m) ? INT_MAX : array1[partition1];
-
- int maxLeft2 = (partition2 == 0) ? INT_MIN : array2[partition2 - 1];
- int minRight2 = (partition2 == n) ? INT_MAX : array2[partition2];
-
- if (maxLeft1 <= minRight2 && maxLeft2 <= minRight1) {
- if ((m + n) % 2 == 0) {
- return (std::max(maxLeft1, maxLeft2) + std::min(minRight1, minRight2)) / 2.0;
- } else {
- return std::max(maxLeft1, maxLeft2);
- }
- } else if (maxLeft1 > minRight2) {
- high = partition1 - 1;
- } else {
- low = partition1 + 1;
- }
- }
-
- throw std::invalid_argument("Input arrays are not sorted");
- }
- };
-
- // Example usage:
- int main() {
- std::vector array1 = {1, 3};
- std::vector array2 = {2};
-
- Solution sol;
- double median = sol.MedianOfArrays(array1, array2);
- std::cout << "Median: " << median << std::endl; // Expected output: 2.0
-
- return 0;
- }
- ```
-
-
-
-
-
-## Example Walkthrough
-
-For the arrays `array1 = [1, 3]` and `array2 = [2]`:
-
-1. Combined array would be `[1, 2, 3]`.
-2. The median is `2.0`.
-
-For the arrays `array1 = [1, 2]` and `array2 = [3, 4]`:
-
-1. Combined array would be `[1, 2, 3, 4]`.
-2. The median is `(2 + 3) / 2 = 2.5`.
-
-## Solution Logic:
-
-1. Ensure `array1` is the smaller array to minimize the number of binary search steps.
-2. Perform binary search on the smaller array.
-3. Calculate partitions for both arrays such that left and right parts of the partitions can be merged to form the sorted order.
-4. Handle edge cases where partitions are at the boundaries of the arrays.
-5. If the total number of elements is even, the median is the average of the maximum of the left parts and the minimum of the right parts.
-6. If the total number of elements is odd, the median is the maximum of the left parts.
-
-## Time Complexity
-
-* The primary operation is binary search, which has a time complexity of $O(log(min(m, n)))$, where m and n are the sizes of the arrays.
-
-## Space Complexity
-
-Auxiliary Space: The auxiliary space complexity is $O(1)$ because we are not using any extra space proportional to the size of the input arrays.
-
-## References
-
-- **gfg Problem:** [gfg Problem](https://www.geeksforgeeks.org/problems/median-of-2-sorted-arrays-of-different-sizes/1?itm_source=geeksforgeeks&itm_medium=article&itm_campaign=bottom_sticky_on_article)
-- **Solution Author:** [arunimad6yuq](https://www.geeksforgeeks.org/user/arunimad6yuq/)
-```
-
-In this format, the tutorial includes a description of the problem, examples, expected time and space complexity, constraints, detailed problem explanation, and complete code implementations in both Python and C++. It ends with a walkthrough of examples to illustrate the logic of the solution.
diff --git a/dsa-solutions/gfg-solutions/_category_.json b/dsa-solutions/gfg-solutions/_category_.json
deleted file mode 100644
index c91d98288..000000000
--- a/dsa-solutions/gfg-solutions/_category_.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "label": "GFG Solutions",
- "position": 4,
- "link": {
- "type": "generated-index",
- "description": "All Geeks for Geeks solutions in one place. Sorted by difficulty. Contains problem description, solution, and explanation."
- }
-}
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/easy/armstrong-numbers.md b/dsa-solutions/gfg-solutions/easy/armstrong-numbers.md
deleted file mode 100644
index d231bd69b..000000000
--- a/dsa-solutions/gfg-solutions/easy/armstrong-numbers.md
+++ /dev/null
@@ -1,86 +0,0 @@
----
-id: armstrong-numbers
-title: Armstrong Numbers
-sidebar_label: 0104-Armstrong Numbers
-
-tags:
- - Mathematical
- - Algorithms
-description: "A solution to the problem of determining whether the given number is armstrong number or not"
----
-
-In this page, we will solve the problem of determining whether the given number is armstrong number or not.
-
-## Problem Description
-
-You are given a 3-digit number n, Find whether it is an Armstrong number or not.
-
-An Armstrong number of three digits is a number such that the sum of the cubes of its digits is equal to the number itself. 371 is an Armstrong number since 33 + 73 + 13 = 371.
-
-Note: Return "true" if it is an Armstrong number else return "false".
-
-### Examples
-
-**Example 1:**
-
-```plaintext
-Input: n = 153
-Output: true
-Explanation: 153 is an Armstrong number since 13 + 53 + 33 = 153. Hence answer is "true".
-```
-
-**Example 2:**
-
-```plaintext
-Input: n = 372
-Output: false
-Explanation: 372 is not an Armstrong number since 33 + 73 + 23 = 378. Hence answer is "false".
-```
-
-### Constraints
-
-- $100 \leq N < 1000$
-
-## Solution
-
-### Intuition and Approach
-
-This problem can be solved by running a while loop three time and get the unit digit every time and add the cube of that digit into ans after the loop if the sum result is same as that of givrn num than return "true" and if not then return "false".
-
-### Approach:
-
-1. First we initialize three variables i,Sum,and temp.
- - 'i' is initialized to 0. This variable will be used as a counter to keep track of the number of digits processed.
- - 'Sum' is initialized to 0. This variable will accumulate the sum of the cubes of the digits of n.
- - 'temp' is assigned the value of n. This is to store the original number for comparison later.
-2. Next we run a while loop runs as long as i is less than or equal to 3. Since we're dealing with 3-digit numbers, this ensures that we process exactly 3 digits.
- - In each iteration of the loop:
- - The last digit of n is obtained using n % 10.
- - The cube of this digit is added to Sum.
- - n is then divided by 10 using integer division (n //= 10), effectively removing the last digit.
- - i is incremented by 1.
-3. After the loop, Sum contains the sum of the cubes of the digits of n.The original number (temp) is compared with Sum.
- - If temp is equal to Sum, the function returns "true", indicating that n is an Armstrong number.
- - Otherwise, it returns "false".
-#### Code in Python
-```python
-class Solution:
- def armstrongNumber (self, n):
- i=0
- Sum=0
- temp=n
- while(i<=3):
- Sum+=(n%10)**3
- n=n//10
- i+=1
- if temp==Sum:
- return "true"
- return "false"
-
-```
-
-#### Complexity Analysis
-
-- **Time Complexity:** $O(1)$
-- **Space Complexity:** $O(1)$
-
diff --git a/dsa-solutions/gfg-solutions/easy/count-distinct-elements-in-every-window.md b/dsa-solutions/gfg-solutions/easy/count-distinct-elements-in-every-window.md
deleted file mode 100644
index 4c1d24d35..000000000
--- a/dsa-solutions/gfg-solutions/easy/count-distinct-elements-in-every-window.md
+++ /dev/null
@@ -1,108 +0,0 @@
----
-id: count-distinct-elements-in-every-window
-title: Count Distinct Elements in Every Window
-sidebar_label: 0101-Count Distinct Elements in Every Window
-tags:
- - sliding-window
- - hash
- - data-structures
- - algorithms
-description: "A solution to the problem of determining the count of distinct elements in every window of size k."
----
-
-In this page, we will solve the problem of determining the count of distinct elements in every window of size k.
-
-## Problem Description
-
-Given an array of integers and a number K, find the count of distinct elements in every window of size K in the array.
-
-### Examples
-
-**Example 1:**
-
-```plaintext
-Input:
-N = 7, K = 4
-A[] = {1,2,1,3,4,2,3}
-
-Output: 3 4 4 3
-
-Explanation: Window 1 of size k = 4 is
-1 2 1 3. Number of distinct elements in
-this window are 3.
-Window 2 of size k = 4 is 2 1 3 4. Number
-of distinct elements in this window are 4.
-Window 3 of size k = 4 is 1 3 4 2. Number
-of distinct elements in this window are 4.
-Window 4 of size k = 4 is 3 4 2 3. Number
-of distinct elements in this window are 3.
-```
-
-**Example 2:**
-
-```plaintext
-Input:
-N = 3, K = 2
-A[] = {4,1,1}
-
-Output: 2 1
-```
-
-### Constraints
-
-- $1 \leq K \leq N \leq 10^5$
-- $1 \leq A[i] \leq 10^5$, for each valid $i$
-
----
-
-## Solution
-
-### Intuition and Approach
-
-The problem can be solved using a sliding window approach combined with a hash map (dictionary) to efficiently track the frequency of elements within the current window. By maintaining the counts of elements and adjusting the window dynamically, the algorithm ensures that it only needs to process each element a limited number of times, resulting in a time complexity of $O(n)$, where $n$ is the length of the array. This approach is efficient for counting distinct elements in overlapping subarrays of a fixed size.
-
-
-
-
-### Approach: Sliding Window
-
-1. Initialize the data structures and variables. `ans` is an empty list to store the count of distinct elements for each window. `freq` is an empty dictionary to keep track of the frequency of elements within the current window. `j` is a pointer representing the current end of the window, initialized to 0, and `i` is a pointer representing the current start of the window, also initialized to 0.
-2. Use a while loop to iterate over the array. The loop continues until `j` reaches the end of the array (`N`).
-3. For each element `A[j]`, update its count in the `freq` dictionary. If `A[j]` is already in `freq`, increment its count. If `A[j]` is not in `freq`, add it with a count of 1.
-4. Check if the current window size is equal to `K` (`j - i + 1 == K`). If the condition is met, it means the window has reached the desired size. Append the number of distinct elements in the current window to the `ans` list. The number of distinct elements is the size of the `freq` dictionary.
-5. Slide the window. Decrement the count of the element at the start of the window (`A[i]`) in the `freq` dictionary. If the count of `A[i]` becomes zero, remove it from the `freq` dictionary, as it is no longer in the current window. Move the start of the window forward by incrementing `i`. Move the end of the window forward by incrementing `j`.
-6. After processing all windows, return the `ans` list containing the counts of distinct elements for each window.
-
-#### Code in Python
-```python
-def countDistinct(A, N, K):
- ans = []
- freq = {}
- j = 0
- i = 0
-
- while j < N:
- if A[j] in freq:
- freq[A[j]] += 1
- else:
- freq[A[j]] = 1
-
- if j - i + 1 == K:
- ans.append(len(freq))
- freq[A[i]] -= 1
- if freq[A[i]] == 0:
- del freq[A[i]]
- i += 1
- j += 1
-
- return ans
-```
-
-#### Complexity Analysis
-
-- **Time Complexity:** $O(N)$
-- **Space Complexity:** $O(K)$
-
-
-
-```
diff --git a/dsa-solutions/gfg-solutions/easy/count-pairs-whose-sum-is-equal-to-x.md b/dsa-solutions/gfg-solutions/easy/count-pairs-whose-sum-is-equal-to-x.md
deleted file mode 100644
index d83cf2ae3..000000000
--- a/dsa-solutions/gfg-solutions/easy/count-pairs-whose-sum-is-equal-to-x.md
+++ /dev/null
@@ -1,91 +0,0 @@
----
-id: count-pairs-whose-sum-is-equal-to-x
-title: Count Pairs whose sum is equal to X
-sidebar_label: 0109-Count Pairs whose sum is equal to X
-tags:
- - Linked List
- - Data Structures
-description: "A solution to the problem of finding the count of pairs which sum up to target x"
----
-
-In this page, we will solve the problem of finding the count of pairs which sum up to target x.
-
-## Problem Description
-
-Given two linked list head1 and head2 with distinct elements, determine the count of all distinct pairs from both lists whose sum is equal to the given value x.
-
-Note: A valid pair would be in the form (x, y) where x is from first linked list and y is from second linked list.
-### Examples
-
-**Example 1:**
-
-```plaintext
-Input:
-head1 = 1->2->3->4->5->6
-head2 = 11->12->13
-x = 15
-Output: 3
-Explanation: There are total 3 pairs whose sum is 15 : (4,11) , (3,12) and (2,13)
-```
-
-**Example 2:**
-
-```plaintext
-Input:
-head1 = 7->5->1->3
-head2 = 3->5->2->8
-x = 10
-Output: 2
-Explanation: There are total 2 pairs whose sum is 10 : (7,3) and (5,5)
-```
-
-### Constraints
-
-- $1 \leq$ length(head1), lenght(head2) $\leq10^5$
-- $1 \leq$ Value of elements of linked lists $\leq 10^9$
-- $1 \leq$ x $\leq 10^9$
-- Note : All elements in each linked list are unique.
-
-## Solution
-
-### Intuition and Approach
-
-This problem can be solved by using simple iterations over the both the linked list and usnig a hashmap.
-
-### Approach:
-
-1. We will first initialize
- - a hashmap 'Map' is an empty dictionary that will store the difference between x and each element from the first linked list (head1).
- - cnt is a counter initialized to 0, which will keep track of the number of valid pairs that sum up to x.
-2. Next we will run a while loop by which we traverse the First Linked List (head1).For each node, the difference between x and the node's data (x - head1.data) is calculated and stored in the Map dictionary with the node's data as the value.This effectively maps each required complement value (x - head1.data) to its corresponding data value in the first linked list.
-3. The second while loop iterates through each node in the linked list head2.For each node, it checks if the node's data exists in the Map dictionary.If it exists, it means there is a node in the first linked list whose value, when added to the current node's data from the second linked list, equals x.
-4. Then we increase the counter cnt is incremented for each such valid pair found.
-5. Return the count of valid pairs.
-
-#### Code in Python
-```python
-class Solution:
- def countPair(self, head1, head2, n1, n2, x):
- '''
- head1: head of linkedList 1
- head2: head of linkedList 2
- n1: len of linkedList 1
- n2: len of linkedList 1
- x: given sum
- '''
- Map={}
- cnt = 0
- while(head1):
- Map[x-head1.data]=head1.data
- head1=head1.next
- while(head2):
- if head2.data in Map:
- cnt+=1
- head2=head2.next
- return cnt
-```
-
-#### Complexity Analysis
-
-- **Time Complexity:** $O(length(head1)+lenght(head2))$
-- **Space Complexity:** $O(length(head1))$ or $O(length(head2))$
diff --git a/dsa-solutions/gfg-solutions/easy/count-the-zeros.md b/dsa-solutions/gfg-solutions/easy/count-the-zeros.md
deleted file mode 100644
index 28b4502b3..000000000
--- a/dsa-solutions/gfg-solutions/easy/count-the-zeros.md
+++ /dev/null
@@ -1,83 +0,0 @@
----
-id: count-the-zeros
-title: Count The Zeros
-sidebar_label: 0108-Count The Zeros
-tags:
- - Arrays
- - Searching
- - Data Structures
- - Algorithms
-description: "A solution to the problem of counting the number of zeros in the array"
----
-
-In this page, we will solve the problem of counting the number of zeros in the array.
-
-## Problem Description
-
-Given an array arr of only 0's and 1's. The array is sorted in such a manner that all the 1's are placed first and then they are followed by all the 0's. Find the count of all the 0's.
-### Examples
-
-**Example 1:**
-
-```plaintext
-Input: arr[] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0]
-Output: 3
-Explanation: There are 3 0's in the given array.
-```
-
-**Example 2:**
-
-```plaintext
-Input: arr[] = [0, 0, 0, 0, 0]
-Output: 5
-Explanation: There are 5 0's in the array.
-```
-
-### Constraints
-
-- $1 \leq$ arr.size $\leq10^5$
-- $0 \leq$ arr[i] $\leq1$
-
-## Solution
-
-### Intuition and Approach
-
-This problem can be solved by using binary search and find the first index of zero and then return total length - index of first zero
-
-### Approach:
-
-1. Frist we will initialize variable:
- - n which is the length of the array arr.
- - high is initialized to n-1, which is the index of the last element in the array.
- - low is initialized to 0, which is the index of the first element in the array.
-2. Next we will runa a while loop runs as long as high is greater than or equal to low.
-3. Then mid is calculated as the average of low and high to find the middle index of the current search range.
-4. The first if statement checks if the element at mid is 0 and either mid is 0 (the start of the array) or the previous element (arr[mid-1]) is 1. If this condition is true, it means that mid is the first occurrence of 0 in the array then number of zeroes will be the difference between n (total number of elements) and mid (index of the first zero).
-5. If the element at mid is 1, it means that if zeroes are present they will be right of mid. Thus, we update low to mid + 1 to search in the right half of the array.
-6. If the element at mid is 0 but the condition in step 4 is not met, it means that there might be a zero to the left of mid. Thus, we update high to mid - 1 to search in the left half of the array.
-7. If the loop completes without finding a 0, it means there are no zeroes in the array. The function returns 0.
-
-
-#### Code in Python
-```python
-
-class Solution:
- def countZeroes(self, arr):
- n = len(arr)
- high = n-1
- low = 0
- while(high >= low):
- mid = low + int((high - low) / 2)
- if (( mid == 0 or arr[mid-1] == 1) and arr[mid] == 0):
- return (n-mid)
- if (arr[mid] == 1):
- low = (mid + 1)
- else:
- high = mid-1
- return 0
- ```
-
-#### Complexity Analysis
-
-- **Time Complexity:** $O(logn)$
-- **Space Complexity:** $O(1)$
diff --git a/dsa-solutions/gfg-solutions/easy/index-of-an-extra-element.md b/dsa-solutions/gfg-solutions/easy/index-of-an-extra-element.md
deleted file mode 100644
index 62ddfafdf..000000000
--- a/dsa-solutions/gfg-solutions/easy/index-of-an-extra-element.md
+++ /dev/null
@@ -1,77 +0,0 @@
----
-id: index-of-an-extra-element
-title: Index of an Extra Element
-sidebar_label: 0103-Index of an Extra Element
-
-tags:
- - arrays
- - searching
- - data structures
- - algorithms
-description: "A solution to the problem of determining the index of the extra element in the array "
----
-
-In this page, we will solve the problem of determining the index of the extra element in the array.
-
-## Problem Description
-
-You have given two sorted arrays arr1[] & arr2[] of distinct elements. The first array has one element extra added in between. Return the index of the extra element.
-
-Note: 0-based indexing is followed.
-
-### Examples
-
-**Example 1:**
-
-```plaintext
-Input: n = 7, arr1[] = {2,4,6,8,9,10,12}, arr2[] = {2,4,6,8,10,12}
-
-Output: 4
-
-Explanation: In the first array, 9 is extra added and it's index is 4.
-```
-
-**Example 2:**
-
-```plaintext
-Input: n = 6, arr1[] = {3,5,7,8,11,13}, arr2[] = {3,5,7,11,13}
-
-Output: 3
-
-Explanation: In the first array, 8 is extra and it's index is 3.
-```
-
-### Constraints
-
-- $1 \leq N \leq10^5$, where $N$ is number of nodes
-- $1 \leq arr1[i], arr2[i] \leq 10^6$
-## Solution
-
-### Intuition and Approach
-
-This problem can be solved by iterating over the array by runnig the loop from o to the length of the smallest array
-
-
-
-### Approach: Inorder Traversal
-
-1. Run a for loop from 0 to length of the smallest array.
-2. If at any point in loop the element on ith index of both arrays are different then return the index as it is the answer
-3. If loop runs completely and didn't terminate this means the last index of the largest array is the answer and return that index
-
-#### Code in Python
-```python
-class Solution:
- def findExtra(self,n,a,b):
- for i in range(min(len(a),len(b))):
- if a[i]!=b[i]:return i
- return i+1
-```
-
-#### Complexity Analysis
-
-- **Time Complexity:** $O(N)$
-- **Space Complexity:** $O(1)$
-
-
-
diff --git a/dsa-solutions/gfg-solutions/easy/inorder_successor_in_bst.md b/dsa-solutions/gfg-solutions/easy/inorder_successor_in_bst.md
deleted file mode 100644
index 885b623cd..000000000
--- a/dsa-solutions/gfg-solutions/easy/inorder_successor_in_bst.md
+++ /dev/null
@@ -1,102 +0,0 @@
----
-id: inorder_successor_in_bst
-title: Inorder Successor In BST
-sidebar_label: 0102-Inorder Successor In BST
-tags:
- - binary search tree
- - data-structures
-description: "A solution to the problem of determining the inorder successor of given element in BST"
----
-
-In this page, we will solve the problem of determining the inorder successor of given element in BST.
-
-## Problem Description
-
-Given a BST, and a reference to a Node x in the BST. Find the Inorder Successor of the given node in the BST.
-
-### Examples
-
-**Example 1:**
-
-```plaintext
-Input:
- 2
- / \
- 1 3
-K(data of x) = 2
-
-Output: 3
-
-Explanation:
-Inorder traversal : 1 2 3
-Hence, inorder successor of 2 is 3.
-```
-
-**Example 2:**
-
-```plaintext
-Input:
- 20
- / \
- 8 22
- / \
- 4 12
- / \
- 10 14
-K(data of x) = 8
-
-Output: 10
-
-Explanation:
-Inorder traversal: 4 8 10 12 14 20 22
-Hence, successor of 8 is 10.
-```
-
-### Constraints
-
-- $1 \leq N \leq10^5$, where $N$ is number of nodes
-
-## Solution
-
-### Intuition and Approach
-
-This problem can be solved by a simple approach of Inorder Traversal
-
-
-
-### Approach: Inorder Traversal
-
-1. Initialize an empty list 'traversal' to store the nodes of the tree in inorder traversal.
-2. Then we define a helper function inorder_traversal to perform an inorder traversal of the tree and populate the traversal list. This function takes root as an argument. If root is None, it simply returns, indicating the base case of the recursion.
-3. Within the helper function inorder_traversal, we first recursively call inorder_traversal on the left child of the current node.
-4. We then append the current node to the traversal list.
-5. Next, we recursively call inorder_traversal function on the right child of the current node.
-6. After populating the traversal list, we iterate through the list to find the node whose value matches x.data. We do this using a for loop that iterate through the traversal list and find the successor of the element x by checking if the data of the current node (traversal[i].data) is equal to the data of the node x (x.data).
-7. If the condition is met, it means we have found the node x. The inorder successor of x is the next node in the ans list (traversal[i + 1]). We return this node as the result.
-
-#### Code in Python
-```python
-class Solution:
- # returns the inorder successor of the Node x in BST (rooted at 'root')
- def inorderSuccessor(self, root, x):
- # Code here
- traversal_list=[]
- def inorder_traversal(root):
- if root is None:return
- inorder_traversal(root.left)
- traversal_list.append(root)
- inorder_traversal(root.right)
- inorder_traversal(root)
- for i in range(len(traversal_list)-1):
- if traversal_list[i].data==x.data:
- return traversal_list[i+1]
- return None
-```
-
-#### Complexity Analysis
-
-- **Time Complexity:** $O(N)$
-- **Space Complexity:** $O(N)$
-
-
-
diff --git a/dsa-solutions/gfg-solutions/easy/is-binary-number-multiple-of-3.md b/dsa-solutions/gfg-solutions/easy/is-binary-number-multiple-of-3.md
deleted file mode 100644
index 3a5f96272..000000000
--- a/dsa-solutions/gfg-solutions/easy/is-binary-number-multiple-of-3.md
+++ /dev/null
@@ -1,115 +0,0 @@
----
-id: is-binary-number-multiple-of-3
-title: Is Binary Number Multiple Of 3
-sidebar_label: 0109-Is Binary Number Multiple Of 3
-tags:
- - Mathematical
- - Bit Magic
- - Data Structures
- - Algorithms
-description: "A solution to the problem of finding whether given binary number is divisible by 3 or not"
----
-
-In this page, we will solve the problem of finding whether given binary number is divisible by 3 or not.
-
-## Problem Description
-
-Given a number in its binary form find if the given binary number is a multiple of 3. It is recommended to finish the task using one traversal of input binary number.
-
-### Examples
-
-**Example 1:**
-
-```plaintext
-Input: S = "0011"
-Output: 1
-Explanation: "0011" is 3, which is divisible by 3.
-```
-
-**Example 2:**
-
-```plaintext
-Input: S = "100"
-Output: 0
-Explanation: "100"'s decimal equivalent is 4, which is not divisible by 3.
-```
-
-
-### Constraints
-
-- $1 \leq$ |S| $\leq10^5$
-
-## Solution
-
-### Intuition and Approach
-
-The problem can be solved using two approaches one by converting the given binary string to decimal number and then find whether the given number is divisible by three or not
-and another approach is by using Bit manipulation
-
-
-
-### Approach: Binary to Decimal
-
-1. The simplest approach is to convert the binary number into a decimal equivalent. And check if it is divisible by 3 or not.
-2. For converting the binary string to decimal we will traverse the given string backwards and then
- - if '1' we will add the power of 2 to the res
- - if '0' we will do nothing
-3. After traversing whole list we will check whether the decimal number res is divisible by 3 or not
-#### Code in Python
-```python
-class Solution:
- def isDivisible(self, s):
- ans=0
- for i in range(len(s)-1,-1,-1):
- if s[i]=='1':
- ans+=2**(len(s)-1-i)
- return int(ans%3==0)
-```
-
-#### Complexity Analysis
-
-- **Time Complexity:** $O(S)$
-- **Space Complexity:** $O(1)$
-
-
-
-
-
-### Approach: Binary to Decimal
-
-1. we will initialize variable
- - odd_sum is initialized to 0. This variable will store the count of '1's at odd positions (considering positions starting from 0 when counting from the rightmost bit).
- - even_sum is initialized to 0. This variable will store the count of '1's at even positions (considering positions starting from 0 when counting from the rightmost bit).
-2. The for loop iterates through each bit of the reversed binary string. enumerate(reversed(s)) gives both the index i and the bit bit.s[::-1] is used to process the string from right to left, which corresponds to the least significant bit first.
-3. We then update sums based on bit position:
- - For each bit, if the bit is '1':
- - If the index i is even (0, 2, 4, ...), it corresponds to an odd position in the original string. Therefore, odd_sum is incremented by 1.
- - If the index i is odd (1, 3, 5, ...), it corresponds to an even position in the original string. Therefore, even_sum is incremented by 1.
-4. Next we will check divisibility by 3: After iterating through the entire binary string, the function calculates (odd_sum - even_sum) % 3.
- The difference between odd_sum and even_sum is taken modulo 3 to check if it is divisible by 3.
- - If (odd_sum - even_sum) % 3 == 0 is true, the binary number is divisible by 3, and the function returns 1 (integer representation of True).
- - Otherwise, it returns 0 (integer representation of False).
-#### Code in Python
-```python
-class Solution:
- def isDivisible(self, s):
- # code here
- odd_sum = 0
- even_sum = 0
- for i, bit in enumerate(s[::-1]):
- if bit == '1':
- if i % 2 == 0:
- odd_sum += 1
- else:
- even_sum += 1
- return int((odd_sum - even_sum) % 3 == 0)
-```
-
-#### Complexity Analysis
-
-- **Time Complexity:** $O(log10(n))$
-- **Space Complexity:** $O(1)$
-
-
-
-
diff --git a/dsa-solutions/gfg-solutions/easy/k-distance-from-root.md b/dsa-solutions/gfg-solutions/easy/k-distance-from-root.md
deleted file mode 100644
index b85a0bffe..000000000
--- a/dsa-solutions/gfg-solutions/easy/k-distance-from-root.md
+++ /dev/null
@@ -1,119 +0,0 @@
----
-id: k-distance-from-root
-title: K Distance From Root
-sidebar_label: 0111-K Distance From Root
-tags:
- - Tree
- - Data Structures
-description: "A solution to the problem of finding all the nodes which are at a distance k from the root"
----
-
-In this page, we will solve the problem of finding all the nodes which are at a distance k from the root.
-
-## Problem Description
-
-Given a binary tree having n nodes and an integer k. Print all nodes that are at distance k from the root (root is considered at distance 0 from itself). Nodes should be printed from left to right.
-### Examples
-
-**Example 1:**
-
-```plaintext
-Input:
-k = 0
- 1
- / \
- 3 2
-Output:
-1
-Explanation:
-1 is the only node which is 0 distance from the root 1.
-```
-
-**Example 2:**
-
-```plaintext
-Input:
-k = 3
- 1
- /
- 2
- \
- 1
- / \
- 5 3
-Output:
-5 3
-Explanation:
-5 and 3 are the nodes which are at distance 3 from the root 3.
-Here, returning 3 5 will be incorrect.
-```
-
-
-### Constraints
-
-- $1 \leq$ n $\leq10^4$
-- $0 \leq$ k $\leq30$
-
-## Solution
-
-### Intuition and Approach
-
-The problem can be solved by using BFS traversal.This approach combines setting parent references to enable upward traversal and performing a breadth-first search to find nodes at the specified distance.
-Adding parent references to each node, we can easily move from a node to its parent, facilitating traversal in all directions (up, left, right).
-Starting from the target node, we explore all nodes at increasing distances.
-By keeping track of visited nodes, we ensure that each node is processed only once, preventing cycles and redundant work.
-When the distance from the target node matches k, we add the node's value to the result list.
-
-### Approach: BFS
-1. We will first create a helper function make_parent that recursively traverses the tree, setting a parent attribute for each node. This allows upward traversal.Then we call make_parent with the root node and None as the parent.
-2. We then initialize data structures
- - ans: A list to store the values of nodes at distance k from the target node.
- - seen: A set to track visited nodes and prevent reprocessing.
-3. We will create a recursive traversal function trav. This function takes the current node and the distance from the target node as arguments.
- - If the current node is None, already visited, or the distance exceeds k, the function returns.
- - Add the current node to the seen set to mark it as visited.
- - If the current distance matches k, add the node's value to the ans list.
- - Then recursively call trav for the parent, left child, and right child, increasing the distance by 1 for each call.
-4. Start the traversal from the root node with an initial distance of 0.
-5. Return the ans list containing the values of nodes at distance k from the root.
-
-### Code in Python
-```python
-class Solution:
- def KDistance(self,root,k):
- '''
- :param root: root of given tree.
- :param k: distance k from root
- :return: list of all nodes that are at distance k from root.
- '''
- # code here
- def make_parent(node,parent):
- if not node:
- return
- node.parent=parent
- make_parent(node.left,node)
- make_parent(node.right,node)
-
- make_parent(root,None)
- ans=[]
- seen=set()
-
- def trav(node,dist):
- if not node or node in seen or dist>k:
- return
- seen.add(node)
- if dist==k:
- ans.append(node.data)
- return
- trav(node.parent,dist+1)
- trav(node.left,dist+1)
- trav(node.right,dist+1)
- trav(root,0)
- return ans
-```
-
-### Complexity Analysis
-
-- **Time Complexity:** $O(N)$
-- **Space Complexity:** $O(N)$
-
diff --git a/dsa-solutions/gfg-solutions/easy/remove-duplicates.md b/dsa-solutions/gfg-solutions/easy/remove-duplicates.md
deleted file mode 100644
index 47b534eb1..000000000
--- a/dsa-solutions/gfg-solutions/easy/remove-duplicates.md
+++ /dev/null
@@ -1,72 +0,0 @@
----
-id: remove-duplicates
-title: Remove Duplicates
-sidebar_label: 0107-Remoeve Duplicates
-tags:
- - Strings
- - Data Structures
-description: "A solution to the problem of finding the unique characters in the given string"
----
-
-In this page, we will solve the problem of finding the unique characters in the given string.
-
-## Problem Description
-
-Given a string without spaces, the task is to remove duplicates from it.
-
-Note: The original order of characters must be kept the same.
-
-### Examples
-
-**Example 1:**
-
-```plaintext
-Input: S = "zvvo"
-Output: "zvo"
-Explanation: Only keep the first
-occurrence
-```
-
-**Example 2:**
-
-```plaintext
-Input: S = "gfg"
-Output: gf
-Explanation: Only keep the first
-occurrence
-```
-
-### Constraints
-
-- $1 \leq$ |S| $\leq10^5$
-
-## Solution
-
-### Intuition and Approach
-
-This problem can be solved by using an empty string and traversing the given string and storing the unique element in the empty string and then return it.
-
-### Approach:
-
-1. The variable res is initialized to an empty string. This string will store the characters of S without duplicates.
-2. We then Iterate through the input string:
- - The for loop iterates through each character i in the string S.
- - Inside the loop, there is an if statement that checks if the character i is not already in the result string ans.
- If i is not in res, it means this character hasn't been added yet.and so we add unique characters in res variable
-3. After the loop completes, the method returns the result string res, which now contains the characters of S without duplicates, in the order of their first appearance.
-#### Code in Python
-```python
-
-class Solution:
- def removeDups(self, S):
- res=''
- for i in S:
- if i not in res:
- res+=i
- return res
- ```
-
-#### Complexity Analysis
-
-- **Time Complexity:** $O(N^2)$
-- **Space Complexity:** $O(N)$
diff --git a/dsa-solutions/gfg-solutions/easy/reverse-a-doubly-linked-list.md b/dsa-solutions/gfg-solutions/easy/reverse-a-doubly-linked-list.md
deleted file mode 100644
index 712014b4e..000000000
--- a/dsa-solutions/gfg-solutions/easy/reverse-a-doubly-linked-list.md
+++ /dev/null
@@ -1,78 +0,0 @@
----
-id: reverse-a-doubly-linked-list
-title: Reverse a Doubly Linked List
-sidebar_label: 0105-Reverse a Doubly Linked List
-
-tags:
- - doubly-linked-list
- - Linked List
- - Data Structures
-description: "A solution to the problem of reversing a doubly linked list "
----
-
-In this page, we will solve the problem of reversing a doubly linked list.
-
-## Problem Description
-
-Given a doubly linked list of n elements. Your task is to reverse the doubly linked list in-place.
-
-### Examples
-
-**Example 1:**
-
-```plaintext
-Input:
-LinkedList: 3 <--> 4 <--> 5
-Output: 5 4 3
-```
-
-**Example 2:**
-
-```plaintext
-Input:
-LinkedList: 75 <--> 122 <--> 59 <--> 196
-Output: 196 59 122 75
-```
-
-### Constraints
-
-- $1 \leq$ number of nodes $\leq10^4$
-- $0 \leq$ value of nodes $\leq 10^4$
-
-## Solution
-
-### Intuition and Approach
-
-This problem can be solved by iterating over the doubly linked list and interchanging the prev and the next pointer and then return the last node
-
-
-### Approach: Inorder Traversal
-
-1. Base Case: we first checks if the head of the list is None, which means the list is empty and so we returns None.
-2. Base Case: we then checks if the head.next is None, which means there is only one node in the list. If so, it returns the head itself, as reversing a single node doesn't change anything.
-3. we next initializes two pointers: curr which is set to head, and prev which is set to None. curr will be used to traverse the list, and prev will eventually point to the new head of the reversed list.
-4. Then we run a while loop until curr becomes None, meaning it has traversed the entire list. Inside the loop:
- - prev is updated to curr, keeping track of the last processed node.
- - then current node's next and prev pointers are swapped to reverse the direction of the list.
- - curr is then moved to the original prev node, which is now curr.next after the swap.
-5. Once the loop finishes, prev will be pointing to the new head of the reversed list and so we returned prev.
-#### Code in Python
-```python
-class Solution:
- def reverseDLL(self, head):
- if head==None:return None
- if head.next==None:
- return head
- curr=head
- prev=None
- while curr!=None:
- prev=curr
- curr.next,curr.prev=curr.prev,curr.next
- curr=curr.prev
- return prev
-```
-
-#### Complexity Analysis
-
-- **Time Complexity:** $O(N)$
-- **Space Complexity:** $O(1)$
diff --git a/dsa-solutions/gfg-solutions/easy/rightmost-different-bit.md b/dsa-solutions/gfg-solutions/easy/rightmost-different-bit.md
deleted file mode 100644
index 128af7679..000000000
--- a/dsa-solutions/gfg-solutions/easy/rightmost-different-bit.md
+++ /dev/null
@@ -1,71 +0,0 @@
----
-id: rightmost-different-bit
-title: Rightmost Different Bit
-sidebar_label: 0106-Rightmost Different Bit
-tags:
- - Bit Magic
- - Data Structures
-description: "A solution to the problem of finding the rightmost position of the bit which is different in both numbers"
----
-
-In this page, we will solve the problem of finding the rightmost position of the bit which is different in both numbers.
-
-## Problem Description
-
-Given two numbers M and N. The task is to find the position of the rightmost different bit in the binary representation of numbers. If both M and N are the same then return -1 in this case.
-
-### Examples
-
-**Example 1:**
-
-```plaintext
-Input:
-M = 11, N = 9
-Output:
-2
-Explanation:
-Binary representation of the given numbers are: 1011 and 1001, 2nd bit from right is different.
-```
-
-**Example 2:**
-
-```plaintext
-Input:
-M = 52, N = 4
-Output:
-5
-Explanation:
-Binary representation of the given numbers are: 110100 and 0100, 5th-bit from right is different.
-```
-
-### Constraints
-
-- $1 \leq$ M,N $\leq10^9$
-
-## Solution
-
-### Intuition and Approach
-
-This problem can be solved by using bitwise operations
-
-### Approach:
-
-1. We will first XOR operation (^) between two integers, it will produce a result where each bit is set to 1 if the corresponding bits of m and n are different, and 0 if they are the same and then the result is stored in res variable
-2. If res is 0, it means that m and n are identical and therefore we return -1 to indicate that there is no differing bit.
-3. Now, To identify the position of the rightmost bit that is set to 1, the expression res & -res is used. This operation isolates the rightmost 1 bit in res. This works because -res is the two’s complement of res, which flips all bits of res and adds 1.
-4. Then we use math.log2(res & -res) which computes the base-2 logarithm of the isolated rightmost 1 bit and gives the zero-based index of the rightmost differing bit.
-5. Next we will add 1 converts this index to a one-based position and returned position.
-#### Code in Python
-```python
-
-class Solution:
- def posOfRightMostDiffBit(self,m,n):
- res = m^n
- if res==0: return -1
- return math.log2(res & -res) + 1
- ```
-
-#### Complexity Analysis
-
-- **Time Complexity:** $O(1)$
-- **Space Complexity:** $O(1)$
diff --git a/dsa-solutions/gfg-solutions/problems/BFS-traversal-of-graph.md b/dsa-solutions/gfg-solutions/problems/BFS-traversal-of-graph.md
deleted file mode 100644
index fdfdd1a77..000000000
--- a/dsa-solutions/gfg-solutions/problems/BFS-traversal-of-graph.md
+++ /dev/null
@@ -1,144 +0,0 @@
----
-id: BFS-traversal-of-graph
-title: BFS Traversal of Graph (Geeks for Geeks)
-sidebar_label: BFS Traversal of Graph
-tags:
- - Intermediate
- - Graph
- - Breadth-First Search
- - Geeks for Geeks
- - CPP
- - Python
- - DSA
-description: "This is a solution to the BFS Traversal of Graph problem on Geeks for Geeks."
----
-
-## Problem Description
-
-Given a graph, perform Breadth-First Search (BFS) traversal starting from a given source vertex.
-
-## Examples
-
-**Example:**
-
-Consider the following graph:
-
-```
- 1
- / \
- 2 3
- / \
- 4 5
-```
-
-**Output:** 1 2 3 4 5
-
-## Your Task
-
-Your task is to complete the function `bfs()`, which takes the graph, the number of vertices, and the source vertex as its arguments and prints the BFS traversal of the graph starting from the source vertex.
-
-Expected Time Complexity: $O(V + E)$, where V is the number of vertices and E is the number of edges in the graph.
-Expected Auxiliary Space: $O(V)$.
-
-## Constraints
-
-- $1 <= number of vertices <= 10^3$
-- $0 <= value of vertices <= 10^3$
-
-## Problem Explanation
-
-Here's the step-by-step breakdown of the BFS traversal process:
-
-1. **Initialize visited array**: Create a visited array to keep track of visited vertices.
-2. **Initialize queue**: Create a queue to store vertices to be visited next.
-3. **Perform BFS**: Start BFS traversal from the source vertex.
-4. **Enqueue source**: Enqueue the source vertex into the queue and mark it as visited.
-5. **Process vertices**: While the queue is not empty, dequeue a vertex, print it, and enqueue its unvisited adjacent vertices.
-
-### Code Implementation
-
-
-
-
- ```python
- from collections import deque
-
- def bfs(graph, v, source):
- visited = [False] * v
- queue = deque([source])
- visited[source] = True
-
- while queue:
- u = queue.popleft()
- print(u, end=" ")
-
- for neighbor in graph[u]:
- if not visited[neighbor]:
- visited[neighbor] = True
- queue.append(neighbor)
-
- def bfsTraversal(graph, V, source):
- bfs(graph, V, source)
- ```
-
-
-
-
- ```cpp
- #include
- #include
- #include
- #include
- using namespace std;
-
- void bfs(vector graph[], int v, int source) {
- bool visited[v];
- memset(visited, false, sizeof(visited));
- queue q;
-
- q.push(source);
- visited[source] = true;
-
- while (!q.empty()) {
- int u = q.front();
- q.pop();
- cout << u << " ";
-
- for (int neighbor : graph[u]) {
- if (!visited[neighbor]) {
- visited[neighbor] = true;
- q.push(neighbor);
- }
- }
- }
- }
-
- void bfsTraversal(vector graph[], int V, int source) {
- bfs(graph, V, source);
- }
- ```
-
-
-
-## Solution Logic
-
-1. **Initialize visited array and queue**: Create an array to mark visited vertices initially as False and a queue to store vertices to be visited.
-2. **Perform BFS**: Start BFS traversal from the source vertex.
-3. **Enqueue source**: Enqueue the source vertex into the queue and mark it as visited.
-4. **Process vertices**: While the queue is not empty, dequeue a vertex, print it, and enqueue its unvisited adjacent vertices.
-
-## Time Complexity
-
-$O(V + E)$, where V is the number of vertices and E is the number of edges in the graph. Each vertex and edge are visited only once.
-
-## Space Complexity
-
-$O(V)$, where V is the number of vertices. The space is used to store the visited array and the queue.
-
-## Resources
-
-- **GFG Problem:** [GFG Problem](https://www.geeksforgeeks.org/breadth-first-search-or-bfs-for-a-graph/)
-- **LeetCode Problem:** [LeetCode Problem](https://leetcode.com/problems/number-of-connected-components-in-an-undirected-graph/)
-- **Author's Geeks for Geeks Profile:** [MuraliDharan](https://www.geeksforgeeks.org/user/ngmuraqrdd/)
-
-This format ensures that all necessary details about the problem and its solution are clearly presented and easy to follow.
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/problems/Check-for-balanced-tree.md b/dsa-solutions/gfg-solutions/problems/Check-for-balanced-tree.md
deleted file mode 100644
index fe0f3aca8..000000000
--- a/dsa-solutions/gfg-solutions/problems/Check-for-balanced-tree.md
+++ /dev/null
@@ -1,146 +0,0 @@
----
-id: Check-for-balanced-tree
-title: Check for Balanced Tree (Geeks for Geeks)
-sidebar_label: Check for Balanced Tree
-tags:
- - Intermediate
- - Tree
- - Geeks for Geeks
- - CPP
- - Python
- - DSA
-description: "This is a solution to the Check for Balanced Tree problem on Geeks for Geeks."
----
-
-## Problem Description
-
-Given a binary tree, determine if it is height-balanced. A binary tree is height-balanced if the left and right subtrees of every node differ in height by no more than 1.
-
-## Examples
-
-**Example 1:**
-```
-Input:
- 1
- / \
- 2 3
- / \
- 4 5
-Output: Yes
-```
-
-**Example 2:**
-```
-Input:
- 10
- / \
- 20 30
- / \
- 40 60
- \
- 70
-Output: No
-```
-
-## Your Task
-
-Your task is to complete the function `isBalanced()`, which takes the root of the binary tree as its argument and returns a boolean value indicating whether the tree is balanced or not.
-
-Expected Time Complexity: $O(N)$.
-Expected Auxiliary Space: $O(h)$, where h is the height of the tree.
-
-## Constraints
-
-- $1 <= number of nodes <= 10^5$
-- $1 <= data of node <= 10^5$
-
-## Problem Explanation
-
-Here's the step-by-step breakdown of the checking process:
-
-1. **Recursive depth calculation**: Create a helper function to calculate the depth of each subtree.
-2. **Height difference check**: Check the difference in height between the left and right subtrees.
-3. **Recursive balance check**: Recursively check if each subtree is balanced.
-4. **Return result**: Return True if the tree is balanced, otherwise False.
-
-### Code Implementation
-
-
-
-
- ```py
- class TreeNode:
- def __init__(self, val=0, left=None, right=None):
- self.val = val
- self.left = left
- self.right = right
-
- def isBalanced(root):
- def check(root):
- if not root:
- return 0, True
- left_height, left_balanced = check(root.left)
- right_height, right_balanced = check(root.right)
- balanced = left_balanced and right_balanced and abs(left_height - right_height) <= 1
- return max(left_height, right_height) + 1, balanced
-
- return check(root)[1]
- ```
-
-
-
-
- ```cpp
- struct TreeNode {
- int val;
- TreeNode *left;
- TreeNode *right;
- TreeNode(int x) : val(x), left(NULL), right(NULL) {}
- };
-
- class Solution {
- public:
- bool isBalanced(TreeNode* root) {
- return checkHeight(root) != -1;
- }
-
- int checkHeight(TreeNode* root) {
- if (root == NULL) return 0;
-
- int leftHeight = checkHeight(root->left);
- if (leftHeight == -1) return -1;
-
- int rightHeight = checkHeight(root->right);
- if (rightHeight == -1) return -1;
-
- if (abs(leftHeight - rightHeight) > 1) return -1;
-
- return max(leftHeight, rightHeight) + 1;
- }
- };
- ```
-
-
-
-## Solution Logic
-
-1. **Recursive depth calculation**: A helper function calculates the height of the subtree rooted at each node.
-2. **Height difference check**: For each node, the function checks if the height difference between the left and right subtrees is more than 1.
-3. **Recursive balance check**: The function is recursively called on each subtree to ensure both are balanced.
-4. **Return result**: The function returns True if all nodes are balanced, otherwise False.
-
-## Time Complexity
-
-$O(N)$, where N is the number of nodes in the tree. The function visits each node once.
-
-## Space Complexity
-
-$O(h)$, where h is the height of the tree. This is due to the recursive stack space used during the depth-first traversal.
-
-## Resources
-
-- **GFG Problem:** [GFG Problem](https://www.geeksforgeeks.org/how-to-determine-if-a-binary-tree-is-balanced/)
-- **LeetCode Problem:** [LeetCode Problem](https://leetcode.com/problems/balanced-binary-tree/)
-- **Author's Geeks for Geeks Profile:** [MuraliDharan](https://www.geeksforgeeks.org/user/ngmuraqrdd/)
-
-This format ensures that all necessary details about the problem and its solution are clearly presented and easy to follow.
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/problems/DFS-traversal-of-graph.md b/dsa-solutions/gfg-solutions/problems/DFS-traversal-of-graph.md
deleted file mode 100644
index 6ae069d50..000000000
--- a/dsa-solutions/gfg-solutions/problems/DFS-traversal-of-graph.md
+++ /dev/null
@@ -1,126 +0,0 @@
----
-id: DFS-traversal-of-graph
-title: DFS Traversal of Graph (Geeks for Geeks)
-sidebar_label: DFS Traversal of Graph
-tags:
- - Intermediate
- - Graph
- - Depth-First Search
- - Geeks for Geeks
- - CPP
- - Python
- - DSA
-description: "This is a solution to the DFS Traversal of Graph problem on Geeks for Geeks."
----
-
-## Problem Description
-
-Given a graph, perform Depth-First Search (DFS) traversal starting from a given source vertex.
-
-## Examples
-
-**Example:**
-
-Consider the following graph:
-
-```
- 1
- / \
- 2 3
- / \
- 4 5
-```
-
-**Output:** 1 2 4 5 3
-
-## Your Task
-
-Your task is to complete the function `dfs()`, which takes the graph, the number of vertices, and the source vertex as its arguments and prints the DFS traversal of the graph starting from the source vertex.
-
-Expected Time Complexity: $O(V + E)$, where V is the number of vertices and E is the number of edges in the graph.
-Expected Auxiliary Space: $O(V)$.
-
-## Constraints
-
-- $1 <= number of vertices <= 10^3$
-- $0 <= value of vertices <= 10^3$
-
-## Problem Explanation
-
-Here's the step-by-step breakdown of the DFS traversal process:
-
-1. **Initialize visited array**: Create a visited array to keep track of visited vertices.
-2. **Perform DFS**: Start DFS traversal from the source vertex.
-3. **Mark visited**: Mark the current vertex as visited and print it.
-4. **Visit neighbors**: Recursively visit all the adjacent vertices of the current vertex that are not visited yet.
-
-### Code Implementation
-
-
-
-
- ```python
- def dfs(graph, v, visited, source):
- visited[source] = True
- print(source, end=" ")
-
- for u in graph[source]:
- if not visited[u]:
- dfs(graph, v, visited, u)
-
- def dfsTraversal(graph, V, source):
- visited = [False] * V
- dfs(graph, V, visited, source)
- ```
-
-
-
-
- ```cpp
- #include
- #include
- #include
- using namespace std;
-
- void dfs(vector graph[], int v, bool visited[], int source) {
- visited[source] = true;
- cout << source << " ";
-
- for (int u : graph[source]) {
- if (!visited[u]) {
- dfs(graph, v, visited, u);
- }
- }
- }
-
- void dfsTraversal(vector graph[], int V, int source) {
- bool visited[V];
- memset(visited, false, sizeof(visited));
- dfs(graph, V, visited, source);
- }
- ```
-
-
-
-## Solution Logic
-
-1. **Initialize visited array**: Create an array to mark visited vertices initially as False.
-2. **Perform DFS**: Start DFS traversal from the source vertex.
-3. **Mark visited and print**: Mark the current vertex as visited and print it.
-4. **Visit neighbors**: Recursively visit all the adjacent vertices of the current vertex that are not visited yet.
-
-## Time Complexity
-
-$O(V + E)$, where V is the number of vertices and E is the number of edges in the graph. Each vertex and edge are visited only once.
-
-## Space Complexity
-
-$O(V)$, where V is the number of vertices. The space is used to store the visited array.
-
-## Resources
-
-- **GFG Problem:** [GFG Problem](https://www.geeksforgeeks.org/depth-first-search-or-dfs-for-a-graph/)
-- **LeetCode Problem:** [LeetCode Problem](https://leetcode.com/problems/number-of-connected-components-in-an-undirected-graph/)
-- **Author's Geeks for Geeks Profile:** [MuraliDharan](https://www.geeksforgeeks.org/user/ngmuraqrdd/)
-
-This format ensures that all necessary details about the problem and its solution are clearly presented and easy to follow.
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/problems/Delete-middle-of-linked-list.md b/dsa-solutions/gfg-solutions/problems/Delete-middle-of-linked-list.md
deleted file mode 100644
index 53d452012..000000000
--- a/dsa-solutions/gfg-solutions/problems/Delete-middle-of-linked-list.md
+++ /dev/null
@@ -1,139 +0,0 @@
----
-id: Delete-middle-of-linked-list
-title: Delete Middle of Linked List (Geeks for Geeks)
-sidebar_label: Delete Middle of Linked List
-tags:
- - Intermediate
- - Linked List
- - Geeks for Geeks
- - CPP
- - Python
- - DSA
-description: "This is a solution to the Delete Middle of Linked List problem on Geeks for Geeks."
----
-
-## Problem Description
-
-Given a singly linked list, delete the middle node of the linked list. If the list has an even number of nodes, delete the second middle node.
-
-## Examples
-
-**Example 1:**
-```
-Input:
-LinkedList: 1 -> 2 -> 3 -> 4 -> 5
-Output: 1 -> 2 -> 4 -> 5
-```
-
-**Example 2:**
-```
-Input:
-LinkedList: 1 -> 2 -> 3 -> 4
-Output: 1 -> 2 -> 4
-```
-
-## Your Task
-
-Your task is to complete the function `deleteMid()`, which takes the head of the linked list as its argument and returns the head of the modified list after the middle node has been deleted.
-
-Expected Time Complexity: $O(N)$.
-Expected Auxiliary Space: $O(1)$.
-
-## Constraints
-
-- $1 <= number of nodes <= 10^3$
-- $1 <= value of nodes <= 10^3$
-
-## Problem Explanation
-
-Here's the step-by-step breakdown of the deletion process:
-
-1. **Find middle node**: Use two pointers (slow and fast) to find the middle node of the linked list.
-2. **Update pointers**: Update the next pointer of the node just before the middle node to skip the middle node.
-3. **Delete middle node**: Remove the middle node by updating pointers.
-
-### Code Implementation
-
-
-
-
- ```py
- class ListNode:
- def __init__(self, val=0, next=None):
- self.val = val
- self.next = next
-
- def deleteMid(head):
- if not head or not head.next:
- return None
-
- slow = head
- fast = head
- prev = None
-
- while fast and fast.next:
- prev = slow
- slow = slow.next
- fast = fast.next.next
-
- if prev:
- prev.next = slow.next
-
- return head
- ```
-
-
-
-
- ```cpp
- struct ListNode {
- int val;
- ListNode *next;
- ListNode(int x) : val(x), next(NULL) {}
- };
-
- ListNode* deleteMid(ListNode* head) {
- if (!head || !head->next) return NULL;
-
- ListNode* slow = head;
- ListNode* fast = head;
- ListNode* prev = NULL;
-
- while (fast && fast->next) {
- prev = slow;
- slow = slow->next;
- fast = fast->next->next;
- }
-
- if (prev) {
- prev->next = slow->next;
- }
-
- delete slow;
- return head;
- }
- ```
-
-
-
-## Solution Logic
-
-1. **Find middle node**: Initialize two pointers, slow and fast. Move the slow pointer one step at a time and the fast pointer two steps at a time.
-2. **Update pointers**: When the fast pointer reaches the end, the slow pointer will be at the middle node. Keep track of the node just before the middle node using a previous pointer.
-3. **Delete middle node**: Update the next pointer of the previous node to skip the middle node, effectively deleting it from the list.
-
-## Time Complexity
-
-$O(N)$, where N is the number of nodes in the list. The function traverses the list once to find the middle node.
-
-## Space Complexity
-
-$O(1)$, constant space complexity. The algorithm uses only a few additional pointers for traversal and modification, which does not depend on the input size.
-
-## Resources
-
-- **GFG Problem:** [GFG Problem](https://www.geeksforgeeks.org/delete-middle-of-linked-list/)
-- **LeetCode Problem:** [LeetCode Problem](https://leetcode.com/problems/delete-the-middle-node-of-a-linked-list/)
-- **Author's Geeks for Geeks Profile:** [MuraliDharan](https://www.geeksforgeeks.org/user/ngmuraqrdd/)
-
-This format ensures that all necessary details about the problem and its solution are clearly presented and easy to follow.
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/problems/Delete-without-head-pointer.md b/dsa-solutions/gfg-solutions/problems/Delete-without-head-pointer.md
deleted file mode 100644
index d805d9e15..000000000
--- a/dsa-solutions/gfg-solutions/problems/Delete-without-head-pointer.md
+++ /dev/null
@@ -1,107 +0,0 @@
----
-id: Delete-without-head-pointer
-title: Delete without Head Pointer (Geeks for Geeks)
-sidebar_label: Delete without Head Pointer
-tags:
- - Beginner
- - Linked List
- - Geeks for Geeks
- - CPP
- - Python
- - DSA
-description: "This is a solution to the Delete without head pointer problem on Geeks for Geeks."
----
-
-## Problem Description
-
-You are given a pointer/reference to a node to be deleted in a singly linked list. The task is to delete the node. Given you don't have access to the head of the linked list, you only have access to that node directly.
-
-Note: The solution should not be tail and it should be done in constant time.
-
-## Examples
-
-**Example 1:**
-```
-Input:
-LinkedList: 1 -> 2 -> 3 -> 4
-Node to be deleted: 3
-Output: 1 2 4
-```
-
-**Example 2:**
-```
-Input:
-LinkedList: 10 -> 20 -> 4 -> 30
-Node to be deleted: 20
-Output: 10 4 30
-```
-
-## Your Task
-
-Your task is to complete the function `deleteNode()`, which takes a reference to the node to be deleted and modifies the linked list directly. You should not return anything from the function.
-
-Expected Time Complexity: $O(1)$.
-Expected Auxiliary Space: $O(1)$.
-
-## Constraints
-
-- $2 <= number of nodes <= 10^3$
-- $1 <= value of nodes <= 10^3$
-
-## Problem Explanation
-
-Here's the step-by-step breakdown of the deletion process:
-
-1. **Copy data**: Copy the data from the next node to the current node to be deleted.
-2. **Skip next node**: Change the next pointer of the current node to point to the next of the next node.
-3. **Effectively delete**: The next node is effectively deleted as its data is copied to the current node and it is skipped in the list.
-
-### Code Implementation
-
-
-
-
- ```py
- def deleteNode(node):
- if node.next:
- node.data = node.next.data
- node.next = node.next.next
- ```
-
-
-
-
- ```cpp
- void deleteNode(Node *node) {
- if (node->next) {
- Node* temp = node->next;
- node->data = temp->data;
- node->next = temp->next;
- delete temp;
- }
- }
- ```
-
-
-
-## Solution Logic
-
-1. **Copy data from next node**: The data of the node to be deleted is replaced with the data of the next node.
-2. **Skip the next node**: The next pointer of the current node is updated to point to the node after the next node.
-3. **Delete next node**: The next node is effectively removed from the list.
-
-## Time Complexity
-
-$O(1)$, since the node is deleted in constant time by copying the data and updating pointers.
-
-## Space Complexity
-
-$O(1)$, constant space complexity, as no extra space is used beyond a few pointers.
-
-## Resources
-
-- **GFG Problem:** [GFG Problem](https://www.geeksforgeeks.org/delete-without-head-pointer/)
-- **HackerRank Problem:** [HackerRank](https://www.hackerrank.com/challenges/delete-a-node-from-a-linked-list/problem)
-- **Author's LeetCode Profile:** [MuraliDharan](https://www.geeksforgeeks.org/user/ngmuraqrdd/)
-
-This format ensures that all necessary details about the problem and its solution are clearly presented and easy to follow.
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/problems/Implement-two-stacks-in-an-array.md b/dsa-solutions/gfg-solutions/problems/Implement-two-stacks-in-an-array.md
deleted file mode 100644
index 2e603944c..000000000
--- a/dsa-solutions/gfg-solutions/problems/Implement-two-stacks-in-an-array.md
+++ /dev/null
@@ -1,202 +0,0 @@
----
-id: Implement-two-stacks-in-an-array
-title: Implement Two Stacks in an Array (Geeks for Geeks)
-sidebar_label: Implement Two Stacks in an Array
-tags:
- - Intermediate
- - Stack
- - Array
- - Geeks for Geeks
- - CPP
- - Python
- - DSA
-description: "This is a solution to the Implement Two Stacks in an Array problem on Geeks for Geeks."
----
-
-## Problem Description
-
-You are given a single array of size `N`. You need to implement two stacks in this array efficiently.
-
-## Examples
-
-**Example 1:**
-```
-Input:
-push1(2)
-push1(3)
-push2(4)
-pop1()
-pop2()
-Output:
-3 4
-```
-
-**Example 2:**
-```
-Input:
-push1(1)
-push2(2)
-push1(3)
-pop1()
-pop2()
-Output:
-3 2
-```
-
-## Your Task
-
-Your task is to complete the class `TwoStacks` which should contain the following functions:
-- `void push1(int x)`: Pushes `x` into the first stack.
-- `void push2(int x)`: Pushes `x` into the second stack.
-- `int pop1()`: Pops the top element from the first stack and returns it. Returns `-1` if the first stack is empty.
-- `int pop2()`: Pops the top element from the second stack and returns it. Returns `-1` if the second stack is empty.
-
-Expected Time Complexity: $O(1)$ for all the operations.
-Expected Auxiliary Space: $O(1)$ for all the operations.
-
-## Constraints
-
-- $1 <= N <= 100$
-- $1 <= x <= 100$
-
-## Problem Explanation
-
-Here's the step-by-step breakdown of implementing two stacks in a single array:
-
-1. **Initialize pointers**: Use two pointers, one for each stack.
-2. **Push operations**: Ensure elements are pushed to the respective stack areas.
-3. **Pop operations**: Ensure elements are popped from the respective stack areas.
-4. **Check overflow and underflow**: Ensure proper checks for stack overflow and underflow.
-
-### Code Implementation
-
-
-
-
- ```python
- class TwoStacks:
- def __init__(self, n): # Initialize n as the size of array
- self.size = n
- self.arr = [None] * n
- self.top1 = -1
- self.top2 = n
-
- def push1(self, x):
- if self.top1 < self.top2 - 1:
- self.top1 += 1
- self.arr[self.top1] = x
- else:
- print("Stack Overflow")
-
- def push2(self, x):
- if self.top1 < self.top2 - 1:
- self.top2 -= 1
- self.arr[self.top2] = x
- else:
- print("Stack Overflow")
-
- def pop1(self):
- if self.top1 >= 0:
- x = self.arr[self.top1]
- self.top1 -= 1
- return x
- else:
- return -1
-
- def pop2(self):
- if self.top2 < self.size:
- x = self.arr[self.top2]
- self.top2 += 1
- return x
- else:
- return -1
- ```
-
-
-
-
- ```cpp
- #include
- using namespace std;
-
- class TwoStacks {
- private:
- int* arr;
- int size;
- int top1, top2;
-
- public:
- TwoStacks(int n) {
- size = n;
- arr = new int[n];
- top1 = -1;
- top2 = n;
- }
-
- void push1(int x) {
- if (top1 < top2 - 1) {
- top1++;
- arr[top1] = x;
- } else {
- cout << "Stack Overflow";
- }
- }
-
- void push2(int x) {
- if (top1 < top2 - 1) {
- top2--;
- arr[top2] = x;
- } else {
- cout << "Stack Overflow";
- }
- }
-
- int pop1() {
- if (top1 >= 0) {
- int x = arr[top1];
- top1--;
- return x;
- } else {
- return -1;
- }
- }
-
- int pop2() {
- if (top2 < size) {
- int x = arr[top2];
- top2++;
- return x;
- } else {
- return -1;
- }
- }
- };
- ```
-
-
-
-## Solution Logic
-
-1. **Initialize pointers**: Use `top1` initialized to `-1` for Stack 1 and `top2` initialized to `size` for Stack 2.
-2. **Push operations**: Check for space before pushing:
- - For Stack 1, increment `top1` and insert the element.
- - For Stack 2, decrement `top2` and insert the element.
-3. **Pop operations**: Check if the stack is empty before popping:
- - For Stack 1, return the element at `top1` and decrement `top1`.
- - For Stack 2, return the element at `top2` and increment `top2`.
-4. **Check overflow and underflow**: Ensure there is no overflow by checking if `top1` is less than `top2 - 1` before pushing. Ensure no underflow by checking the pointers before popping.
-
-## Time Complexity
-
-$O(1)$ for all the operations, as the operations of push and pop involve a fixed number of steps.
-
-## Space Complexity
-
-$O(1)$ auxiliary space, as the additional space used does not depend on the input size and is constant.
-
-## Resources
-
-- **GFG Problem:** [GFG Problem](https://www.geeksforgeeks.org/implement-two-stacks-in-an-array/)
-- **Author's Geeks for Geeks Profile:** [MuraliDharan](https://www.geeksforgeeks.org/user/ngmuraqrdd/)
-
-This format ensures that all necessary details about the problem and its solution are clearly presented and easy to follow.
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/problems/Intersection-of-two-sorted-linked-lists.md b/dsa-solutions/gfg-solutions/problems/Intersection-of-two-sorted-linked-lists.md
deleted file mode 100644
index fae9e4e10..000000000
--- a/dsa-solutions/gfg-solutions/problems/Intersection-of-two-sorted-linked-lists.md
+++ /dev/null
@@ -1,141 +0,0 @@
----
-id: Intersection-of-two-sorted-linked-lists
-title: Intersection of Two Sorted Linked Lists (Geeks for Geeks)
-sidebar_label: Intersection of Two Sorted Linked Lists
-tags:
- - Intermediate
- - Linked List
- - Geeks for Geeks
- - CPP
- - Python
- - DSA
-description: "This is a solution to the Intersection of Two Sorted Linked Lists problem on Geeks for Geeks."
----
-
-## Problem Description
-
-Given two linked lists sorted in increasing order, create a new linked list representing the intersection of the two linked lists. The new linked list should be made with its own memory and be sorted in increasing order.
-
-## Examples
-
-**Example 1:**
-```
-Input:
-List1: 1 -> 2 -> 3 -> 4 -> 6
-List2: 2 -> 4 -> 6 -> 8
-Output: 2 -> 4 -> 6
-```
-
-**Example 2:**
-```
-Input:
-List1: 1 -> 2 -> 3 -> 4
-List2: 6 -> 7 -> 8 -> 9
-Output: Empty List
-```
-
-## Your Task
-
-Your task is to complete the function `findIntersection()`, which takes the heads of both linked lists as arguments and returns the head of the new linked list representing their intersection.
-
-Expected Time Complexity: $O(N + M)$, where N and M are the lengths of the two linked lists.
-Expected Auxiliary Space: $O(1)$.
-
-## Constraints
-
-- $1 <= number of nodes <= 10^5$
-- $1 <= value of nodes <= 10^5$
-
-## Problem Explanation
-
-Here's the step-by-step breakdown of finding the intersection:
-
-1. **Initialize pointers**: Start with two pointers, each pointing to the head of one linked list.
-2. **Traverse both lists**: Move through both linked lists simultaneously.
-3. **Compare nodes**: At each step, compare the current nodes of both lists.
-4. **Add common nodes**: If the nodes are the same, add it to the result list.
-5. **Advance pointers**: Move the pointer(s) accordingly based on the comparison.
-
-### Code Implementation
-
-
-
-
- ```py
- class ListNode:
- def __init__(self, val=0, next=None):
- self.val = val
- self.next = next
-
- def findIntersection(head1, head2):
- dummy = ListNode(0)
- tail = dummy
- while head1 and head2:
- if head1.val == head2.val:
- tail.next = ListNode(head1.val)
- tail = tail.next
- head1 = head1.next
- head2 = head2.next
- elif head1.val < head2.val:
- head1 = head1.next
- else:
- head2 = head2.next
- return dummy.next
- ```
-
-
-
-
- ```cpp
- struct ListNode {
- int val;
- ListNode *next;
- ListNode(int x) : val(x), next(NULL) {}
- };
-
- ListNode* findIntersection(ListNode* head1, ListNode* head2) {
- ListNode dummy(0);
- ListNode* tail = &dummy;
-
- while (head1 && head2) {
- if (head1->val == head2->val) {
- tail->next = new ListNode(head1->val);
- tail = tail->next;
- head1 = head1->next;
- head2 = head2->next;
- } else if (head1->val < head2->val) {
- head1 = head1->next;
- } else {
- head2 = head2->next;
- }
- }
- return dummy.next;
- }
- ```
-
-
-
-## Solution Logic
-
-1. **Initialize pointers**: Start with two pointers, each pointing to the head of one linked list.
-2. **Traverse both lists**: Use a while loop to move through both linked lists simultaneously.
-3. **Compare nodes**: At each step, compare the current nodes of both lists.
-4. **Add common nodes**: If the nodes are the same, add the node value to the new linked list.
-5. **Advance pointers**: Move the pointer(s) accordingly based on the comparison of node values.
-6. **Return result**: Return the head of the new linked list representing the intersection.
-
-## Time Complexity
-
-$O(N + M)$, where N and M are the lengths of the two linked lists. The function visits each node in both linked lists once.
-
-## Space Complexity
-
-$O(1)$, constant space complexity. The algorithm uses only a few additional pointers for traversal and modification, which does not depend on the input size.
-
-## Resources
-
-- **GFG Problem:** [GFG Problem](https://www.geeksforgeeks.org/intersection-of-two-sorted-linked-lists/)
-- **LeetCode Problem:** [LeetCode Problem](https://leetcode.com/problems/intersection-of-two-linked-lists/)
-- **Author's Geeks for Geeks Profile:** [MuraliDharan](https://www.geeksforgeeks.org/user/ngmuraqrdd/)
-
-This format ensures that all necessary details about the problem and its solution are clearly presented and easy to follow.
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/problems/Reverse-a-doubly-linked-list.md b/dsa-solutions/gfg-solutions/problems/Reverse-a-doubly-linked-list.md
deleted file mode 100644
index 6cd76c092..000000000
--- a/dsa-solutions/gfg-solutions/problems/Reverse-a-doubly-linked-list.md
+++ /dev/null
@@ -1,129 +0,0 @@
----
-id: Reverse-a-doubly-linked-list
-title: Reverse a Doubly Linked List (Geeks for Geeks)
-sidebar_label: Reverse a Doubly LinkedList
-tags:
- - Beginner
- - Doubly Linked List
- - Array
- - Geeks for Geeks
- - CPP
- - Python
- - DSA
-description: "This is a solution to the Reverse a Doubly linked list problem on Geeks for Geeks."
----
-
-## Problem Description
-
-Reverse a given doubly linked list in-place. This means modifying the existing list's pointers (prev and next) to achieve the reversed order without creating a new list.
-
-## Examples
-**Example 1:**
-```
-Input:
-LinkedList: 3 <--> 4 <--> 5
-Output: 5 4 3
-```
-**Example 2:**
-```
-Input:
-LinkedList: 75 <--> 122 <--> 59 <--> 196
-Output: 196 59 122 75
-```
-
-## Your Task
-
-Your task is to complete the given function reverseDLL(), which takes head reference as argument and this function should reverse the elements such that the tail becomes the new head and all pointers are pointing in the right order. You need to return the new head of the reversed list. The printing and verification is done by the driver code.
-
-Expected Time Complexity: $O(n)$.
-Expected Auxiliary Space: $O(1)$.
-
-## Constraints
-
-- $1 <= number of nodes <= 10^4$
-- $0 <= value of nodes <= 10^4$
-
-## Problem Explanation
-
-Here's the step-by-step breakdown of the reversal process:
-
-Initialization:
-
-Create two pointers: current (initially pointing to the head) and prev (initially None).
-Iteration:
-
-While current is not None:
-Store the next pointer of the current node in a temporary variable next_node.
-Reverse the pointers of the current node:
-Set the current.next pointer to prev.
-Set the current.prev pointer to next_node.
-Update the prev pointer to the current node (prev = current).
-Move the current pointer to the previously stored next_node (current = next_node).
-Update Head:
-
-After the loop, the prev pointer will be pointing to the new head of the reversed list. Return prev.
-This process effectively reverses the direction of the linked list by swapping the next and prev pointers of each node.
-
-6. Code Implementation
-
-
-
-
- ```py
-def reverse_doubly_linked_list(head):
- current = head
- prev = None
- while current:
- next_node = current.next
- current.next = prev
- current.prev = next_node
- prev = current
- current = next_node
- return prev
-```
-
-
-
-
- ```cpp
-
- Node* reverse_doubly_linked_list(Node* head) {
-
- Node* current = head;
- Node* prev = nullptr;
- while (current) {
- Node* next_node = current->next;
- current->next = prev;
- current->prev = next_node;
- prev = current;
- current = next_node;
- }
- return prev;
- }
- ```
-
-
-
-## Solution Logic
-
-1. The code iterates through the list using current.
-2. For each node, it stores the next pointer for later use and then:
-3. Reverses the next and prev pointers of the current node.
-4. Updates prev to point to the current node, preparing for the next iteration.
-5. Moves current to the previously stored next_node.
-6. After the loop, prev points to the new head of the reversed list.
-
-
-## Time Complexity
-
-$O(n)$, where n is the number of nodes in the list. This is because the loop iterates through each node once.
-
-## Space Complexity
-
-$O(1)$, constant space complexity. The algorithm uses only a few additional pointers for temporary storage, which does not depend on the input size.
-
-## Resources
-
-- **GFG Problem:** [GFG Problem](https://www.geeksforgeeks.org/problems/reverse-a-doubly-linked-list/1)
-- **HackerRank Problem:**[HackerRank](https://www.hackerrank.com/challenges/reverse-a-doubly-linked-list/problem)
-- **Authors LeetCode Profile:** [MuraliDharan](https://www.geeksforgeeks.org/user/ngmuraqrdd/)
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/problems/Reverse-a-linked-list.md b/dsa-solutions/gfg-solutions/problems/Reverse-a-linked-list.md
deleted file mode 100644
index 1fbb4f2c3..000000000
--- a/dsa-solutions/gfg-solutions/problems/Reverse-a-linked-list.md
+++ /dev/null
@@ -1,141 +0,0 @@
----
-id: Reverse-a-linked-list
-title: Reverse a Linked List (Geeks for Geeks)
-sidebar_label: Reverse a LinkedList
-tags:
- - Beginner
- - Linked List
- - Array
- - Geeks for Geeks
- - CPP
- - Python
- - DSA
-description: "This is a solution to the Reverse a linked list problem on Geeks for Geeks."
----
-
-## Problem Description
-
-Given a linked list of N nodes. The task is to reverse this list.
-You are given the head of a singly linked list. Write a function to reverse the linked list and return the new head.
-
-## Examples
-
-**Example 1:**
-```
-Input:
-LinkedList: 1->2->3->4->5->6
-Output: 6 5 4 3 2 1
-Explanation: After reversing the list,
-elements are 6->5->4->3->2->1.
-```
-
-**Example 2:**
-```
-Input:
-LinkedList: 2->7->8->9->10
-Output: 10 9 8 7 2
-Explanation: After reversing the list,
-elements are 10->9->8->7->2.
-```
-
-## Your Task
-
-The task is to complete the function reverseList() with head reference as the only argument and should return new head after reversing the list.
-
-Expected Time Complexity: $O(N)$.
-Expected Auxiliary Space: $O(1)$.
-
-## Constraints
-
-- $1 <= N <= 10^4$
-
-## Problem Explanation
-
-1. Initialize pointers: Set prev to None, temp to the head of the linked list, and front to None.
-2. Traverse the list: Iterate through the linked list until temp is None.
-3. Store the next node: Assign temp.next to front to keep track of the next node.
-4. Reverse the pointer: Set temp.next to prev to reverse the link.
-5. Move prev forward: Update prev to temp.
-6. Move temp forward: Update temp to front.
-7. Repeat steps 3-6: Continue until the entire list is reversed.
-8. Update head: Once the loop ends, prev will be the new head of the reversed list.
-9. Return the new head: Return prev as the head of the reversed linked list.
-
-## Code Implementation
-
-
-
-
- ```py
-
- def reverseList(head):
- prev = None
- curr = head
-
- while curr:
- next = curr.next
- curr.next = prev
- prev = curr
- curr = next
-
- return prev
- ```
-
-
-
-
-
- ```cpp
- class Solution
-{
- public:
- struct Node* reverseList(struct Node *head)
- {
- if(head == NULL || head->next== NULL) return head;
- Node* prev = NULL;
- Node* temp = head;
- while(temp != NULL){
- Node* front = temp->next;
- temp->next = prev;
- prev = temp;
- temp = front;
- }
- return prev;
- }
-
-};
-```
-
-
-
-
-## Solution Logic:
-
-1. Initialize pointers: Create three pointers: prev (previous), curr (current), and next (next node).
-Set prev to None and curr to the head of the linked list.
-
-2. Iterate through the list: Start a loop that continues as long as curr is not None.
-
-3. Store the next node: Inside the loop, before modifying the next pointer of the current node, store the node pointed to by curr.next in a temporary variable next. This is crucial to avoid losing track of the next node in the original order.
-
-4. Reverse the link: Update the next pointer of the current node (curr) to point to the previous node (prev). This effectively reverses the direction of the link.
-
-5. Update pointers and iterate: Set prev to the current node (prev = curr).
-Set curr to the previously stored next node (curr = next).
-By repeating these steps, you traverse the linked list, reverse the links in place, and end up with the list reversed.
-
-## Time Complexity:
-
-1. Reversing a linked list involves iterating through the list to manipulate the pointers between nodes. In the worst case, you need to visit every single node in the list to reverse the connections.
-
-2. Any efficient reversal algorithm will require at least one pass through the entire list. This takes $O(n)$ time.
-
-## Space Complexity:
-
-The space complexity is typically denoted as $O(1)$, which signifies constant space. This means the extra memory usage doesn't depend on the input size.
-
-## References
-
-- **LeetCode Problem:** [Geeks for Geeks Problem](https://www.geeksforgeeks.org/problems/reverse-a-linked-list/1?itm_source=geeksforgeeks&itm_medium=article&itm_campaign=bottom_sticky_on_article)
-- **Solution Link:** [Fascinating Number on Geeks for Geeks](https://www.geeksforgeeks.org/reverse-a-linked-list/)
-- **Authors LeetCode Profile:** [MuraliDharan](https://www.geeksforgeeks.org/user/ngmuraqrdd/)
diff --git a/dsa-solutions/gfg-solutions/problems/Square-root.md b/dsa-solutions/gfg-solutions/problems/Square-root.md
deleted file mode 100644
index 325309d6c..000000000
--- a/dsa-solutions/gfg-solutions/problems/Square-root.md
+++ /dev/null
@@ -1,137 +0,0 @@
----
-id: Find-the-square-root
-title: Find the Square Root (Geeks for Geeks)
-sidebar_label: Find the Square Root
-tags:
- - Beginner
- - Math
- - Binary Search
- - Geeks for Geeks
- - CPP
- - Python
- - DSA
-description: "This is a solution to the Find the Square Root problem on Geeks for Geeks."
----
-
-## Problem Description
-
-Given an integer x, find the square root of x. If x is not a perfect square, then return the floor value of √x.
-
-## Examples
-
-**Example 1:**
-```
-Input: x = 4
-Output: 2
-```
-
-**Example 2:**
-```
-Input: x = 8
-Output: 2
-Explanation: The square root of 8 is 2.82842..., and since we want the floor value, it is 2.
-```
-
-## Your Task
-
-Your task is to complete the function `sqrt()`, which takes an integer x as an argument and returns the floor value of its square root.
-
-Expected Time Complexity: $O(log x)$.
-Expected Auxiliary Space: $O(1)$.
-
-## Constraints
-
-- $0 <= x <= 10^9$
-
-## Problem Explanation
-
-Here's the step-by-step breakdown of finding the square root:
-
-1. **Initialize low and high**: Initialize two variables, low and high, to 0 and x, respectively.
-2. **Binary Search**: Perform binary search within the range [0, x].
-3. **Calculate mid**: Calculate the mid-point of the range.
-4. **Check square**: If mid*mid is equal to x, return mid. If mid*mid is less than x, move to the right half. Otherwise, move to the left half.
-5. **Return floor value**: Continue until the range is exhausted. The low value will give the floor of the square root.
-
-### Code Implementation
-
-
-
-
- ```python
- def sqrt(x):
- if x == 0 or x == 1:
- return x
-
- low, high = 0, x
- while low <= high:
- mid = (low + high) // 2
-
- # If mid is the perfect square root
- if mid * mid == x:
- return mid
-
- # Since we need floor, we update answer when mid*mid is less than x
- if mid * mid < x:
- low = mid + 1
- ans = mid
- else:
- high = mid - 1
- return ans
- ```
-
-
-
-
- ```cpp
- #include
- using namespace std;
-
- int sqrt(int x) {
- if (x == 0 || x == 1) return x;
-
- int low = 0, high = x, ans = 0;
- while (low <= high) {
- int mid = low + (high - low) / 2;
-
- // If mid is the perfect square root
- if (mid*mid == x)
- return mid;
-
- // Since we need floor, we update answer when mid*mid is less than x
- if (mid*mid < x) {
- low = mid + 1;
- ans = mid;
- } else {
- high = mid - 1;
- }
- }
- return ans;
- }
- ```
-
-
-
-## Solution Logic
-
-1. **Initialize low and high**: Set low to 0 and high to x.
-2. **Binary Search**: Use a binary search approach to find the square root.
-3. **Calculate mid**: Compute the mid-point of the current range.
-4. **Check square**: If mid squared equals x, return mid. If mid squared is less than x, search the right half. Otherwise, search the left half.
-5. **Return floor value**: Continue the search until low exceeds high. Return the latest computed mid that satisfies the condition as the floor of the square root.
-
-## Time Complexity
-
-$O(log x)$, where x is the input number. The binary search approach reduces the search space logarithmically.
-
-## Space Complexity
-
-$O(1)$, constant space complexity. The algorithm uses a fixed amount of extra space regardless of the input size.
-
-## Resources
-
-- **GFG Problem:** [GFG Problem](https://www.geeksforgeeks.org/square-root-of-an-integer/)
-- **LeetCode Problem:** [LeetCode Problem](https://leetcode.com/problems/sqrtx/)
-- **Author's Geeks for Geeks Profile:** [MuraliDharan](https://www.geeksforgeeks.org/user/ngmuraqrdd/)
-
-This format ensures that all necessary details about the problem and its solution are clearly presented and easy to follow.
\ No newline at end of file
diff --git a/dsa-solutions/gfg-solutions/problems/_category_.json b/dsa-solutions/gfg-solutions/problems/_category_.json
deleted file mode 100644
index 59f1d11f7..000000000
--- a/dsa-solutions/gfg-solutions/problems/_category_.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "label": "Easy problems GFG",
- "position": 10,
- "link": {
- "type": "generated-index",
- "description": "Solutions categorised by Problems in Easy problem folder"
- }
- }
\ No newline at end of file
diff --git a/dsa-solutions/index.md b/dsa-solutions/index.md
deleted file mode 100644
index 5967e2960..000000000
--- a/dsa-solutions/index.md
+++ /dev/null
@@ -1,50 +0,0 @@
----
-title: Data Structures and Algorithms Solutions
-sidebar_label: DSA Solutions
-sidebar_position: 1
----
-
-In this section, you will learn about the solutions of the problems of Data Structures and Algorithms.
-
-## Data Structures
-
-- [Array](#): Array is a collection of elements of the same type placed in contiguous memory locations that can be individually referenced by adding an index to a unique identifier.
-- [String](#): A string is a sequence of characters.
-- [Linked List](#): A linked list is a linear data structure, in which the elements are not stored at contiguous memory locations.
-- [Stack](#): A stack is a linear data structure that follows the Last In First Out (LIFO) principle.
-- [Queue](#): A queue is a linear data structure that follows the First In First Out (FIFO) principle.
-- [Tree](#): A tree is a non-linear data structure that is used to store data in a hierarchical manner.
-- [Graph](#): A graph is a non-linear data structure that consists of a finite set of vertices and edges.
-- [Hashing](#): Hashing is a technique that is used to uniquely identify a specific object from a group of similar objects.
-- [Heap](#): A heap is a complete binary tree that satisfies the heap property.
-- [Trie](#): A trie is a tree-like data structure that is used to store a dynamic set of strings.
-
-## Algorithms
-
-- [Searching](#): Searching is the process of finding a specific element in a collection of elements.
-- [Sorting](#): Sorting is the process of arranging the elements of a collection in a specific order.
-- [Recursion](#): Recursion is a technique in which a function calls itself to solve a smaller instance of the same problem.
-- [Dynamic Programming](#): Dynamic Programming is a technique used to solve problems by breaking them down into smaller subproblems.
-- [Greedy Algorithms](#): Greedy Algorithms are algorithms that make a series of choices that are locally optimal at each step.
-- [Backtracking](#): Backtracking is a technique used to solve problems by making a series of choices and backtracking when a choice leads to a dead end.
-- [Divide and Conquer](#): Divide and Conquer is a technique used to solve problems by breaking them down into smaller subproblems, solving the subproblems, and combining the solutions to solve the original problem.
-- [Bit Manipulation](#): Bit Manipulation is the act of algorithmically manipulating bits or binary digits.
-- [Graph Algorithms](#): Graph Algorithms are algorithms that operate on graphs to solve problems.
-- [Mathematical Algorithms](#): Mathematical Algorithms are algorithms that solve mathematical problems.
-- [String Algorithms](../dsa/category/string-algorithms): String Algorithms are algorithms that operate on strings to solve problems.
-
-## Problems
-
-- [LeetCode](#): LeetCode is a platform that provides a collection of coding problems to practice and improve your coding skills.
-- [HackerRank](#): HackerRank is a platform that provides a collection of coding problems to practice and improve your coding skills.
-- [Codeforces](#): Codeforces is a platform that provides a collection of coding problems to practice and improve your coding skills.
-- [CodeChef](#): CodeChef is a platform that provides a collection of coding problems to practice and improve your coding skills.
-- [AtCoder](#): AtCoder is a platform that provides a collection of coding problems to practice and improve your coding skills.
-- [TopCoder](#): TopCoder is a platform that provides a collection of coding problems to practice and improve your coding skills.
-- [InterviewBit](#): InterviewBit is a platform that provides a collection of coding problems to practice and improve your coding skills.
-- [GeeksforGeeks](#): GeeksforGeeks is a platform that provides a collection of coding problems to practice and improve your coding skills.
-- [Project Euler](#): Project Euler is a platform that provides a collection of mathematical problems to practice and improve your mathematical skills.
-
-## Resources
-
-- [Books](#): Books are a great way to learn about Data Structures and Algorithms.
\ No newline at end of file
diff --git a/dsa-solutions/lc-solutions/0000-0099/0001-two-sum.md b/dsa-solutions/lc-solutions/0000-0099/0001-two-sum.md
deleted file mode 100644
index 687dbe2e4..000000000
--- a/dsa-solutions/lc-solutions/0000-0099/0001-two-sum.md
+++ /dev/null
@@ -1,643 +0,0 @@
----
-id: two-sum
-title: Two Sum Solution
-sidebar_label: 0001 - Two Sum
-tags:
- - Two Sum
- - Hash Table
- - Two Pointer
- - Array
- - JavaScript
- - TypeScript
-description: "This is a solution to the Two Sum problem on LeetCode."
-sidebar_position: 1
----
-
-In this tutorial, we will solve the Two Sum problem using three different approaches :brute force, hash table, and two-pointer technique. We will provide the implementation of the solution in JavaScript, TypeScript, Python, Java, C++, and more.
-
-## Problem Description
-
-Given an array of integers `nums` and an integer `target`, return indices of the two numbers such that they add up to `target`.
-
-You may assume that each input would have exactly one solution, and you may not use the same element twice.
-
-You can return the answer in any order.
-
-### Examples
-
-**Example 1:**
-
-```plaintext
-Input: nums = [2,7,11,15], target = 9
-Output: [0,1]
-```
-
-**Example 2:**
-
-```plaintext
-Input: nums = [3,2,4], target = 6
-Output: [1,2]
-```
-
-**Example 3:**
-
-```plaintext
-Input: nums = [3,3], target = 6
-Output: [0,1]
-```
-
-### Constraints
-
-- $2 \leq \text{nums.length} \leq 10^4$
-- $-10^9 \leq \text{nums[i]} \leq 10^9$
-- $-10^9 \leq \text{target} \leq 10^9$
-- Only one valid answer exists.
-
-**Follow up:** Can you come up with an algorithm that is less than $O(n^2)$ time complexity?
-
----
-
-## Solution for Two Sum Problem
-
-### Intuition and Approach
-
-The problem can be solved using a brute force approach, a hash table, or the two-pointer technique. The brute force approach has a time complexity of $O(n^2)$, while the hash table and two-pointer techniques have a time complexity of $O(n)$. The hash table approach is the most efficient and is recommended for large inputs.
-
-
-
-
-### Approach 1: Brute Force (Naive)
-
-The brute force approach is simple. We iterate through each element `nums[i]` and check if there is another element `nums[j]` such that `nums[i] + nums[j] == target`. If we find such a pair, we return the indices `[i, j]`.
-
-#### Implementation
-
-```jsx live
-function twoSumProblem() {
- const nums = [2, 7, 11, 15];
- const target = 9;
- const twoSum = function (nums, target) {
- for (let i = 0; i < nums.length; i++) {
- for (let j = i + 1; j < nums.length; j++) {
- if (nums[i] + nums[j] === target) {
- return [i, j];
- }
- }
- }
-
- return [];
- };
-
- const result = twoSum(nums, target);
- return (
-
-
- Input: nums = {"[" + nums.join(", ") + "]"}, target = {target}
-
-
- Output: {"[" + result.join(", ") + "]"}
-
-
- );
-}
-```
-
-#### Codes in Different Languages
-
-
-
-
- ```javascript
- function twoSum(nums, target) {
- for (let i = 0; i < nums.length; i++) {
- for (let j = i + 1; j < nums.length; j++) {
- if (nums[i] + nums[j] === target) {
- return [i, j];
- }
- }
- }
-
- return [];
- }
- ```
-
-
-
-
- ```typescript
- function twoSum(nums: number[], target: number): number[] {
- for (let i = 0; i < nums.length; i++) {
- for (let j = i + 1; j < nums.length; j++) {
- if (nums[i] + nums[j] === target) {
- return [i, j];
- }
- }
- }
-
- return [];
- }
- ```
-
-
-
-
- ```python
- class Solution:
- def twoSum(self, nums: List[int], target: int) -> List[int]:
- for i in range(len(nums)):
- for j in range(i + 1, len(nums)):
- if nums[i] + nums[j] == target:
- return [i, j]
-
- return []
- ```
-
-
-
-
- ```java
- class Solution {
- public int[] twoSum(int[] nums, int target) {
- for (int i = 0; i < nums.length; i++) {
- for (int j = i + 1; j < nums.length; j++) {
- if (nums[i] + nums[j] == target) {
- return new int[] {i, j};
- }
- }
- }
-
- return new int[0];
- }
- }
- ```
-
-
-
-
- ```cpp
- class Solution {
- public:
- vector twoSum(vector& nums, int target) {
- for (int i = 0; i < nums.size(); i++) {
- for (int j = i + 1; j < nums.size(); j++) {
- if (nums[i] + nums[j] == target) {
- return {i, j};
- }
- }
- }
-
- return {};
- }
- };
- ```
-
-
-
-
-#### Complexity Analysis
-
-- Time Complexity: $$O(n^2)$$
-- Space Complexity: $$O(1)$$
-- Where `n` is the length of the input array `nums`.
-- The time complexity is $$O(n^2)$$ because we are iterating through the array twice.
-- The space complexity is $$O(1)$$ because we are not using any extra space.
-- This approach is not efficient and is not recommended for large inputs.
-
-
-
-
-### Approach 2: Using Hash Table
-
-We can solve this problem more efficiently using a hash table. We iterate through the array and store the elements and their indices in a hash table. For each element `nums[i]`, we calculate the complement `target - nums[i]` and check if the complement is present in the hash table. If it is present, we return the indices `[i, numMap.get(complement)]`. If the complement is not present, we add the element `nums[i]` to the hash table. If no pair is found, we return an empty array.
-
-#### Implementation
-
-```jsx live
-function twoSumProblem() {
- const nums = [2, 7, 11, 15];
- const target = 9;
-
- const twoSum = function (nums, target) {
- const numMap = new Map();
-
- for (let i = 0; i < nums.length; i++) {
- const complement = target - nums[i];
- if (numMap.has(complement)) {
- return [numMap.get(complement), i];
- }
- numMap.set(nums[i], i);
- }
-
- return [];
- };
-
- const result = twoSum(nums, target);
- return (
-
-
- Input: nums = {"[" + nums.join(", ") + "]"}, target = {target}
-
-
- Output: {"[" + result.join(", ") + "]"}
-
-
- );
-}
-```
-
-#### Code in Different Languages
-
-
-
-
- ```javascript
- function twoSum(nums, target) {
- const numMap = new Map();
-
- for (let i = 0; i < nums.length; i++) {
- const complement = target - nums[i];
- if (numMap.has(complement)) {
- return [numMap.get(complement), i];
- }
- numMap.set(nums[i], i);
- }
-
- return [];
- }
- ```
-
-
-
-
- ```typescript
- function twoSum(nums: number[], target: number): number[] {
- const numMap = new Map();
-
- for (let i = 0; i < nums.length; i++) {
- const complement = target - nums[i];
- if (numMap.has(complement)) {
- return [numMap.get(complement)!, i];
- }
- numMap.set(nums[i], i);
- }
-
- return [];
- }
- ```
-
-
-
-
- ```python
- class Solution:
- def twoSum(self, nums: List[int], target: int) -> List[int]:
- num_map = {}
- for i, num in enumerate(nums):
- complement = target - num
- if complement in num_map:
- return [num_map[complement], i]
- num_map[num] = i
-
- return []
- ```
-
-
-
-
- ```java
- class Solution {
- public int[] twoSum(int[] nums, int target) {
- Map numMap = new HashMap<>();
-
- for (int i = 0; i < nums.length; i++) {
- int complement = target - nums[i];
- if (numMap.containsKey(complement)) {
- return new int[] {numMap.get(complement), i};
- }
- numMap.put(nums[i], i);
- }
-
- return new int[0];
- }
- }
- ```
-
-
-
-
- ```cpp
- class Solution {
- public:
- vector twoSum(vector& nums, int target) {
- unordered_map numMap;
-
- for (int i = 0; i < nums.size(); i++) {
- int complement = target - nums[i];
- if (numMap.find(complement) != numMap.end()) {
- return {numMap[complement], i};
- }
- numMap[nums[i]] = i;
- }
-
- return {};
- }
- };
- ```
-
-
-
-
-#### Complexity Analysis
-
-- **Time Complexity:** $O(n)$
-- **Space Complexity:** $O(n)$
-- Where `n` is the length of the input array `nums`.
-- The time complexity is $O(n)$ because we iterate through the array only once.
-- The space complexity is $O(n)$ because we use a hash table to store the elements and their indices.
-- This approach is more efficient than the brute force approach and is recommended for large inputs.
-- The hash table lookup has an average time complexity of $O(1)$, which makes this approach efficient.
-- The space complexity is $O(n)$ because we store at most `n` elements in the hash table.
-- The total time complexity is $O(n)$. and the total space complexity is $O(n)$.
-
-
-
-
-### Approach 3: Using Two Pointers
-
-We can also solve this problem using the two-pointer technique. We first sort the array and then use two pointers, `left` and `right`, to find the two numbers that add up to the target sum. We initialize `left` to `0` and `right` to `nums.length - 1`. We calculate the sum of the two numbers at the `left` and `right` pointers. If the sum is equal to the target, we return the indices `[left, right]`. If the sum is less than the target, we increment the `left` pointer. If the sum is greater than the target, we decrement the `right` pointer. If no pair is found, we return an empty array.
-
-#### Implementation
-
-```jsx live
-function twoSumProblem() {
- const nums = [2, 7, 11, 15];
- const target = 9;
-
- const twoSum = function (nums, target) {
- const sortedNums = nums.map((num, index) => [num, index]);
- sortedNums.sort((a, b) => a[0] - b[0]);
-
- let left = 0;
- let right = sortedNums.length - 1;
-
- while (left < right) {
- const sum = sortedNums[left][0] + sortedNums[right][0];
- if (sum === target) {
- return [sortedNums[left][1], sortedNums[right][1]];
- } else if (sum < target) {
- left++;
- } else {
- right--;
- }
- }
-
- return [];
- };
-
- const result = twoSum(nums, target);
- return (
-
-
- Input: nums = {"[" + nums.join(", ") + "]"}, target = {target}
-
-
- Output: {"[" + result.join(", ") + "]"}
-
-
- );
-}
-```
-
-#### Code in Different Languages
-
-
-
-
- ```javascript
- function twoSum(nums, target) {
- const sortedNums = nums.map((num, index) => [num, index]);
- sortedNums.sort((a, b) => a[0] - b[0]);
-
- let left = 0;
- let right = sortedNums.length - 1;
-
- while (left < right) {
- const sum = sortedNums[left][0] + sortedNums[right][0];
- if (sum === target) {
- return [sortedNums[left][1], sortedNums[right][1]];
- } else if (sum < target) {
- left++;
- } else {
- right--;
- }
- }
-
- return [];
- }
- ```
-
-
-
-
-
-```ts
-function twoSum(nums: number[], target: number): number[] {
- const sortedNums = nums.map((num, index) => [num, index]);
- sortedNums.sort((a, b) => a[0] - b[0]);
-
- let left = 0;
- let right = sortedNums.length - 1;
-
- while (left < right) {
- const sum = sortedNums[left][0] + sortedNums[right][0];
- if (sum === target) {
- return [sortedNums[left][1], sortedNums[right][1]];
- } else if (sum < target) {
- left++;
- } else {
- right--;
- }
- }
-
- return [];
-}
-```
-
-
-
-
-```py
- class Solution:
- def twoSum(self, nums: List[int], target: int) -> List[int]:
- sorted_nums = sorted(enumerate(nums), key=lambda x: x[1])
-
- left, right = 0, len(sorted_nums) - 1
-
- while left < right:
- sum = sorted_nums[left][1] + sorted_nums[right][1]
- if sum == target:
- return [sorted_nums[left][0], sorted_nums[right][0]]
- elif sum < target:
- left += 1
- else:
- right -= 1
-
- return []
-
-````
-
-
-
-
-```java
-class Solution {
- public int[] twoSum(int[] nums, int target) {
- int[][] sortedNums = new int[nums.length][2];
- for (int i = 0; i < nums.length; i++) {
- sortedNums[i] = new int[] {nums[i], i};
- }
-
- Arrays.sort(sortedNums, (a, b) -> Integer.compare(a[0], b[0]));
-
- int left = 0;
- int right = sortedNums.length - 1;
-
- while (left < right) {
- int sum = sortedNums[left][0] + sortedNums[right][0];
- if (sum == target) {
- return new int[] {sortedNums[left][1], sortedNums[right][1]};
- } else if (sum < target) {
- left++;
- } else {
- right--;
- }
- }
-
- return new int[0];
- }
-}
-````
-
-
-
-
-
-```cpp
- class Solution {
- public:
- vector twoSum(vector& nums, int target) {
- vector> sortedNums(nums.size(), vector(2));
- for (int i = 0; i < nums.size(); i++) {
- sortedNums[i] = {nums[i], i};
- }
-
- sort(sortedNums.begin(), sortedNums.end(), [](vector& a, vector& b) {
- return a[0] < b[0];
- });
-
- int left = 0;
- int right = sortedNums.size() - 1;
-
- while (left < right) {
- int sum = sortedNums[left][0] + sortedNums[right][0];
- if (sum == target) {
- return {sortedNums[left][1], sortedNums[right][1]};
- } else if (sum < target) {
- left++;
- } else {
- right--;
- }
- }
-
- return {};
- }
- };
-```
-
-
-
-
-#### Complexity Analysis
-
-- **Time Complexity:** $O(n \log n)$
-- **Space Complexity:** $O(n)$
-- Where `n` is the length of the input array `nums`.
-- The time complexity is $O(n \log n)$ because we sort the array.
-- The space complexity is $O(n)$ because we store the indices of the elements in the sorted array.
-- This approach is efficient and is recommended for large inputs.
-- The total time complexity is $O(n \log n)$. and the total space complexity is $O(n)$.
-
-
-
-
-:::tip Note
-**Which is the best approach? and why?**
-
-The hash table approach is the most efficient and is recommended for large inputs. The hash table lookup has an average time complexity of $O(1)$, which makes this approach efficient. The time complexity of the hash table approach is $$O(n)$$, which is better than the brute force approach with a time complexity of $O(n^2)$ and the two-pointer approach with a time complexity of $O(n \log n)$. The space complexity of the hash table approach is $O(n)$, which is the same as the two-pointer approach. Therefore, the hash table approach is the best approach for this problem.
-
-:::
-
----
-
-## Video Explanation of Two Sum Problem
-
-
-
-
-
----
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
----
-
-Authors:
-
-
-{['ajay-dhangar'].map(username => (
-
-))}
-
diff --git a/dsa-solutions/lc-solutions/0000-0099/0002-Add-Two-Numbers.md b/dsa-solutions/lc-solutions/0000-0099/0002-Add-Two-Numbers.md
deleted file mode 100644
index 6b52419e7..000000000
--- a/dsa-solutions/lc-solutions/0000-0099/0002-Add-Two-Numbers.md
+++ /dev/null
@@ -1,298 +0,0 @@
----
-id: add-two-numbers
-title: Add Two Numbers Solution
-sidebar_label: 0002 - Add Two Numbers
-tags:
- - Linked List
- - Math
- - Recursion
- - Add Two Numbers
- - LeetCode
-description: "This is a solution to the Add Two Numbers problem on LeetCode."
-sidebar_position: 2
----
-
-In this tutorial, we will solve the Add Two Numbers problem. We will provide an overview of the problem, the intuition and approach to solve it, the implementation, and the code in various languages, along with a detailed explanation of the solution and its complexity analysis. Let's start by understanding the problem.
-
-## Problem Statement
-
-You are given two **non-empty** linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes contains a single digit. Add the two numbers and return the sum as a linked list.
-
-You may assume the two numbers do not contain any leading zero, except the number 0 itself.
-
-```mermaid
-graph LR
-M[(Input)] --> A([l1])
-M[(Input)] --> E([l2])
-A --> B((2))
-B --> C((4))
-C --> D((3))
-E --> F((5))
-F --> G((6))
-G --> H((4))
-I[(Output)] --> J((7))
-J --> K((0))
-K --> L((8))
-```
-
-**Example 1:**
-
-```plaintext
-Input: l1 = [2,4,3], l2 = [5,6,4]
-Output: [7,0,8]
-Explanation: 342 + 465 = 807.
-```
-
-**Example 2:**
-
-```plaintext
-Input: l1 = [0], l2 = [0]
-Output: [0]
-```
-
-**Example 3:**
-
-```plaintext
-Input: l1 = [9,9,9,9,9,9,9], l2 = [9,9,9,9]
-Output: [8,9,9,9,0,0,0,1]
-```
-
-### Constraints
-
-- The number of nodes in each linked list is in the range `[1, 100]`.
-- $0 \leq \text{Node.val} \leq 9$
-- It is guaranteed that the list represents a number that does not have leading zeros.
-
----
-
-## Solution for Add Two Numbers Problem
-
-### Intuition and Approach
-
-We iterate through both linked lists, adding corresponding node values along with a carry from the previous addition. If the sum of the current node values and carry is 10 or more, we keep the carry for the next addition. We continue this process until we traverse both linked lists.
-
-### Flowchart
-
-```mermaid
-flowchart TD
- A[Start] --> B{l1 or l2 or carry}
- B --> |Yes| C[Add values of l1, l2, and carry]
- C --> D[Calculate new carry and current node value]
- D --> E[Add node with value to result list]
- E --> F{Move to next node in l1 and l2 if exist}
- F --> |Next nodes exist| B
- F --> |Next nodes do not exist| G[Return result list]
- B --> |No| G
-```
-
-### Pseudocode
-
-```plaintext
-1. Initialize a dummy node and a current node to keep track of the current node.
-2. Initialize a carry variable to 0.
-3. Iterate through both linked lists until both are empty.
- 1. Calculate the sum of the current node values and carry.
- 2. Update the carry and current node value.
- 3. Add the new node to the result list.
- 4. Move to the next nodes in l1 and l2 if they exist.
-4. Return the next node of the dummy node.
-```
-
-### Implementation and Code
-
-Here is a live code editor for you to play around with the solution:
-
-```jsx live
-function addTwoNumbersProblem() {
- class ListNode {
- constructor(val = 0, next = null) {
- this.val = val;
- this.next = next;
- }
- }
-
- const l1 = new ListNode(2, new ListNode(4, new ListNode(3)));
- const l2 = new ListNode(5, new ListNode(6, new ListNode(4)));
-
- const addTwoNumbers = function (l1, l2) {
- let dummyHead = new ListNode(0);
- let p = l1,
- q = l2,
- curr = dummyHead;
- let carry = 0;
-
- while (p !== null || q !== null) {
- let x = p !== null ? p.val : 0;
- let y = q !== null ? q.val : 0;
- let sum = carry + x + y;
- carry = Math.floor(sum / 10);
- curr.next = new ListNode(sum % 10);
- curr = curr.next;
- if (p !== null) p = p.next;
- if (q !== null) q = q.next;
- }
-
- if (carry > 0) {
- curr.next = new ListNode(carry);
- }
-
- return dummyHead.next;
- };
-
- const result = addTwoNumbers(l1, l2);
- const listToArray = (node) => {
- const arr = [];
- while (node) {
- arr.push(node.val);
- node = node.next;
- }
- return arr;
- };
-
- const resultArray = listToArray(result);
- return (
-
-
- Input: l1 = {"[" + listToArray(l1).join(", ") + "]"}, l2 ={" "}
- {"[" + listToArray(l2).join(", ") + "]"}
-
-
- Output: {"[" + resultArray.join(", ") + "]"}
-
-
- );
-}
-```
-
-### Code in Different Languages
-
-
-
-
- ```javascript
- var addTwoNumbers = function(l1, l2) {
- let dummy = new ListNode(0);
- let curr = dummy;
- let carry = 0;
- while (l1 !== null || l2 !== null) {
- let x = (l1 !== null) ? l1.val : 0;
- let y = (l2 !== null) ? l2.val : 0;
- let sum = x + y + carry;
- carry = Math.floor(sum / 10);
- curr.next = new ListNode(sum % 10);
- curr = curr.next;
- if (l1 !== null) l1 = l1.next;
- if (l2 !== null) l2 = l2.next;
- }
- if (carry > 0) {
- curr.next = new ListNode(carry);
- }
- return dummy.next;
- };
- ```
-
-
-
-
- ```python
- def addTwoNumbers(self, l1: ListNode, l2: ListNode) -> ListNode:
- dummy = ListNode(0)
- curr = dummy
- carry = 0
- while l1 or l2:
- x = l1.val if l1 else 0
- y = l2.val if l2 else 0
- sum = x + y + carry
- carry = sum // 10
- curr.next = ListNode(sum % 10)
- curr = curr.next
- if l1:
- l1 = l1.next
- if l2:
- l2 = l2.next
- if carry > 0:
- curr.next = ListNode(carry)
- return dummy.next
- ```
-
-
-
-
- ```java
- public ListNode addTwoNumbers(ListNode l1, ListNode l2) {
- ListNode dummy = new ListNode(0);
- ListNode curr = dummy;
- int carry = 0;
- while (l1 != null || l2 != null) {
- int x = (l1 != null) ? l1.val : 0;
- int y = (l2 != null) ? l2.val : 0;
- int sum = x + y + carry;
- carry = sum / 10;
- curr.next = new ListNode(sum % 10);
- curr = curr.next;
- if (l1 != null) l1 = l1.next;
- if (l2 != null) l2 = l2.next;
- }
- if (carry > 0) {
- curr.next = new ListNode(carry);
- }
- return dummy.next;
- }
- ```
-
-
-
-
- ```cpp
- ListNode* addTwoNumbers(ListNode* l1, ListNode* l2) {
- ListNode* dummy = new ListNode(0);
- ListNode* curr = dummy;
- int carry = 0;
- while (l1 || l2) {
- int x = (l1) ? l1->val : 0;
- int y = (l2) ? l2->val : 0;
- int sum = x + y + carry;
- carry = sum / 10;
- curr->next = new ListNode(sum % 10);
- curr = curr->next;
- if (l1) l1 = l1->next;
- if (l2) l2 = l2->next;
- }
- if (carry > 0) {
- curr->next = new ListNode(carry);
- }
- return dummy->next;
- }
- ```
-
-
-
-## Complexity Analysis
-
-### Time Complexity
-The time complexity of the solution is **O(n)**, where **n** is the maximum length of the input linked lists.
-
-### Space Complexity
-The space complexity is **O(n)** due to the space required to store the resulting linked list.
-
-## Conclusion
-
-The solution provided efficiently adds two numbers represented by linked lists. By using dummy nodes and handling carry, we ensure that the solution is both easy to understand and efficient. The detailed explanation, flowchart, and code in multiple languages aim to help you understand and implement the solution effectively.
-
----
-
-## References
-
-- [LeetCode Problem](https://leetcode.com/problems/add-two-numbers/)
-- [GeeksforGeeks Solution](https://www.geeksforgeeks.org/add-two-numbers-represented-by-linked-lists/)
-- [YouTube Explanation](https://www.youtube.com/watch?v=wgFPrzTjm7s)
-
----
-
-Authors:
-
-
-{['ajay-dhangar'].map(username => (
-
-))}
-
diff --git a/dsa-solutions/lc-solutions/0000-0099/0003-Longest-Substring-Without-Repeating-Characters.md b/dsa-solutions/lc-solutions/0000-0099/0003-Longest-Substring-Without-Repeating-Characters.md
deleted file mode 100644
index 639f765da..000000000
--- a/dsa-solutions/lc-solutions/0000-0099/0003-Longest-Substring-Without-Repeating-Characters.md
+++ /dev/null
@@ -1,435 +0,0 @@
----
-id: longest-substrings-without-repeating-characters
-title: Longest Substring Without Repeating Characters (LeetCode)
-sidebar_label: 0003 - Longest Substring Without Repeating Characters
-tags:
- - Hash table
- - String
- - Sliding Window
-description: "This is a solution to the Longest Substring Without Repeating Characters problem on LeetCode."
-sidebar_position: 3
----
-
-In this page we will solve the problem [Longest Substring Without Repeating Characters](https://leetcode.com/problems/longest-substring-without-repeating-characters/) from LeetCode.
-
-## Problem Statement
-
-Given a string `s`, find the length of the longest substring without repeating characters.
-
-### Example 1
-
-```plaintext
-Input: s = "abcabcbb"
-Output: 3
-Explanation: The answer is "abc", with the length of 3.
-```
-
-### Example 2
-
-```plaintext
-Input: s = "bbbbb"
-Output: 1
-Explanation: The answer is "b", with the length of 1.
-```
-
-### Example 3
-
-```plaintext
-Input: s = "pwwkew"
-Output: 3
-Explanation: The answer is "wke", with the length of 3.
-Notice that the answer must be a substring, "pwke" is a subsequence and not a substring.
-```
-
-### Constraints:
-
-- `0 <= s.length <= 5 * 10^4`
-- `s` consists of English letters, digits, symbols and spaces.
-
----
-
-## Solution for Longest Substring Without Repeating Characters
-
-### Intuition and Approach
-
-We can solve this problem using the sliding window technique. We will use a hash table to store the characters and their indices. We will also use two pointers, `left` and `right`, to define the window. The `left` pointer will point to the start of the window, and the `right` pointer will point to the end of the window.
-
-We will iterate over the string `s` using the `right` pointer. If the character at the `right` pointer is not in the hash table, we will add it to the hash table with its index. We will then calculate the length of the current window by subtracting the `left` pointer from the `right` pointer and update the maximum length if needed.
-
-If the character at the `right` pointer is already in the hash table, we will move the `left` pointer to the right of the last occurrence of the character. We will also update the index of the character in the hash table.
-
-We will continue this process until we reach the end of the string `s`. The maximum length of the substring without repeating characters will be the answer.
-
-### Algorithm
-
-1. Initialize an empty hash table `charIndex` to store the characters and their indices.
-2. Initialize the `left` and `right` pointers to 0.
-3. Initialize the `maxLength` variable to store the maximum length of the substring without repeating characters.
-4. Iterate over the string `s` using the `right` pointer:
- - If `s[right]` is not in `charIndex`, add it to the hash table with its index.
- - Calculate the length of the current window and update the `maxLength` if needed.
- - If `s[right]` is already in `charIndex`, move the `left` pointer to the right of the last occurrence of `s[right]`.
- - Update the index of `s[right]` in the hash table.
-5. Continue this process until the end of the string `s`.
-6. Return the `maxLength`.
-
-### Flowchart
-
-The flowchart below illustrates the steps involved in the algorithm:
-
-```mermaid
-flowchart TD
- Start --> Initialize;
- Initialize --> Iterate;
- Iterate --> |s right not in charIndex| AddToHashTable;
- AddToHashTable --> CalculateLength;
- CalculateLength --> UpdateMaxLength;
- UpdateMaxLength --> |s right in charIndex| MoveLeftPointer;
- MoveLeftPointer --> UpdateIndex;
- UpdateIndex --> Iterate;
- Iterate --> |End of string| ReturnMaxLength;
- ReturnMaxLength --> End;
-```
-
-### Pseudocode
-
-```plaintext
-function lengthOfLongestSubstring(s: string): number
- let charIndex = new Map()
- let left = 0
- let maxLength = 0
-
- for right from 0 to s.length - 1
- if s[right] in charIndex
- left = max(left, charIndex[s[right]] + 1)
- charIndex[s[right]] = right
- maxLength = max(maxLength, right - left + 1)
-
- return maxLength
-```
-
-### Implementation and Code
-
-Here is a live code editor for you to play around with the solution:
-
-```jsx live
-function LongestSubstringProblem() {
- const findLongestSubstring = (s) => {
- let charIndexMap = {};
- let left = 0;
- let maxLength = 0;
-
- for (let right = 0; right < s.length; right++) {
- if (charIndexMap[s[right]] !== undefined) {
- left = Math.max(left, charIndexMap[s[right]] + 1);
- }
- charIndexMap[s[right]] = right;
- maxLength = Math.max(maxLength, right - left + 1);
- }
-
- return maxLength;
- };
-
- const testCases = [
- { input: "abcabcbb", expected: 3 },
- { input: "bbbbb", expected: 1 },
- { input: "pwwkew", expected: 3 },
- ];
-
- return (
-
- {testCases.map((testCase, index) => (
-
-
- Input: {testCase.input}
-
-
- Output: {findLongestSubstring(testCase.input)}
-
-
- Expected: {testCase.expected}
-
-
-
- ))}
-
- );
-}
-```
-
-### Code in Different Languages
-
-
-
-
- ```jsx
- /**
- * @param {string} s
- * @return {number}
- */
- var lengthOfLongestSubstring = function(s) {
- let charIndexMap = {};
- let left = 0;
- let maxLength = 0;
-
- for (let right = 0; right < s.length; right++) {
- if (charIndexMap[s[right]] !== undefined) {
- left = Math.max(left, charIndexMap[s[right]] + 1);
- }
- charIndexMap[s[right]] = right;
- maxLength = Math.max(maxLength, right - left + 1);
- }
-
- return maxLength;
-
- };
-
- ```
-
-
-
- ```python
- class Solution:
- def lengthOfLongestSubstring(self, s: str) -> int:
- char_index_map = {}
- left = 0
- max_length = 0
-
- for right in range(len(s)):
- if s[right] in char_index_map:
- left = max(left, char_index_map[s[right]] + 1)
- char_index_map[s[right]] = right
- max_length = max(max_length, right - left + 1)
-
- return max_length
- ```
-
-
-
-
- ```java
- class Solution {
- public int lengthOfLongestSubstring(String s) {
- Map charIndexMap = new HashMap<>();
- int left = 0;
- int maxLength = 0;
-
- for (int right = 0; right < s.length(); right++) {
- if (charIndexMap.containsKey(s.charAt(right))) {
- left = Math.max(left, charIndexMap.get(s.charAt(right)) + 1);
- }
- charIndexMap.put(s.charAt(right), right);
- maxLength = Math.max(maxLength, right - left + 1);
- }
-
- return maxLength;
- }
- }
-
- ```
-
-
-
- ```cpp
- class Solution {
- public:
- int lengthOfLongestSubstring(string s) {
- unordered_map charIndexMap;
- int left = 0;
- int maxLength = 0;
-
- for (int right = 0; right < s.length(); right++) {
- if (charIndexMap.find(s[right]) != charIndexMap.end()) {
- left = max(left, charIndexMap[s[right]] + 1);
- }
- charIndexMap[s[right]] = right;
- maxLength = max(maxLength, right - left + 1);
- }
-
- return maxLength;
- }
- };
- ```
-
-
-
-
-
- ```c
- int lengthOfLongestSubstring(char * s){
- int charIndexMap[256];
- memset(charIndexMap, -1, sizeof(charIndexMap));
- int left = 0;
- int maxLength = 0;
-
- for (int right = 0; s[right] != '\0'; right++) {
- if (charIndexMap[s[right]] != -1) {
- left = fmax(left, charIndexMap[s[right]] + 1);
- }
- charIndexMap[s[right]] = right;
- maxLength = fmax(maxLength, right - left + 1);
- }
-
- return maxLength;
- }
-
- ```
-
-
-
-
- ```ts
- function lengthOfLongestSubstring(s: string): number {
- const charIndexMap: Record = {};
- let left = 0;
- let maxLength = 0;
-
- for (let right = 0; right < s.length; right++) {
- if (charIndexMap[s[right]] !== undefined) {
- left = Math.max(left, charIndexMap[s[right]] + 1);
- }
- charIndexMap[s[right]] = right;
- maxLength = Math.max(maxLength, right - left + 1);
- }
-
- return maxLength;
- }
- ```
-
-
-
-
-
-
- ```python
- class Solution:
- def lengthOfLongestSubstring(self, s: str) -> int:
- n = len(s)
- maxLength = 0
- charSet = set()
- left = 0
-
- for right in range(n):
- if s[right] not in charSet:
- charSet.add(s[right])
- maxLength = max(maxLength, right - left + 1)
- else:
- while s[right] in charSet:
- charSet.remove(s[left])
- left += 1
- charSet.add(s[right])
-
- return maxLength
- ```
-
-
-
- ```java
- class Solution {
- public int lengthOfLongestSubstring(String s) {
- int n = s.length();
- int maxLength = 0;
- Set charSet = new HashSet<>();
- int left = 0;
-
- for (int right = 0; right < n; right++) {
- if (!charSet.contains(s.charAt(right))) {
- charSet.add(s.charAt(right));
- maxLength = Math.max(maxLength, right - left + 1);
- } else {
- while (charSet.contains(s.charAt(right))) {
- charSet.remove(s.charAt(left));
- left++;
- }
- charSet.add(s.charAt(right));
- }
- }
-
- return maxLength;
- }
- }
- ```
-
-
-
- ```cpp
- #include
- #include
- #include
-
- class Solution {
- public:
- int lengthOfLongestSubstring(string s) {
- if (s.empty()) return 0;
-
- int maxLength = 0;
- std::vector seen;
-
- for (char c : s) {
- auto it = std::find(seen.begin(), seen.end(), c);
- if (it == seen.end()) {
- seen.push_back(c);
- maxLength = std::max(maxLength, static_cast(seen.size()));
- } else {
- seen.erase(seen.begin(), it + 1); // Remove characters before the repeated character
- seen.push_back(c);
- }
- }
-
- return maxLength;
- }
- };
- ```
-
-
-
-
-
-
-### Complexity Analysis
-
-- **Time Complexity:** The time complexity of this solution is $O(n)$, where n is the length of the input string `s`. We iterate over the string `s` once using the `right` pointer.
-
-- **Space Complexity:** The space complexity of this solution is $O(min(n, m))$, where n is the length of the input string `s` and m is the size of the character set (e.g., 26 for lowercase English letters). We use a hash table to store the characters and their indices, which can have a maximum of m entries.
-
-### Test Cases
-
-We will test the solution with the sample test cases provided in the problem statement.
-
-
-
- ```plaintext
- Input: s = "abcabcbb"
- Output: 3
- Explanation: The answer is "abc", with the length of 3.
- ```
-
-
- ```plaintext
- Input: s = "bbbbb"
- Output: 1
- Explanation: The answer is "b", with the length of 1.
- ```
-
-
- ```plaintext
- Input: s = "pwwkew"
- Output: 3
- Explanation: The answer is "wke", with the length of 3.
- Notice that the answer must be a substring, "pwke" is a subsequence and not a substring.
- ```
-
-
-
-
-## Resources
-
----
-
-Authors:
-
-
-{['ajay-dhangar'].map(username => (
-
-))}
-
\ No newline at end of file
diff --git a/dsa-solutions/lc-solutions/0000-0099/0004-Median-of-two-Sorted-Array.md b/dsa-solutions/lc-solutions/0000-0099/0004-Median-of-two-Sorted-Array.md
deleted file mode 100644
index f32c98c61..000000000
--- a/dsa-solutions/lc-solutions/0000-0099/0004-Median-of-two-Sorted-Array.md
+++ /dev/null
@@ -1,817 +0,0 @@
----
-id: median-of-two-sorted-arrays
-title: Median of Two Sorted Arrays(Leetcode)
-sidebar_label: 0004 - Median of Two Sorted Arrays
-tags:
- - Array
- - Binary Search
- - Divide and Conquer0
- - LeetCode
-description: Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays.
-sidebar_position: 4
----
-
-In this page, we will solve the problem [Median of Two Sorted Arrays](https://leetcode.com/problems/median-of-two-sorted-arrays/description/) from LeetCode. We will provide multiple approaches to solve the problem along with the code implementation and the complexity analysis of the code.
-
-## Problem Statement
-
-Given two sorted arrays `nums1` and `nums2` of size `m` and `n` respectively, return the median of the two sorted arrays.
-
-The overall run time complexity should be $O(log (m+n))$.
-
-### Example 1
-
-```plaintext
-Input: nums1 = [1,3], nums2 = [2]
-Output: 2.00000
-Explanation: merged array = [1,2,3] and median is 2.
-```
-
-### Example 2
-
-```plaintext
-Input: nums1 = [1,2], nums2 = [3,4]
-Output: 2.50000
-Explanation: merged array = [1,2,3,4] and median is (2 + 3) / 2 = 2.5.
-```
-
-### Constraints:
-
-- $nums1.length == m$
-- $nums2.length == n$
-- $0 <= m <= 1000$
-- $0 <= n <= 1000$
-- $1 <= m + n <= 2000$
-- $-10^6 <= nums1[i], nums2[i] <= 10^6$
-
----
-
-## Solution for Median of Two Sorted Arrays
-
-The **Median of Two Sorted Arrays** is a classic algorithm problem on LeetCode ([Problem 4](https://leetcode.com/problems/median-of-two-sorted-arrays/description/)). It requires finding the median of two sorted arrays. Given two sorted arrays `nums1` and `nums2`, the task is to find the median of the two arrays combined.
-
-Here is an explanation of the intuition and approaches to solve this problem:
-
-### intuition
-
-The median is the middle value of a dataset. For an even number of elements, it is the average of the two middle values. If we have two sorted arrays, the naive approach would involve merging both arrays and then finding the median, but this approach does not take full advantage of the fact that the arrays are already sorted and is not efficient for large arrays.
-
-Instead, we can use a more advanced approach to find the median in $O(log(min(n, m)))$ time, where `n` and `m` are the lengths of the two arrays. This involves using a binary search method. The idea is to partition both arrays into two halves such that the combined left half and right half are both sorted and of equal length (or differing by one).
-
-
-
-
-## Approach 1: Binary Search
-
-The binary search approach involves partitioning the two arrays such that the combined left half and right half are both sorted and of equal length (or differing by one). We can then find the median based on these partitions.
-
-### Pseudocode
-
-1. Ensure `nums1` is the smaller array.
-2. Initialize `low` and `high` for binary search on `nums1`.
-3. While `low <= high`:
- - Calculate `partitionX` and `partitionY`.
- - Set `maxX`, `minX`, `maxY`, `minY`.
- - If `maxX <= minY` and `maxY <= minX`:
- - If total number of elements is even
- - Return average of `max(maxX, maxY)` and `min(minX, minY)`.
- - Else
- - Return `max(maxX, maxY)`.
- - If `maxX > minY`:
- - Move `high` to `partitionX - 1`.
- - Else:
- - Move `low` to `partitionX + 1`.
-4. If no median is found, raise an error.
-
-### Implementation and Code
-
-Here is a live code editor for you to play around with the solution:
-
-```jsx live
-function medianOfTwoSortedArraysProblem() {
- const findMedianSortedArrays = (nums1, nums2) => {
- // Ensure nums1 is the smaller array
- if (nums1.length > nums2.length) {
- [nums1, nums2] = [nums2, nums1];
- }
-
- const x = nums1.length;
- const y = nums2.length;
- let low = 0, high = x;
-
- while (low <= high) {
- const partitionX = Math.floor((low + high) / 2);
- const partitionY = Math.floor((x + y + 1) / 2) - partitionX;
-
- const maxX = (partitionX === 0) ? -Infinity : nums1[partitionX - 1];
- const minX = (partitionX === x) ? Infinity : nums1[partitionX];
-
- const maxY = (partitionY === 0) ? -Infinity : nums2[partitionY - 1];
- const minY = (partitionY === y) ? Infinity : nums2[partitionY];
-
- if (maxX <= minY && maxY <= minX) {
- if ((x + y) % 2 === 0) {
- return (Math.max(maxX, maxY) + Math.min(minX, minY)) / 2;
- } else {
- return Math.max(maxX, maxY);
- }
- } else if (maxX > minY) {
- high = partitionX - 1;
- } else {
- low = partitionX + 1;
- }
- }
-
- throw new Error("Input arrays are not sorted.");
- };
-
- const nums1 = [1, 3];
- const nums2 = [2];
- const result = findMedianSortedArrays(nums1, nums2);
-
- return (
-
-
- Input: nums1 = {"[" + nums1.join(", ") + "]"}, nums2 = {"[" + nums2.join(", ") + "]"}
-
-
- Output: {result}
-
-
- );
-}
-```
-
-### Code in Different Languages
-
-
-
-
- ```js
- var findMedianSortedArrays = function(nums1, nums2) {
- if (nums1.length > nums2.length) {
- [nums1, nums2] = [nums2, nums1];
- }
-
- let x = nums1.length;
- let y = nums2.length;
- let low = 0, high = x;
-
- while (low <= high) {
- let partitionX = Math.floor((low + high) / 2);
- let partitionY = Math.floor((x + y + 1) / 2) - partitionX;
-
- let maxX = (partitionX === 0) ? -Infinity : nums1[partitionX - 1];
- let minX = (partitionX === x) ? Infinity : nums1[partitionX];
-
- let maxY = (partitionY === 0) ? -Infinity : nums2[partitionY - 1];
- let minY = (partitionY === y) ? Infinity : nums2[partitionY];
-
- if (maxX <= minY && maxY <= minX) {
- if ((x + y) % 2 === 0) {
- return (Math.max(maxX, maxY) + Math.min(minX, minY)) / 2;
- } else {
- return Math.max(maxX, maxY);
- }
- } else if (maxX > minY) {
- high = partitionX - 1;
- } else {
- low = partitionX + 1;
- }
- }
-
- throw new Error("Input arrays are not sorted.");
- };
- ```
-
-
-
-
- ```python
- class Solution:
- def findMedianSortedArrays(self, nums1: List[int], nums2: List[int]) -> float:
- if len(nums1) > len(nums2):
- nums1, nums2 = nums2, nums1
-
- x = len(nums1)
- y = len(nums2)
- low, high = 0, x
-
- while low <= high:
- partitionX = (low + high) // 2
- partitionY = (x + y + 1) // 2 - partitionX
-
- maxX = float('-inf') if partitionX == 0 else nums1[partitionX - 1]
- minX = float('inf') if partitionX == x else nums1[partitionX]
-
- maxY = float('-inf') if partitionY == 0 else nums2[partitionY - 1]
- minY = float('inf') if partitionY == y else nums2[partitionY]
-
- if maxX <= minY and maxY <= minX:
- if (x + y) % 2 == 0:
- return (max(maxX, maxY) + min(minX, minY)) / 2
- else:
- return max(maxX, maxY)
- elif maxX > minY:
- high = partitionX - 1
- else:
- low = partitionX + 1
-
- raise ValueError("Input arrays are not sorted.")
- ```
-
-
-
- ```java
- class Solution {
- public double findMedianSortedArrays(int[] nums1, int[] nums2) {
- if (nums1.length > nums2.length) {
- int[] temp = nums1;
- nums1 = nums2;
- nums2 = temp;
- }
-
- int x = nums1.length;
- int y = nums2.length;
- int low = 0, high = x;
-
- while (low <= high) {
- int partitionX = (low + high) / 2;
- int partitionY = (x + y + 1) / 2 - partitionX;
-
- int maxX = (partitionX == 0) ? Integer.MIN_VALUE : nums1[partitionX - 1];
- int minX = (partitionX == x) ? Integer.MAX_VALUE : nums1[partitionX];
-
- int maxY = (partitionY == 0) ? Integer.MIN_VALUE : nums2[partitionY - 1];
- int minY = (partitionY == y) ? Integer.MAX_VALUE : nums2[partitionY];
-
- if (maxX <= minY && maxY <= minX) {
- if ((x + y) % 2 == 0) {
- return (Math.max(maxX, maxY) + Math.min(minX, minY)) / 2.0;
- } else {
- return Math.max(maxX, maxY);
- }
- } else if (maxX > minY) {
- high = partitionX - 1;
- } else {
- low = partitionX + 1;
- }
- }
-
- throw new IllegalArgumentException("Input arrays are not sorted.");
- }
- }
- ```
-
-
-
- ```cpp
- class Solution {
- public:
- double findMedianSortedArrays(vector& nums1, vector& nums2) {
- if (nums1.size() > nums2.size()) {
- swap(nums1, nums2);
- }
-
- int x = nums1.size();
- int y = nums2.size();
- int low = 0, high = x;
-
- while (low <= high) {
- int partitionX = (low + high) / 2;
- int partitionY = (x + y + 1) / 2 - partitionX;
-
- int maxX = (partitionX == 0) ? INT_MIN : nums1[partitionX - 1];
- int minX = (partitionX == x) ? INT_MAX : nums1[partitionX];
-
- int maxY = (partitionY == 0) ? INT_MIN : nums2[partitionY - 1];
- int minY = (partitionY == y) ? INT_MAX : nums2[partitionY];
-
- if (maxX <= minY && maxY <= minX) {
- if ((x + y) % 2 == 0) {
- return (max(maxX, maxY) + min(minX, minY)) / 2.0;
- } else {
- return max(maxX, maxY);
- }
- } else if (maxX > minY) {
- high = partitionX - 1;
- } else {
- low = partitionX + 1;
- }
- }
-
- throw invalid_argument("Input arrays are not sorted.");
- }
- };
- ```
-
-
-
- ```c
- double findMedianSortedArrays(int* nums1, int nums1Size, int* nums2, int nums2Size) {
- if (nums1Size > nums2Size) {
- int* temp = nums1;
- nums1 = nums2;
- nums2 = temp;
- int tempSize = nums1Size;
- nums1Size = nums2Size;
- nums2Size = tempSize;
- }
-
- int x = nums1Size;
- int y = nums2Size;
- int low = 0, high = x;
-
- while (low <= high) {
- int partitionX = (low + high) / 2;
- int partitionY = (x + y + 1) / 2 - partitionX;
-
- int maxX = (partitionX == 0) ? INT_MIN : nums1[partitionX - 1];
- int minX = (partitionX == x) ? INT_MAX : nums1[partitionX];
-
- int maxY = (partitionY == 0) ? INT_MIN : nums2[partitionY - 1];
- int minY = (partitionY == y) ? INT_MAX : nums2[partitionY];
-
- if (maxX <= minY && maxY <= minX) {
- if ((x + y) % 2 == 0) {
- return (fmax(maxX, maxY) + fmin(minX, minY)) / 2.0;
- } else {
- return fmax(maxX, maxY);
- }
- } else if (maxX > minY) {
- high = partitionX - 1;
- } else {
- low = partitionX + 1;
- }
- }
-
- return -1;
- }
- ```
-
-
-
- ```ts
- function findMedianSortedArrays(nums1: number[], nums2: number[]): number {
- if (nums1.length > nums2.length) {
- [nums1, nums2] = [nums2, nums1];
- }
-
- let x = nums1.length;
- let y = nums2.length;
- let low = 0, high = x;
-
- while (low <= high) {
- let partitionX = Math.floor((low + high) / 2);
- let partitionY = Math.floor((x + y + 1) / 2) - partitionX;
-
- let maxX = (partitionX === 0) ? -Infinity : nums1[partitionX - 1];
- let minX = (partitionX === x) ? Infinity : nums1[partitionX];
-
- let maxY = (partitionY === 0) ? -Infinity : nums2[partitionY - 1];
- let minY = (partitionY === y) ? Infinity : nums2[partitionY];
-
- if (maxX <= minY && maxY <= minX) {
- if ((x + y) % 2 === 0) {
- return (Math.max(maxX, maxY) + Math.min(minX, minY)) / 2;
- } else {
- return Math.max(maxX, maxY);
- }
- } else if (maxX > minY) {
- high = partitionX - 1;
- } else {
- low = partitionX + 1;
- }
- }
-
- throw new Error("Input arrays are not sorted.");
- }
- ```
-
-
-
-### Complexity Analysis
-
-- **Time Complexity**: The time complexity of this approach is $O(log(min(n, m)))$, where `n` and `m` are the lengths of the two arrays. The binary search approach helps in reducing the search space and finding the median efficiently.
-- **Space Complexity**: The space complexity of this approach is $O(1)$ as we are using constant extra space.
-
-### Test Cases
-
-Let's test the solution with the sample test cases:
-
-
-
-```plaintext
-Input: nums1 = [1, 3], nums2 = [2]
-Output: 2.00000
-Explanation: merged array = [1, 2, 3] and median is 2.
-```
-
-
-```plaintext
-Input: nums1 = [1, 2], nums2 = [3, 4]
-Output: 2.50000
-Explanation: merged array = [1, 2, 3, 4] and median is (2 + 3) / 2 = 2.5.
-```
-
-
-
-
-
-
-## Approach 2: Divide and Conquer
-
-The divide and conquer approach finds the median by recursively dividing the problem into smaller subproblems. It merges two sorted arrays by comparing and removing the smallest element from the two arrays until the median is found.
-
-### Pseudocode
-
-1. Ensure `nums1` is the smaller array.
-2. If the total length of both arrays is even, find the k-th and (k+1)-th smallest elements and return their average.
-3. If the total length is odd, find the k-th smallest element.
-4. Define a helper function `getKth` to find the k-th smallest element in the combined array:
- - Base cases:
- - If one array is empty, return the k-th element from the other array.
- - If k is 1, return the minimum of the first elements of both arrays.
- - Recursive case:
- - Divide k by 2, compare the k/2-th elements of both arrays, and discard the smaller half.
-
-### Implementation and Code
-
-Here is a live code editor for you to play around with the solution:
-
-```jsx live
-function medianOfTwoSortedArraysProblem() {
- const findMedianSortedArrays = (nums1, nums2) => {
- const getKth = (nums1, nums2, k) => {
- const len1 = nums1.length;
- const len2 = nums2.length;
-
- if (len1 > len2) return getKth(nums2, nums1, k);
- if (len1 === 0) return nums2[k - 1];
- if (k === 1) return Math.min(nums1[0], nums2[0]);
-
- const i = Math.min(len1, Math.floor(k / 2));
- const j = Math.min(len2, Math.floor(k / 2));
-
- if (nums1[i - 1] > nums2[j - 1]) {
- return getKth(nums1, nums2.slice(j), k - j);
- } else {
- return getKth(nums1.slice(i), nums2, k - i);
- }
- };
-
- const len = nums1.length + nums2.length;
- if (len % 2 === 1) {
- return getKth(nums1, nums2, Math.floor(len / 2) + 1);
- } else {
- return (
- (getKth(nums1, nums2, Math.floor(len / 2)) +
- getKth(nums1, nums2, Math.floor(len / 2) + 1)) /
- 2
- );
- }
- };
-
- const nums1 = [1, 3];
- const nums2 = [2];
- const result = findMedianSortedArrays(nums1, nums2);
-
- return (
-
-
- Input: nums1 = {"[" + nums1.join(", ") + "]"}, nums2 = {"[" + nums2.join(", ") + "]"}
-
-
- Output: {result}
-
-
- );
-}
-```
-
-### Code in Different Languages
-
-
-
-
- ```js
- var findMedianSortedArrays = function(nums1, nums2) {
- const getKth = (nums1, nums2, k) => {
- const len1 = nums1.length;
- const len2 = nums2.length;
-
- if (len1 > len2) return getKth(nums2, nums1, k);
- if (len1 === 0) return nums2[k - 1];
- if (k === 1) return Math.min(nums1[0], nums2[0]);
-
- const i = Math.min(len1, Math.floor(k / 2));
- const j = Math.min(len2, Math.floor(k / 2));
-
- if (nums1[i - 1] > nums2[j - 1]) {
- return getKth(nums1, nums2.slice(j), k - j);
- } else {
- return getKth(nums1.slice(i), nums2, k - i);
- }
- };
-
- const len = nums1.length + nums2.length;
- if (len % 2 === 1) {
- return getKth(nums1, nums2, Math.floor(len / 2) + 1);
- } else {
- return (getKth(nums1, nums2, Math.floor(len / 2)) +
- getKth(nums1, nums2, Math.floor(len / 2) + 1)) / 2;
- }
- };
- ```
-
-
-
- ```python
- class Solution:
- def findMedianSortedArrays(self, nums1: List[int], nums2: List[int]) -> float:
- def getKth(nums1, nums2, k):
- if len(nums1) > len(nums2):
- return getKth(nums2, nums1, k)
- if len(nums1) == 0:
- return nums2[k - 1]
- if k == 1:
- return min(nums1[0], nums2[0])
-
- i = min(len(nums1), k // 2)
- j = min(len(nums2), k // 2)
-
- if nums1[i - 1] > nums2[j - 1]:
- return getKth(nums1, nums2[j:], k - j)
- else:
- return getKth(nums1[i:], nums2, k - i)
-
- len_combined = len(nums1) + len(nums2)
- if len_combined % 2 == 1:
- return getKth(nums1, nums2, len_combined // 2 + 1)
- else:
- return (getKth(nums1, nums2, len_combined // 2) +
- getKth(nums1, nums2, len_combined // 2 + 1)) / 2
- ```
-
-
-
- ```java
- class Solution {
- public double findMedianSortedArrays(int[] nums1, int[] nums2) {
- int len1 = nums1.length;
- int len2 = nums2.length;
-
- if (len1 > len2) {
- return findMedianSortedArrays(nums2, nums1);
- }
-
- int len = len1 + len2;
- if (len % 2 == 1) {
- return getKth(nums1, nums2, len / 2 + 1);
- } else {
- return (getKth(nums1, nums2, len / 2) + getKth(nums1, nums2, len / 2 + 1)) / 2.0;
- }
- }
-
- private int getKth(int[] nums1, int[] nums2, int k) {
- int len1 = nums1.length;
- int len2 = nums2.length;
-
- if (len1 > len2) {
- return getKth(nums2, nums1, k);
- }
- if (len1 == 0) {
- return nums2[k - 1];
- }
- if (k == 1) {
- return Math.min(nums1[0], nums2[0]);
- }
-
- int i = Math.min(len1, k / 2);
- int j = Math.min(len2, k / 2);
-
- if (nums1[i - 1] > nums2[j - 1]) {
- return getKth(nums1, Arrays.copyOfRange(nums2, j, len2), k - j);
- } else {
- return getKth(Arrays.copyOfRange(nums1, i, len1), nums2, k - i);
- }
- }
- }
- ```
-
-
-
- ```cpp
- class Solution {
- public:
- double findMedianSortedArrays(vector& nums1, vector& nums2) {
- int len1 = nums1.size();
- int len2 = nums2.size();
-
- if (len1 > len2) {
- return findMedianSortedArrays(nums2, nums1);
- }
-
- int len = len1 + len2;
- if (len % 2 == 1) {
- return getKth(nums1, nums2, len / 2 + 1);
- } else {
- return (getKth(nums1, nums2, len / 2) + getKth(nums1, nums2, len / 2 + 1)) / 2.0;
- }
- }
-
- private:
- int getKth(vector& nums1, vector& nums2, int k) {
- int len1 = nums1.size();
- int len2 = nums2.size();
-
- if (len1 > len2) {
- return getKth(nums2, nums1, k);
- }
- if (len 1 == 0) {
- return nums2[k - 1];
- }
- if (k == 1) {
- return min(nums1[0], nums2[0]);
- }
-
- int i = min(len1, k / 2);
- int j = min(len2, k / 2);
-
- if (nums1[i - 1] > nums2[j - 1]) {
- return getKth(nums1, vector(nums2.begin() + j, nums2.end()), k - j);
- } else {
- return getKth(vector(nums1.begin() + i, nums1.end()), nums2, k - i);
- }
- }
- };
- ```
-
-
-
- ```c
- double findMedianSortedArrays(int* nums1, int nums1Size, int* nums2, int nums2Size) {
- if (nums1Size > nums2Size) {
- return findMedianSortedArrays(nums2, nums2Size, nums1, nums1Size);
- }
-
- int len = nums1Size + nums2Size;
- if (len % 2 == 1) {
- return getKth(nums1, nums1Size, nums2, nums2Size, len / 2 + 1);
- } else {
- return (getKth(nums1, nums1Size, nums2, nums2Size, len / 2) + getKth(nums1, nums1Size, nums2, nums2Size, len / 2 + 1)) / 2.0;
- }
- }
-
- double getKth(int* nums1, int nums1Size, int* nums2, int nums2Size, int k) {
- if (nums1Size > nums2Size) {
- return getKth(nums2, nums2Size, nums1, nums1Size, k);
- }
- if (nums1Size == 0) {
- return nums2[k - 1];
- }
- if (k == 1) {
- return fmin(nums1[0], nums2[0]);
- }
-
- int i = fmin(nums1Size, k / 2);
- int j = fmin(nums2Size, k / 2);
-
- if (nums1[i - 1] > nums2[j - 1]) {
- return getKth(nums1, nums1Size, nums2 + j, nums2Size - j, k - j);
- } else {
- return getKth(nums1 + i, nums1Size - i, nums2, nums2Size, k - i);
- }
- }
- ```
-
-
-
- ```ts
- function findMedianSortedArrays(nums1: number[], nums2: number[]): number {
- const getKth = (nums1: number[], nums2: number[], k: number): number => {
- if (nums1.length > nums2.length) return getKth(nums2, nums1, k);
- if (nums1.length === 0) return nums2[k - 1];
- if (k === 1) return Math.min(nums1[0], nums2[0]);
-
- const i = Math.min(nums1.length, Math.floor(k / 2));
- const j = Math.min(nums2.length, Math.floor(k / 2));
-
- if (nums1[i - 1] > nums2[j - 1]) {
- return getKth(nums1, nums2.slice(j), k - j);
- } else {
- return getKth(nums1.slice(i), nums2, k - i);
- }
- };
-
- const len = nums1.length + nums2.length;
- if (len % 2 === 1) {
- return getKth(nums1, nums2, Math.floor(len / 2) + 1);
- } else {
- return (
- (getKth(nums1, nums2, Math.floor(len / 2)) +
- getKth(nums1, nums2, Math.floor(len / 2) + 1)) /
- 2
- );
- }
- }
- ```
-
-
-
-### Complexity Analysis
-
-- **Time Complexity**: The time complexity of this approach is $O(log(min(n, m)))$, where `n` and `m` are the lengths of the two arrays. Each recursive call divides the problem into half.
-- **Space Complexity**: The space complexity of this approach is $O(1)$ as we are using constant extra space.
-
-### Test Cases
-
-Let's test the solution with the sample test cases:
-
-
-
-```plaintext
-Input: nums1 = [1, 3], nums2 = [2]
-Output: 2.00000
-Explanation: merged array = [1, 2, 3] and median is 2.
-```
-
-
-```plaintext
-Input: nums1 = [1, 2], nums2 = [3, 4]
-Output: 2.50000
-Explanation: merged array = [1, 2, 3, 4] and median is (2 + 3) / 2 = 2.5.
-```
-
-
-
-
-
-:::info
-
-**Note**: The binary search approach is more efficient than the divide and conquer approach as it has a better time complexity of $O(log(min(n, m)))$ compared to the divide and conquer approach. However, both approaches provide a solution to the problem of finding the median of two sorted arrays.
-
-**Which approach is best for you?**
-
-The binary search approach is more efficient and recommended for solving the problem of finding the median of two sorted arrays. However, the divide and conquer approach is also a valid solution and can be used if needed.
-
-:::
-
-:::tip
-When asked to find the median of two sorted arrays, a direct approach that merges the two arrays and then finds the median will work but isn't optimal. Given the problem's constraints, we can leverage the fact that the arrays are already sorted and use binary search to find the median in $$ O(\log(\min(n, m))) $$ time complexity.
-
-The key idea is to use binary search to partition the smaller array in such a way that we can easily find the median by comparing elements around the partition.
-
-#### Detailed Explanation
-
-1. **Ensure the Smaller Array is First**:
- - This step is to make sure we always perform the binary search on the smaller array, which helps us manage the partition logic more easily. Let $$ \text{nums1} $$ be the smaller array and $$ \text{nums2} $$ be the larger array.
-
-2. **Set Up Binary Search**:
- - Initialize $$ \text{low} $$ and $$ \text{high} $$ pointers for the binary search on $$ \text{nums1} $$.
- - We aim to partition $$ \text{nums1} $$ and $$ \text{nums2} $$ such that the left side of the combined arrays contains half of the elements, and the right side contains the other half.
-
-3. **Partitioning the Arrays**:
- - Calculate $$ \text{partitionX} $$ as the midpoint of $$ \text{nums1} $$.
- - Calculate $$ \text{partitionY} $$ such that the left side of the combined arrays has the same number of elements as the right side. This can be achieved by:
- $$
- \text{partitionY} = \frac{(x + y + 1)}{2} - \text{partitionX}
- $$
-
- where $$ x $$ and $$ y $$ are the lengths of $$ \text{nums1} $$ and $$ \text{nums2} $$ respectively.
-
-4. **Boundary Conditions**:
- - Handle cases where partitions might go out of bounds. If $$ \text{partitionX} $$ is 0, it means there are no elements on the left side of $$ \text{nums1} $$. If $$ \text{partitionX} $$ is $$ x $$, it means there are no elements on the right side of $$ \text{nums1} $$.
-
-5. **Check Valid Partition**:
- - A valid partition is one where the maximum element on the left side of both partitions is less than or equal to the minimum element on the right side of both partitions:
- $$
- \text{maxX} \leq \text{minY} \quad \text{and} \quad \text{maxY} \leq \text{minX}
- $$
- Here, $$ \text{maxX} $$ is the largest element on the left side of $$ \text{nums1} $$, $$ \text{minX} $$ is the smallest element on the right side of $$ \text{nums1} $$, and similarly for $$ \text{nums2} $$.
-
-6. **Calculate the Median**:
- - If the total number of elements $$ (x + y) $$ is even, the median is the average of the two middle values:
- $$
- \text{median} = \frac{\text{max(maxX, maxY)} + \text{min(minX, minY)}}{2}
- $$
- - If the total number of elements is odd, the median is the maximum element of the left partition:
- $$
- \text{median} = \text{max(maxX, maxY)}
- $$
-
-7. **Adjust Binary Search**:
- - If $$ \text{maxX} > \text{minY} $$, it means we need to move the partition in $$ \text{nums1} $$ to the left, so adjust $$ \text{high} $$.
- - If $$ \text{maxY} > \text{minX} $$, it means we need to move the partition in $$ \text{nums1} $$ to the right, so adjust $$ \text{low} $$.
-
-:::
-
----
-
-Authors:
-
-
-{['ajay-dhangar'].map(username => (
-
-))}
-
\ No newline at end of file
diff --git a/dsa-solutions/lc-solutions/0000-0099/0005-Longest-palindrome-substring.md b/dsa-solutions/lc-solutions/0000-0099/0005-Longest-palindrome-substring.md
deleted file mode 100644
index d8eff1486..000000000
--- a/dsa-solutions/lc-solutions/0000-0099/0005-Longest-palindrome-substring.md
+++ /dev/null
@@ -1,217 +0,0 @@
----
-id: longest-alindromic-substring
-title: Longest Palindromic Substring(LeetCode)
-sidebar_label: 0005-Longest Palindrome Substring
-tags:
- - String
- - Dynamic Programming
-description: Given a string s, return the longest palindromic substring in s.
-sidebar_position: 5
----
-
-## Problem Statement
-
-Given a string `s`, return the longest palindromic substring in `s`.
-
-### Examples
-
-**Example 1:**
-
-```plaintext
-Input: s = "babad"
-Output: "bab"
-Explanation: "aba" is also a valid answer.
-```
-
-**Example 2:**
-
-```plaintext
-Input: s = "cbbd"
-Output: "bb"
-```
-
-### Constraints
-
-- `1 <= s.length <= 1000`
-- `s` consist of only digits and English letters.
-
-## Solution
-
-### Approach 1: Check All Substrings
-
-#### Intuition
-
-We can start with a brute-force approach. We will simply check if each substring is a palindrome, and take the longest one that is.
-
-#### Algorithm
-
-1. Create a helper method `check(i, j)` to determine if a substring is a palindrome.
-2. Use two pointers to iterate from the start and end of the substring towards the center.
-3. If characters at both pointers are equal, move the pointers inward.
-4. Use nested loops to check all possible substrings and use the helper method to determine if they are palindromes.
-5. Keep track of the longest palindrome found.
-
-#### Implementation
-
-```python
-def longestPalindrome(s: str) -> str:
- def check(l, r):
- while l >= 0 and r < len(s) and s[l] == s[r]:
- l -= 1
- r += 1
- return s[l+1:r]
-
- longest = ""
- for i in range(len(s)):
- odd_palindrome = check(i, i)
- even_palindrome = check(i, i + 1)
- longest = max(longest, odd_palindrome, even_palindrome, key=len)
-
- return longest
-```
-
-### Complexity Analysis
-
-- **Time complexity**: $O(n^3)$ - We check each substring, and checking each substring takes $O(n)$ time.
-- **Space complexity**: $O(1)$ - We use a constant amount of extra space.
-
-### Approach 2: Dynamic Programming
-
-#### Intuition
-
-If we know a substring is a palindrome, we can extend it if the characters on both ends match.
-
-#### Algorithm
-
-1. Initialize a 2D DP table with `False`.
-2. Mark all single-character substrings as palindromes.
-3. Check substrings of length 2 and mark them if characters match.
-4. Use the table to extend palindromes to longer substrings.
-5. Keep track of the longest palindrome found.
-
-#### Implementation
-
-```python
-def longestPalindrome(s: str) -> str:
- n = len(s)
- dp = [[False] * n for _ in range(n)]
- longest = ""
-
- for i in range(n):
- dp[i][i] = True
- longest = s[i]
-
- for i in range(n-1):
- if s[i] == s[i+1]:
- dp[i][i+1] = True
- longest = s[i:i+2]
-
- for length in range(3, n+1):
- for i in range(n-length+1):
- j = i + length - 1
- if s[i] == s[j] and dp[i+1][j-1]:
- dp[i][j] = True
- longest = s[i:j+1]
-
- return longest
-```
-
-### Complexity Analysis
-
-- **Time complexity**: $O(n^2)$ - We fill an `n * n` table.
-- **Space complexity**: $O(n^2)$ - We use an `n * n` table to store the DP results.
-
-### Approach 3: Expand From Centers
-
-#### Intuition
-
-A palindrome mirrors around its center. We can expand around potential centers to find palindromes.
-
-#### Algorithm
-
-1. Consider each character and pair of characters as potential centers.
-2. Expand around each center to find the longest palindrome.
-3. Keep track of the longest palindrome found.
-
-#### Implementation
-
-```python
-def longestPalindrome(s: str) -> str:
- def expandAroundCenter(s, left, right):
- while left >= 0 and right < len(s) and s[left] == s[right]:
- left -= 1
- right += 1
- return s[left + 1:right]
-
- if not s:
- return ""
-
- longest = s[0]
-
- for i in range(len(s)):
- odd_palindrome = expandAroundCenter(s, i, i)
- even_palindrome = expandAroundCenter(s, i, i + 1)
- longest = max(longest, odd_palindrome, even_palindrome, key=len)
-
- return longest
-```
-
-### Complexity Analysis
-
-- **Time complexity**: $O(n^2)$ - We expand around each center, which takes $O(n)$ time.
-- **Space complexity**: $O(1)$ - We use a constant amount of extra space.
-
-### Approach 4: Manacher's Algorithm
-
-#### Intuition
-
-Manacher's algorithm can find the longest palindromic substring in linear time.
-
-#### Algorithm
-
-1. Transform the string to handle even-length palindromes.
-2. Use a helper array to store the length of the palindrome at each position.
-3. Use the properties of palindromes and the helper array to efficiently find the longest palindrome.
-
-#### Implementation
-
-```python
-def longestPalindrome(s: str) -> str:
- if not s:
- return ""
-
- # Transform s into new string with inserted boundaries
- T = '#'.join(f"^{s}$")
- n = len(T)
- P = [0] * n
- C = R = 0
-
- for i in range(1, n - 1):
- P[i] = (R > i) and min(R - i, P[2 * C - i])
- while T[i + P[i] + 1] == T[i - P[i] - 1]:
- P[i] += 1
- if i + P[i] > R:
- C, R = i, i + P[i]
-
- max_len, center_index = max((n, i) for i, n in enumerate(P))
- return s[(center_index - max_len) // 2: (center_index + max_len) // 2]
-```
-
-### Complexity Analysis
-
-- **Time complexity**: $O(n)$ - Manacher's algorithm runs in linear time.
-- **Space complexity**: $O(n)$ - We use an array of length `n` to store the lengths of palindromes.
-
-### Conclusion
-
-We discussed four approaches to solve the "Longest Palindromic Substring" problem, each with varying complexities and trade-offs. The dynamic programming and center expansion approaches provide a good balance of simplicity and efficiency for practical use cases, while Manacher's algorithm offers the optimal theoretical performance.
-
----
-
-Authors:
-
-
-{['Yashgabani845', 'ajay-dhangar'].map(username => (
-
-))}
-
\ No newline at end of file
diff --git a/dsa-solutions/lc-solutions/0000-0099/0006-ZigZag-Conversion.md b/dsa-solutions/lc-solutions/0000-0099/0006-ZigZag-Conversion.md
deleted file mode 100644
index 5455474c1..000000000
--- a/dsa-solutions/lc-solutions/0000-0099/0006-ZigZag-Conversion.md
+++ /dev/null
@@ -1,236 +0,0 @@
----
-id: zigzag-conversion
-title: Zigzag Conversion (LeetCode)
-sidebar_label: 0006-Zigzag Conversion
-tags:
- - String
- - Java
- - C++
- - Python
-description: Convert the given string into a zigzag pattern with a specified number of rows.
-sidebar_position: 6
----
-
-## Problem Statement
-
-The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this:
-
-```plaintext
-P A H N
-A P L S I I G
-Y I R
-```
-
-And then read line by line: "PAHNAPLSIIGYIR"
-
-Write the code that will take a string and make this conversion given a number of rows:
-
-```python
-string convert(string s, int numRows)
-```
-
-### Examples
-
-**Example 1:**
-
-Input:
-
-```
-s = "PAYPALISHIRING", numRows = 3
-```
-
-Output:
-
-```
-"PAHNAPLSIIGYIR"
-```
-
-**Example 2:**
-
-Input:
-
-```
-s = "PAYPALISHIRING", numRows = 4
-```
-
-Output:
-
-```
-"PINALSIGYAHRPI"
-```
-
-Explanation:
-
-```
-P I N
-A L S I G
-Y A H R
-P I
-```
-
-**Example 3:**
-
-Input:
-
-```
-s = "A", numRows = 1
-```
-
-Output:
-
-```
-"A"
-```
-
-### Constraints
-
-- 0 < s.length < 1001
-- s consists of English letters (lower-case and upper-case), ',' and '.'.
-- 0 < numRows < 1000
-
-## Intuition
-
-Just look at the top row what is the difference between each character, i.e., A and I, and I and Q = 8 (5*2-2 == number of rows * 2 - 2, the corner elements are excluded). Similarly for each row, i.e., B and J, the difference is 8.
-
-The interesting part comes when the character in the diagonal has to be added, but even this has a pattern:
-
-- There will be no character in between for row 0 and row n.
-- There can be only one diagonal character, and the diagonal difference is original difference - 2 at each step or diff - (rowNumber\*2);
-
-## Approach
-
-1. Create an empty StringBuilder which is our answer.
-2. Calculate the difference = numRows\*2 - 2.
-3. Iterate over 0 to rowNumber in a for loop.
-4. The first character will be row number or i (append to String).
-5. Write a while loop in the above for loop:
- - The first character will be row number or i (append to String).
- - Calculate the diagonal difference if any and append to the String.
- - Increase the index by diff and return ans.
-
-### Java Solution
-
-```java
-class Solution {
- public String convert(String s, int numRows) {
- if (numRows == 1) {
- return s;
- }
-
- StringBuilder answer = new StringBuilder();
- int n = s.length();
- int diff = 2 * (numRows - 1);
- int diagonalDiff = diff;
- int secondIndex;
- int index;
- for (int i = 0; i < numRows; i++) {
- index = i;
-
- while (index < n) {
- answer.append(s.charAt(index));
- if (i != 0 && i != numRows - 1) {
- diagonalDiff = diff-2*i;
- secondIndex = index + diagonalDiff;
-
- if (secondIndex < n) {
- answer.append(s.charAt(secondIndex));
- }
- }
- index += diff;
- }
- }
-
- return answer.toString();
- }
-}
-```
-
-### C++ Solution
-
-```cpp
-class Solution {
-public:
- string convert(string s, int numRows) {
- if (numRows == 1) {
- return s;
- }
-
- stringstream answer;
- int n = s.length();
- int diff = 2 * (numRows - 1);
- int diagonalDiff = diff;
- int secondIndex;
- int index;
- for (int i = 0; i < numRows; i++) {
- index = i;
-
- while (index < n) {
- answer << s[index];
- if (i != 0 && i != numRows - 1) {
- diagonalDiff = diff-2*i;
- secondIndex = index + diagonalDiff;
-
- if (secondIndex < n) {
- answer << s[secondIndex];
- }
- }
- index += diff;
- }
- }
-
- return answer.str();
- }
-};
-```
-
-### Python Solution
-
-```python
-class Solution:
- def convert(self, s: str, numRows: int) -> str:
- if numRows == 1:
- return s
- answer = ''
- n = len(s)
- diff = 2 * (numRows - 1)
- diagonal_diff = diff
- second_index = 0
- index = 0
- for i in range(numRows):
- index = i
- while index < n:
- answer += s[index]
- if i != 0 and i != numRows - 1:
- diagonal_diff = diff - 2 * i
- second_index = index + diagonal_diff
- if second_index < n:
- answer += s[second_index]
- index += diff
- return answer
-```
-
-### Complexity Analysis
-
-#### Approach 1: Iterative Approach
-
-- **Time Complexity**: $O(n)$, where n is the length of the input string `s`. We iterate through the entire string once.
-- **Space Complexity**: $O(n)$, where n is the length of the input string `s`. We use a StringBuilder to store the output.
-
-#### Approach 2: Using StringBuilder Rows
-
-- **Time Complexity**: $O(n)$, where n is the length of the input string `s`. We iterate through the entire string once to fill the rows of the StringBuilder.
-- **Space Complexity**:$O(n)$, where n is the length of the input string `s`. We use a StringBuilder to store the output.
-
-#### Approach 3: Direct Construction
-
-- **Time Complexity**: $O(n)$, where n is the length of the input string `s`. We iterate through the entire string once to construct the output string.
-- **Space Complexity**: $O(n)$, where n is the length of the input string `s`. We use a StringBuilder to store the output.
-
-#### Approach 4: Using Mathematical Formula
-
-- **Time Complexity**: $O(n)$, where n is the length of the input string `s`. We iterate through the entire string once to construct the output string.
-- **Space Complexity**: $O(n)$, where n is the length of the input string `s`. We use a StringBuilder to store the output.
-
-### Conclusion
-
-We explored four different approaches to solve the Zigzag Conversion problem, each offering a unique perspective and trade-offs in terms of simplicity and efficiency. All four approaches have a linear time complexity of $O(n)$, where n is the length of the input string `s`. The space complexity varies slightly among the approaches but remains linear in terms of the input size.
diff --git a/dsa-solutions/lc-solutions/0000-0099/0007-Reverse-Integers.md b/dsa-solutions/lc-solutions/0000-0099/0007-Reverse-Integers.md
deleted file mode 100644
index 39c0d542a..000000000
--- a/dsa-solutions/lc-solutions/0000-0099/0007-Reverse-Integers.md
+++ /dev/null
@@ -1,160 +0,0 @@
----
-id: reverse-integer
-title: Reverse Integer(LeetCode)
-sidebar_label: 0007-Reverse Integer
-tags:
- - Math
- - Simulation
-description: Given a signed 32-bit integer x, return x with its digits reversed. If reversing x causes the value to go outside the signed 32-bit integer range [-2^31, 2^31 - 1], then return 0.
-sidebar_position: 7
----
-
-## Problem Statement
-Given a signed 32-bit integer `x`, return `x` with its digits reversed. If reversing `x` causes the value to go outside the signed 32-bit integer range [-2^31, 2^31 - 1], then return 0.
-
-### Examples
-
-**Example 1:**
-
-```
-Input: x = 123
-Output: 321
-```
-
-**Example 2:**
-
-```
-Input: x = -123
-Output: -321
-```
-
-**Example 3:**
-
-```
-Input: x = 120
-Output: 21
-```
-
-### Constraints
-
-- `-2^31 <= x <= 2^31 - 1`
-
-## Solution
-
-### Approach 1: Pop and Push Digits & Check before Overflow
-
-#### Intuition
-
-We can build up the reverse integer one digit at a time while checking for overflow.
-
-#### Algorithm
-
-1. Repeatedly "pop" the last digit off of `x` and "push" it to the back of `rev`.
-2. Before pushing, check if appending another digit would cause overflow.
-
-#### C++ Implementation
-
-```cpp
-class Solution {
-public:
- int reverse(int x) {
- int rev = 0;
- while (x != 0) {
- int pop = x % 10;
- x /= 10;
- if (rev > INT_MAX / 10 || (rev == INT_MAX / 10 && pop > 7))
- return 0;
- if (rev < INT_MIN / 10 || (rev == INT_MIN / 10 && pop < -8))
- return 0;
- rev = rev * 10 + pop;
- }
- return rev;
- }
-};
-```
-
-#### Java Implementation
-
-```java
-class Solution {
- public int reverse(int x) {
- int rev = 0;
- while (x != 0) {
- int pop = x % 10;
- x /= 10;
- if (rev > Integer.MAX_VALUE / 10 || (rev == Integer.MAX_VALUE / 10 && pop > 7))
- return 0;
- if (rev < Integer.MIN_VALUE / 10 || (rev == Integer.MIN_VALUE / 10 && pop < -8))
- return 0;
- rev = rev * 10 + pop;
- }
- return rev;
- }
-}
-```
-
-#### Python Implementation
-
-```python
-def reverse(x: int) -> int:
- rev = 0
- while x != 0:
- pop = x % 10
- x //= 10
- if rev > 0 and (rev > 2**31 // 10 or (rev == 2**31 // 10 and pop > 7)):
- return 0
- if rev < 0 and (rev < -2**31 // 10 or (rev == -2**31 // 10 and pop < -8)):
- return 0
- rev = rev * 10 + pop
- return rev
-```
-
-#### JavaScript Implementation
-
-```javascript
-var reverse = function (x) {
- let rev = 0;
- while (x !== 0) {
- let pop = x % 10;
- x = (x - pop) / 10;
- if (
- rev > Math.pow(2, 31) / 10 ||
- (rev == Math.pow(2, 31) / 10 && pop > 7)
- )
- return 0;
- if (
- rev < Math.pow(-2, 31) / 10 ||
- (rev == Math.pow(-2, 31) / 10 && pop < -8)
- )
- return 0;
- rev = rev * 10 + pop;
- }
- return rev;
-};
-```
-
-#### Python Class Implementation
-
-```python
-class Solution:
- def reverse(self, x: int) -> int:
- sign = [1, -1][x < 0]
- rev, x = 0, abs(x)
- while x:
- x, mod = divmod(x, 10)
- rev = rev * 10 + mod
- if rev > 2**31 - 1:
- return 0
- return sign * rev
-```
-
-### Complexity Analysis
-
-- **Time Complexity**: $O(log(x))$. There are roughly log10(x) digits in `x`.
-- **Space Complexity**: $O(1)$.
-
-### Conclusion
-
-We have successfully solved the "Reverse Integer" problem using a simple approach that reverses the digits of the given integer while handling overflow conditions. This solution provides an efficient way to reverse an integer without the need for any additional data structures.
-
-```
\ No newline at end of file
diff --git a/dsa-solutions/lc-solutions/0000-0099/0008-String-to-Integer.md b/dsa-solutions/lc-solutions/0000-0099/0008-String-to-Integer.md
deleted file mode 100644
index 3b4926cb0..000000000
--- a/dsa-solutions/lc-solutions/0000-0099/0008-String-to-Integer.md
+++ /dev/null
@@ -1,145 +0,0 @@
----
-id: string-to-integer
-title: String to Integer(LeetCode)
-sidebar_label: 0008-String to Integer
-tags:
- - String
- - Math
-description: Implement the myAtoi(string s) function, which converts a string to a 32-bit signed integer.
-sidebar_position: 8
----
-
-## Problem Statement
-
-Implement the `myAtoi(string s)` function, which converts a string to a 32-bit signed integer.
-
-The algorithm for `myAtoi(string s)` is as follows:
-
-1. **Whitespace:** Ignore any leading whitespace (" ").
-2. **Signedness:** Determine the sign by checking if the next character is '-' or '+', assuming positivity is neither present.
-3. **Conversion:** Read the integer by skipping leading zeros until a non-digit character is encountered or the end of the string is reached. If no digits were read, then the result is 0.
-4. **Rounding:** If the integer is out of the 32-bit signed integer range [-2^31, 2^31 - 1], then round the integer to remain in the range. Specifically, integers less than -2^31 should be rounded to -2^31, and integers greater than 2^31 - 1 should be rounded to 2^31 - 1.
-5. Return the integer as the final result.
-
-### Examples
-
-**Example 1:**
-
-```
-Input: s = "42"
-Output: 42
-```
-
-**Example 2:**
-
-```
-Input: s = " -042"
-Output: -42
-```
-
-**Example 3:**
-
-```
-Input: s = "1337c0d3"
-Output: 1337
-```
-
-**Example 4:**
-
-```
-Input: s = "0-1"
-Output: 0
-```
-
-**Example 5:**
-
-```
-Input: s = "words and 987"
-Output: 0
-```
-
-### Constraints
-
-- 0 < s.length < 200
-- s consists of English letters (lower-case and upper-case), digits (0-9), ' ', '+', '-', and '.'.
-
-## Solution
-
-### Approach
-
-#### Intuition
-
-The function should iterate through the string, handling leading whitespaces, signs, and valid digits. It should accumulate the numerical value while checking for overflow conditions.
-
-#### Algorithm
-
-1. **Handling Empty String:**
- - If `s.length() == 0`, return 0 as there's no numerical content.
-
-2. **Skipping Leading Whitespaces:**
- - Iterate through characters (`s.charAt(i)`) as long as they are whitespaces (' ') and the index `i` is within the string bounds. This skips any leading whitespaces before the potential number.
-
-3. **Handling Optional Sign:**
- - Check if the first non-whitespace character (`s.charAt(i)`) is a sign ('-' or '+').
- - If it's a minus sign, set the `sign` variable to -1 to indicate a negative number.
-
-4. **Converting Digits:**
- - Iterate through characters as long as they are valid digits (between '0' and '9') and the index `i` is within the string bounds.
- - Convert the current character (assumed to be a digit) to its corresponding integer value by subtracting the ASCII value of '0'.
-
-5. **Overflow Handling:**
- - Check for potential overflow situations for positive numbers:
- - Compare the current accumulated value (`ans`) with the maximum integer value (`max`) divided by 10 (considering the next digit) and the remainder (`max % 10`).
- - If `ans` is already greater than the maximum divided by 10, or if `ans` is equal to the maximum divided by 10 and the current digit is greater than the remainder, it signifies overflow.
- - In case of overflow, return the maximum positive value if the sign is positive, or the minimum negative value if the sign is negative.
-
-6. **Returning the Result:**
- - After processing all valid digits, multiply the final `ans` by the `sign` (1 for positive, -1 for negative) and return it as the converted integer value.
-
-### Code
-
-#### Java Implementation
-
-```java
-class Solution {
- public int myAtoi(String s) {
- int ans = 0;
- int i = 0;
- int sign = 1;
- int max = Integer.MAX_VALUE;
- int min = Integer.MIN_VALUE;
- if (s.length() == 0) {
- return 0;
- }
- while (i < s.length() && s.charAt(i) == ' ') {
- i++;
- }
- if (i < s.length() && (s.charAt(i) == '-' || s.charAt(i) == '+')) {
- if (s.charAt(i) == '-') {
- sign = -1;
- }
- i++;
- }
- while (i < s.length() && s.charAt(i) - '0' <= 9 && s.charAt(i) - '0' >= 0) {
- int digit = s.charAt(i) - '0';
- if (ans > max / 10 || (ans == max / 10 && digit > max % 10)) {
- return (sign == 1) ? max : min;
- }
- ans = ans * 10 + digit;
- i++;
- }
- return ans * sign;
- }
-}
-```
-
-### Complexity Analysis
-
-- **Time Complexity**: $O(n)$, where n is the length of the string `s`.
-- **Space Complexity**: $O(1)$, due to the constant number of variables used.
-
-## Conclusion
-
-We have successfully implemented the `myAtoi` function to convert a string to a 32-bit signed integer. The solution handles leading whitespaces, signs, valid digits, and overflow conditions efficiently, providing a robust string-to-interger(atoi)
-
-```
\ No newline at end of file
diff --git a/dsa-solutions/lc-solutions/0000-0099/0009-Palindrome-number.md b/dsa-solutions/lc-solutions/0000-0099/0009-Palindrome-number.md
deleted file mode 100644
index 481852e20..000000000
--- a/dsa-solutions/lc-solutions/0000-0099/0009-Palindrome-number.md
+++ /dev/null
@@ -1,234 +0,0 @@
----
-id: palindrome-number
-title: Palindrome Number (LeetCode)
-sidebar_label: 0009 - Palindrome Number
-tags:
- - Math
- - Palindrome
-description: Given an integer x, return true if x is a palindrome, and false otherwise.
-sidebar_position: 9
----
-
-## Problem Statement
-
-Given an integer `x`, return `true` if `x` is a palindrome, and `false` otherwise.
-
-### Examples
-
-**Example 1:**
-
-```
-Input: x = 121
-Output: true
-Explanation: 121 reads as 121 from left to right and from right to left.
-```
-
-**Example 2:**
-
-```
-Input: x = -121
-Output: false
-Explanation: From left to right, it reads -121. From right to left, it becomes 121-. Therefore it is not a palindrome.
-```
-
-**Example 3:**
-
-```
-Input: x = 10
-Output: false
-Explanation: Reads 01 from right to left. Therefore it is not a palindrome.
-```
-
-### Constraints
-
-- -2^31 < x < 2^31 - 1
-
-## Solution
-
-### Approach 1: Reversing the Entire Number
-
-#### Intuition
-
-The intuition behind this approach is to reverse the entire input number and check if the reversed number is equal to the original number. If they are the same, then the number is a palindrome.
-
-#### Algorithm
-
-1. **Handling Special Cases:**
- - If `x` is negative, return `false`, as negative numbers cannot be palindromes.
-2. **Reversing the Number:**
- - Initialize two variables: `reversed` and `temp`.
- - Enter a loop that continues until `temp` becomes zero:
- - Inside the loop:
- - Extract the last digit of `temp` using modulo `%` and store it in `digit`.
- - Reverse the number by multiplying `reversed` by 10 and adding the extracted `digit`.
- - Divide `temp` by 10 to remove the last digit and move to the next iteration.
-3. **Comparison:**
- - Compare the reversed value `reversed` with the original input value `x`.
- - If they are equal, return `true`; otherwise, return `false`.
-
-#### Code (C++)
-
-```cpp
-class Solution {
-public:
- bool isPalindrome(int x) {
- if (x < 0) {
- return false;
- }
-
- long long reversed = 0;
- long long temp = x;
-
- while (temp != 0) {
- int digit = temp % 10;
- reversed = reversed * 10 + digit;
- temp /= 10;
- }
-
- return (reversed == x);
- }
-};
-```
-
-#### Code (Java)
-
-```java
-class Solution {
- public boolean isPalindrome(int x) {
- if (x < 0) {
- return false;
- }
-
- long reversed = 0;
- long temp = x;
-
- while (temp != 0) {
- int digit = (int) (temp % 10);
- reversed = reversed * 10 + digit;
- temp /= 10;
- }
-
- return (reversed == x);
- }
-}
-```
-
-#### Code (Python)
-
-```python
-class Solution:
- def isPalindrome(self, x: int) -> bool:
- if x < 0:
- return False
-
- reversed_num = 0
- temp = x
-
- while temp != 0:
- digit = temp % 10
- reversed_num = reversed_num * 10 + digit
- temp //= 10
-
- return reversed_num == x
-```
-
-### Approach 2: Reversing Half of the Number
-
-#### Intuition
-
-Instead of reversing the entire number, we can reverse only the last half of the number. This approach is more efficient in terms of time complexity and memory usage.
-
-#### Algorithm
-
-1. **Handling Special Cases:**
- - If `x` is negative or ends with a zero, return `false`.
-2. **Reversing the Second Half:**
- - Initialize two variables: `reversed` and `original`.
- - Enter a loop that continues until the first half of the digits (represented by `x`) becomes less than or equal to the reversed second half (`reversed`):
- - Inside the loop:
- - Extract the last digit of `x` using modulo `%` and add it to the `reversed` variable after multiplying it by 10 (shifting the existing digits to the left).
- - Divide `x` by 10 to remove the last digit and move towards the center of the number.
-3. **Comparison:**
- - Compare the first half of the digits (`x`) with the reversed second half (`reversed`) to determine if the number is a palindrome:
- - For an even number of digits, compare `x` with `reversed`.
- - For an odd number of digits, compare `x` with `reversed / 10` (ignoring the middle digit).
- - If the comparison holds true, return `true`; otherwise, return `false`.
-
-#### Code (C++)
-
-```cpp
-class Solution {
-public:
- bool isPalindrome(int x) {
- if (x < 0 || (x != 0 && x % 10 == 0)) {
- return false;
- }
-
- int reversed = 0;
- int original = x;
-
- while (x > reversed) {
- reversed = reversed * 10 + x % 10;
- x /= 10;
- }
-
- return (x == reversed) || (x == reversed / 10);
- }
-};
-```
-
-#### Code (Java)
-
-```java
-class Solution {
- public boolean isPalindrome(int x) {
- if (x < 0 || (x != 0 && x % 10 == 0)) {
- return false;
- }
-
- int reversed = 0;
- int original = x;
-
- while (x > reversed) {
- reversed = reversed * 10 + x % 10;
- x /= 10;
- }
-
- return (x == reversed) || (x == reversed / 10);
- }
-}
-```
-
-#### Code (Python)
-
-```python
-class Solution:
- def isPalindrome(self, x: int) -> bool:
- if x < 0 or (x != 0 and x % 10 == 0):
- return False
-
- reversed_num = 0
- original = x
-
- while x > reversed_num:
- reversed_num = reversed_num * 10 + x % 10
- x //= 10
-
- return x == reversed_num or x == reversed_num // 10
-```
-
-## Complexity Analysis
-
-### Approach 1: Reversing the Entire Number
-
-- **Time Complexity**: $O(log10(x))$, where x is the input number.
-- **Space Complexity**: $O(1)$.
-
-### Approach 2: Reversing Half of the Number
-
-- **Time Complexity**: $O(log10(x))$, where x is the input number.
-- **Space Complexity**: $O(1)$.
-
-## Conclusion
-
-We have explored two approaches to determine whether an integer is a palindrome. Both approaches provide efficient solutions, with the second approach being slightly more optimized in terms of time and space complexity. These solutions offer different perspectives on how
\ No newline at end of file
diff --git a/dsa-solutions/lc-solutions/0000-0099/0010-Regular-Expression-Matching.md b/dsa-solutions/lc-solutions/0000-0099/0010-Regular-Expression-Matching.md
deleted file mode 100644
index f46d158bf..000000000
--- a/dsa-solutions/lc-solutions/0000-0099/0010-Regular-Expression-Matching.md
+++ /dev/null
@@ -1,240 +0,0 @@
----
-id: regular-expression-matching
-title: Regular Expression Matching (LeetCode)
-sidebar_label: 0010 - Regular Expression Matching
-tags:
- - String
- - Dynamic Programming
- - Recursion
-description: Given an input string s and a pattern p, implement regular expression matching with support for '.' and '*' where '.' matches any single character and '*' matches zero or more of the preceding element.
-sidebar_position: 10
----
-
-## Problem Description
-
-Given an input string `s` and a pattern `p`, implement regular expression matching with support for '.' and '*' where:
-
-- '.' Matches any single character.
-- '*' Matches zero or more of the preceding element.
-
-The matching should cover the entire input string (not partial).
-
-### Examples
-
-**Example 1:**
-
-```
-Input: s = "aa", p = "a"
-Output: false
-Explanation: "a" does not match the entire string "aa".
-```
-
-**Example 2:**
-
-```
-Input: s = "aa", p = "a*"
-Output: true
-Explanation: '*' means zero or more of the preceding element, 'a'. Therefore, by repeating 'a' once, it becomes "aa".
-```
-
-**Example 3:**
-
-```
-Input: s = "ab", p = ".*"
-Output: true
-Explanation: ".*" means "zero or more (*) of any character (.)".
-```
-
-### Constraints
-
-- 1 < s.length < 20
-- 1 < p.length < 20
-- `s` contains osnly lowercase English letters.
-- `p` contains only lowercase English letters, '.', and '*'.
-- It is guaranteed for each appearance of the character '*', there will be a previous valid character to match.
-
-## Solution
-
-### Approach 1: Recursion
-
-#### Intuition
-
-If there were no Kleene stars (the * wildcard character for regular expressions), the problem would be easier - we simply check from left to right if each character of the text matches the pattern.
-
-When a star is present, we may need to check many different suffixes of the text and see if they match the rest of the pattern. A recursive solution is a straightforward way to represent this relationship.
-
-#### Algorithm
-
-Without a Kleene star, our solution would look like this:
-
-```python
-def match(text, pattern):
- if not pattern:
- return not text
- first_match = bool(text) and pattern[0] in {text[0], "."}
- return first_match and match(text[1:], pattern[1:])
-```
-
-If a star is present in the pattern, it will be in the second position `pattern[1]`. Then, we may ignore this part of the pattern, or delete a matching character in the text. If we have a match on the remaining strings after any of these operations, then the initial inputs matched.
-
-#### Code (Java)
-
-```java
-class Solution {
- public boolean isMatch(String text, String pattern) {
- if (pattern.isEmpty()) return text.isEmpty();
- boolean first_match =
- (!text.isEmpty() &&
- (pattern.charAt(0) == text.charAt(0) ||
- pattern.charAt(0) == '.'));
-
- if (pattern.length() >= 2 && pattern.charAt(1) == '*') {
- return (
- isMatch(text, pattern.substring(2)) ||
- (first_match && isMatch(text.substring(1), pattern))
- );
- } else {
- return (
- first_match && isMatch(text.substring(1), pattern.substring(1))
- );
- }
- }
-}
-```
-
-#### Code (Python)
-
-```python
-class Solution:
- def isMatch(self, text: str, pattern: str) -> bool:
- if not pattern:
- return not text
-
- first_match = bool(text) and pattern[0] in {text[0], "."}
-
- if len(pattern) >= 2 and pattern[1] == "*":
- return (
- self.isMatch(text, pattern[2:])
- or first_match
- and self.isMatch(text[1:], pattern)
- )
- else:
- return first_match and self.isMatch(text[1:], pattern[1:])
-```
-
-### Approach 2: Dynamic Programming
-
-#### Intuition
-
-As the problem has an optimal substructure, it is natural to cache intermediate results. We ask the question `dp(i, j)`: does `text[i:]` and `pattern[j:]` match? We can describe our answer in terms of answers to questions involving smaller strings.
-
-#### Top-Down Variation (Java)
-
-```java
-enum Result {
- TRUE,
- FALSE,
-}
-
-class Solution {
- Result[][] memo;
-
- public boolean isMatch(String text, String pattern) {
- memo = new Result[text.length() + 1][pattern.length() + 1];
- return dp(0, 0, text, pattern);
- }
-
- public boolean dp(int i, int j, String text, String pattern) {
- if (memo[i][j] != null) {
- return memo[i][j] == Result.TRUE;
- }
- boolean ans;
- if (j == pattern.length()) {
- ans = i == text.length();
- } else {
- boolean first_match =
- (i < text.length() &&
- (pattern.charAt(j) == text.charAt(i) ||
- pattern.charAt(j) == '.'));
-
- if (j + 1 < pattern.length() && pattern.charAt(j + 1) == '*') {
- ans = (dp(i, j + 2, text, pattern) ||
- (first_match && dp(i + 1, j, text, pattern)));
- } else {
- ans = first_match && dp(i + 1, j + 1, text, pattern);
- }
- }
- memo[i][j] = ans ? Result.TRUE : Result.FALSE;
- return ans;
- }
-}
-```
-
-#### Bottom-Up Variation (Java)
-
-```java
-class Solution {
- public boolean isMatch(String text, String pattern) {
- boolean[][] dp = new boolean[text.length() + 1][pattern.length() + 1];
- dp[text.length()][pattern.length()] = true;
-
- for (int i = text.length(); i >= 0; i--) {
- for (int j = pattern.length() - 1; j >= 0; j--) {
- boolean first_match =
- (i < text.length() &&
- (pattern.charAt(j) == text.charAt(i) ||
- pattern.charAt(j) == '.'));
- if (j + 1 < pattern.length() && pattern.charAt(j + 1) == '*') {
- dp[i][j] = dp[i][j + 2] || (first_match && dp[i + 1][j]);
- } else {
- dp[i][j] = first_match && dp[i + 1][j + 1];
- }
- }
- }
- return dp[0][0];
- }
-}
-```
-
-#### Code (Python)
-
-```python
-class Solution:
- def isMatch(self, text: str, pattern: str) -> bool:
- memo = {}
-
- def dp(i: int, j: int) -> bool:
- if (i, j) not in memo:
- if j == len(pattern):
- ans = i == len(text)
- else:
- first_match = i < len(text) and pattern[j] in {text[i], "."}
- if j + 1 < len(pattern) and pattern[j + 1] == "*":
- ans = dp(i, j + 2) or first_match and dp(i + 1, j)
- else:
- ans = first_match and dp(i + 1, j + 1)
-
- memo[i, j] = ans
- return memo[i, j]
-
- return dp(0, 0)
-```
-Complexity Analysis
-Time Complexity
-Let T, P be the lengths of the text and the pattern respectively. The work for every call to dp(i, j) for i=0,...,T; j=0,...,P is done once, and it is $O(1)$ work. Hence, the time complexity is $O(TP)$.
-
-Space Complexity
-The only memory we use is the $O(TP)$ boolean entries in our cache. Hence, the space complexity is $O(TP)$
-
-
-Now, just as you asked, the last part should include the summary and links to the problem, solution, and profile. Let's add that:
-
-## Summary
-
-This problem involves implementing regular expression matching with support for '.' and '*', where '.' matches any single character and '*' matches zero or more of the preceding element. Two approaches are commonly used to solve this problem:
-
-1. **Recursion**: This approach involves a straightforward recursive solution. If there were no Kleene stars, checking from left to right if each character of the text matches the pattern would suffice. When a star is present, we may need to check many different suffixes of the text and see if they match the rest of the pattern.
-
-2. **Dynamic Programming**: As the problem has an optimal substructure, we can use dynamic programming to cache intermediate results. We can describe our answer in terms of answers to questions involving smaller strings.
-
-
diff --git a/dsa-solutions/lc-solutions/0000-0099/0011-Container-with-most-water.md b/dsa-solutions/lc-solutions/0000-0099/0011-Container-with-most-water.md
deleted file mode 100644
index 7e03d44b3..000000000
--- a/dsa-solutions/lc-solutions/0000-0099/0011-Container-with-most-water.md
+++ /dev/null
@@ -1,166 +0,0 @@
----
-id: container-with-most-water
-title: Container With Most Water (LeetCode)
-sidebar_label: 0011 - Container With Most Water
-tags:
- - Array
- - Two Pointers
- - Greedy
-description: Given n non-negative integers representing the heights of vertical lines, find the two lines that together with the x-axis form a container, such that the container contains the most water.
-sidebar_position: 11
----
-
-## Problem Description
-
-| Problem Statement | Solution Link | LeetCode Profile |
-| :----------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------ | :------------------------------------------------- |
-| [Container With Most Water](https://leetcode.com/problems/container-with-most-water/) | [Container With Most Water Solution on LeetCode](https://leetcode.com/problems/container-with-most-water/solutions/3701708/best-method-c-java-python-beginner-friendly/) | [gabaniyash846](https://leetcode.com/u/gabaniyash846/) |
-
-## Problem Statement
-
-You are given an integer array `height` of length `n`. There are `n` vertical lines drawn such that the two endpoints of the ith line are `(i, 0)` and `(i, height[i])`.
-
-Find two lines that together with the x-axis form a container, such that the container contains the most water.
-
-Return the maximum amount of water a container can store.
-
-Notice that you may not slant the container.
-
-### Examples
-
-**Example 1:**
-
-
-
-- **Input**: `height = [1,8,6,2,5,4,8,3,7]`
-- **Output**: `49`
-- **Explanation**: The above vertical lines are represented by array `[1,8,6,2,5,4,8,3,7]`. In this case, the max area of water (blue section) the container can contain is `49`.
-
-**Example 2:**
-
-- **Input**: `height = [1,1]`
-- **Output**: `1`
-
-### Constraints
-
-- `n == height.length`
-- `2 <= n <= 10^5`
-- `0 <= height[i] <= 10^4`
-
-## Solution
-
-### Approach
-
-#### Intuition
-
-The two-pointer technique starts with the widest container and moves the pointers inward based on the comparison of heights. Increasing the width of the container can only lead to a larger area if the height of the new boundary is greater. By moving the pointers towards the center, we explore containers with the potential for greater areas.
-
-#### Algorithm
-
-1. **Initialize the variables**:
- - `left` to represent the left pointer, starting at the beginning of the container (index 0).
- - `right` to represent the right pointer, starting at the end of the container (index `height.size() - 1`).
- - `maxArea` to keep track of the maximum area found, initially set to 0.
-
-2. **Enter a loop using the condition `left < right`**, which means the pointers have not crossed each other yet.
-
-3. **Calculate the current area**:
- - Use the `min` function to find the minimum height between the left and right pointers.
- - Multiply the minimum height by the width, which is the difference between the indices of the pointers: `(right - left)`.
- - Store this value in the `currentArea` variable.
-
-4. **Update the maximum area**:
- - Use the `max` function to compare the `currentArea` with the `maxArea`.
- - If the `currentArea` is greater than the `maxArea`, update `maxArea` with the `currentArea`.
-
-5. **Move the pointers inward**:
- - Check if the height at the `left` pointer is smaller than the height at the `right` pointer.
- - If so, increment the `left` pointer, moving it towards the center of the container.
- - Otherwise, decrement the `right` pointer, also moving it towards the center.
-
-6. **Repeat steps 3 to 5** until the pointers meet (`left >= right`), indicating that all possible containers have been explored.
-
-7. **Return the `maxArea`**, which represents the maximum area encountered among all the containers.
-
-### Code
-
-#### C++ Implementation
-
-```cpp
-class Solution {
-public:
- int maxArea(vector& height) {
- int left = 0;
- int right = height.size() - 1;
- int maxArea = 0;
-
- while (left < right) {
- int currentArea = min(height[left], height[right]) * (right - left);
- maxArea = max(maxArea, currentArea);
-
- if (height[left] < height[right]) {
- left++;
- } else {
- right--;
- }
- }
-
- return maxArea;
- }
-};
-```
-
-#### Java Implementation
-
-```java
-class Solution {
- public int maxArea(int[] height) {
- int left = 0;
- int right = height.length - 1;
- int maxArea = 0;
-
- while (left < right) {
- int currentArea = Math.min(height[left], height[right]) * (right - left);
- maxArea = Math.max(maxArea, currentArea);
-
- if (height[left] < height[right]) {
- left++;
- } else {
- right--;
- }
- }
-
- return maxArea;
- }
-}
-```
-
-#### Python Implementation
-
-```python
-class Solution:
- def maxArea(self, height: List[int]) -> int:
- left = 0
- right = len(height) - 1
- maxArea = 0
-
- while left < right:
- currentArea = min(height[left], height[right]) * (right - left)
- maxArea = max(maxArea, currentArea)
-
- if height[left] < height[right]:
- left += 1
- else:
- right -= 1
-
- return maxArea
-```
-
-### Complexity Analysis
-
-- **Time Complexity**: $O(n)$, where n is the length of the array `height`. We traverse the list only once using two pointers from both ends of the array towards the center.
-- **Space Complexity**: $O(1)$, we use a constant amount of extra space for the pointers and variables.
-
-## Conclusion
-
-The two-pointer approach is efficient for solving the Container With Most Water problem, allowing us to explore all possible containers by adjusting the pointers based on the heights of the lines, ensuring that we find the container with the maximum possible area.
diff --git a/dsa-solutions/lc-solutions/0000-0099/0012-integer-to-roman.md b/dsa-solutions/lc-solutions/0000-0099/0012-integer-to-roman.md
deleted file mode 100644
index 5f032a148..000000000
--- a/dsa-solutions/lc-solutions/0000-0099/0012-integer-to-roman.md
+++ /dev/null
@@ -1,154 +0,0 @@
----
-id: integer-to-roman
-title: Integer to Roman (LeetCode)
-sidebar_label: 0012 - Integer to Roman
-tags:
- - Hash Table
- - Math
- - String
-description: Convert a given integer to a Roman numeral using specific rules for the Roman numeral system.
-sidebar_position: 12
----
-
-## Problem Statement
-
-Roman numerals are represented by seven different symbols: `I`, `V`, `X`, `L`, `C`, `D`, and `M`.
-
-| Symbol | Value |
-| :----- | :---- |
-| I | 1 |
-| V | 5 |
-| X | 10 |
-| L | 50 |
-| C | 100 |
-| D | 500 |
-| M | 1000 |
-
-Roman numerals are usually written largest to smallest from left to right. However, the numeral for four is not `IIII`. Instead, the number four is written as `IV`. Because the one is before the five, we subtract it making four. The same principle applies to the number nine, which is written as `IX`. There are six instances where subtraction is used:
-
-- `I` can be placed before `V` (5) and `X` (10) to make 4 and 9.
-- `X` can be placed before `L` (50) and `C` (100) to make 40 and 90.
-- `C` can be placed before `D` (500) and `M` (1000) to make 400 and 900.
-
-Given an integer, convert it to a Roman numeral.
-
-### Examples
-
-**Example 1:**
-
-- **Input**: `num = 3749`
-- **Output**: `"MMMDCCXLIX"`
-- **Explanation**:
- - 3000 = MMM as 1000 (M) + 1000 (M) + 1000 (M)
- - 700 = DCC as 500 (D) + 100 (C) + 100 (C)
- - 40 = XL as 10 (X) less than 50 (L)
- - 9 = IX as 1 (I) less than 10 (X)
-
-**Example 2:**
-
-- **Input**: `num = 58`
-- **Output**: `"LVIII"`
-- **Explanation**:
- - 50 = L
- - 8 = VIII
-
-**Example 3:**
-
-- **Input**: `num = 1994`
-- **Output**: `"MCMXCIV"`
-- **Explanation**:
- - 1000 = M
- - 900 = CM
- - 90 = XC
- - 4 = IV
-
-### Constraints
-
-- `1 <= num <= 3999`
-
-## Solution
-
-### Approach
-
-#### Intuition
-
-To convert an integer to a Roman numeral, we need to repeatedly subtract the largest possible Roman numeral value from the integer while appending the corresponding symbol to the result string. We use predefined pairs of integers and their Roman numeral representations to guide this process.
-
-#### Algorithm
-
-1. **Initialize the Roman numeral string**:
- - Create an empty string `Roman` to store the resulting Roman numeral.
-
-2. **Create a list of integer-Roman pairs**:
- - Use a list of pairs to store the values and symbols of Roman numerals in descending order of values.
-
-3. **Iterate through the list of pairs**:
- - For each pair, check if the input integer is greater than or equal to the Roman numeral value.
- - If it is, add the corresponding symbol to the `Roman` string and subtract the corresponding value from the input integer.
- - Repeat this process until the input integer becomes zero.
-
-4. **Return the Roman numeral string**:
- - After processing all the pairs, return the `Roman` string containing the converted Roman numeral.
-
-### Code
-
-#### C++ Implementation
-
-```cpp
-class Solution {
-public:
- string intToRoman(int num) {
- string Roman = "";
- vector> storeIntRoman = {{1000, "M"}, {900, "CM"}, {500, "D"}, {400, "CD"}, {100, "C"}, {90, "XC"}, {50, "L"}, {40, "XL"}, {10, "X"}, {9, "IX"}, {5, "V"}, {4, "IV"}, {1, "I"}};
- for (int i = 0; i < storeIntRoman.size(); i++) {
- while (num >= storeIntRoman[i].first) {
- Roman += storeIntRoman[i].second;
- num -= storeIntRoman[i].first;
- }
- }
- return Roman;
- }
-};
-```
-
-#### Java Implementation
-
-```java
-class Solution {
- public String intToRoman(int num) {
- String Roman = "";
- int[][] storeIntRoman = {{1000, "M"}, {900, "CM"}, {500, "D"}, {400, "CD"}, {100, "C"}, {90, "XC"}, {50, "L"}, {40, "XL"}, {10, "X"}, {9, "IX"}, {5, "V"}, {4, "IV"}, {1, "I"}};
- for (int i = 0; i < storeIntRoman.length; i++) {
- while (num >= storeIntRoman[i][0]) {
- Roman += storeIntRoman[i][1];
- num -= storeIntRoman[i][0];
- }
- }
- return Roman;
- }
-}
-```
-
-#### Python Implementation
-
-```python
-class Solution:
- def intToRoman(self, num: int) -> str:
- Roman = ""
- storeIntRoman = [[1000, "M"], [900, "CM"], [500, "D"], [400, "CD"], [100, "C"], [90, "XC"], [50, "L"], [40, "XL"], [10, "X"], [9, "IX"], [5, "V"], [4, "IV"], [1, "I"]]
- for i in range(len(storeIntRoman)):
- while num >= storeIntRoman[i][0]:
- Roman += storeIntRoman[i][1]
- num -= storeIntRoman[i][0]
- return Roman
-```
-
-### Complexity Analysis
-
-- **Time Complexity**: $O(1)$ - The algorithm iterates through a constant number of values (13 in this case), so the time complexity is constant.
-- **Space Complexity**: $O(1)$ - The amount of extra space used is constant, determined by the fixed size of the `storeIntRoman` vector.
-
-## Conclusion
-
-The provided solutions efficiently convert an integer to a Roman numeral by iterating through predefined Roman numeral values and symbols. This approach ensures that the conversion adheres to the rules of the Roman numeral system while maintaining constant time and space complexity.
-
diff --git a/dsa-solutions/lc-solutions/0000-0099/0013-roman-to-integer.md b/dsa-solutions/lc-solutions/0000-0099/0013-roman-to-integer.md
deleted file mode 100644
index 5300e3f78..000000000
--- a/dsa-solutions/lc-solutions/0000-0099/0013-roman-to-integer.md
+++ /dev/null
@@ -1,180 +0,0 @@
----
-id: roman-to-integer
-title: Roman to Integer (LeetCode)
-sidebar_label: 0013 - Roman to Integer
-tags:
- - Hash Table
- - Math
- - String
-description: Convert a given Roman numeral to an integer using specific rules for the Roman numeral system.
-sidebar_position: 13
----
-
-## Problem Statement
-
-Roman numerals are represented by seven different symbols: `I`, `V`, `X`, `L`, `C`, `D`, and `M`.
-
-| Symbol | Value |
-| :----- | :---- |
-| I | 1 |
-| V | 5 |
-| X | 10 |
-| L | 50 |
-| C | 100 |
-| D | 500 |
-| M | 1000 |
-
-For example, 2 is written as `II` in Roman numeral, just two ones added together. 12 is written as `XII`, which is simply X + II. The number 27 is written as `XXVII`, which is XX + V + II.
-
-Roman numerals are usually written largest to smallest from left to right. However, the numeral for four is not `IIII`. Instead, the number four is written as `IV`. Because the one is before the five, we subtract it making four. The same principle applies to the number nine, which is written as `IX`. There are six instances where subtraction is used:
-
-- `I` can be placed before `V` (5) and `X` (10) to make 4 and 9.
-- `X` can be placed before `L` (50) and `C` (100) to make 40 and 90.
-- `C` can be placed before `D` (500) and `M` (1000) to make 400 and 900.
-
-Given a Roman numeral, convert it to an integer.
-
-### Examples
-
-**Example 1:**
-
-- **Input**: `s = "III"`
-- **Output**: `3`
-- **Explanation**: III = 3.
-
-**Example 2:**
-
-- **Input**: `s = "LVIII"`
-- **Output**: `58`
-- **Explanation**: L = 50, V= 5, III = 3.
-
-**Example 3:**
-
-- **Input**: `s = "MCMXCIV"`
-- **Output**: `1994`
-- **Explanation**: M = 1000, CM = 900, XC = 90, and IV = 4.
-
-### Constraints
-
-- `1 <= s.length <= 15`
-- `s` contains only the characters ('I', 'V', 'X', 'L', 'C', 'D', 'M').
-- It is guaranteed that `s` is a valid Roman numeral in the range [1, 3999].
-
-## Solution
-
-### Approach
-
-#### Intuition
-
-The key intuition is that in Roman numerals, when a smaller value appears before a larger value, it represents subtraction, while when a smaller value appears after or equal to a larger value, it represents addition.
-
-#### Explanation
-
-The unordered map `m` is created and initialized with mappings between Roman numeral characters and their corresponding integer values. For example, 'I' is mapped to 1, 'V' to 5, 'X' to 10, and so on.
-
-The variable `ans` is initialized to 0. This variable will accumulate the final integer value of the Roman numeral string.
-
-The for loop iterates over each character in the input string `s`.
-
-For example, for the string "IX":
-- When `i` is 0, the current character `s[i]` is 'I'. Since there is a next character ('X'), and the value of 'I' (1) is less than the value of 'X' (10), the condition `m[s[i]] < m[s[i+1]]` is true. In this case, we subtract the value of the current character from `ans`.
-- When `i` is 1, the current character `s[i]` is 'X'. This is the last character in the string, so there is no next character to compare. In this case, we add the value of the current character to `ans`.
-
-For the string "XI":
-- When `i` is 0, the current character `s[i]` is 'X'. Since there is a next character ('I'), and the value of 'X' (10) is greater than the value of 'I' (1), the condition `m[s[i]] < m[s[i+1]]` is false. In this case, we add the value of the current character to `ans`.
-- When `i` is 1, the current character `s[i]` is 'I'. This is the last character in the string, so there is no next character to compare. In this case, we add the value of the current character to `ans`.
-
-After the for loop, the accumulated value in `ans` represents the integer conversion of the Roman numeral string, and it is returned as the result.
-
-### Code
-
-#### C++ Implementation
-
-```cpp
-class Solution {
-public:
- int romanToInt(string s) {
- unordered_map m = {
- {'I', 1},
- {'V', 5},
- {'X', 10},
- {'L', 50},
- {'C', 100},
- {'D', 500},
- {'M', 1000}
- };
-
- int ans = 0;
- for (int i = 0; i < s.length(); i++) {
- if (i < s.length() - 1 && m[s[i]] < m[s[i+1]]) {
- ans -= m[s[i]];
- } else {
- ans += m[s[i]];
- }
- }
- return ans;
- }
-};
-```
-
-#### Java Implementation
-
-```java
-class Solution {
- public int romanToInt(String s) {
- Map m = new HashMap<>();
- m.put('I', 1);
- m.put('V', 5);
- m.put('X', 10);
- m.put('L', 50);
- m.put('C', 100);
- m.put('D', 500);
- m.put('M', 1000);
-
- int ans = 0;
- for (int i = 0; i < s.length(); i++) {
- if (i < s.length() - 1 && m.get(s.charAt(i)) < m.get(s.charAt(i+1))) {
- ans -= m.get(s.charAt(i));
- } else {
- ans += m.get(s.charAt(i));
- }
- }
- return ans;
- }
-}
-```
-
-#### Python Implementation
-
-```python
-class Solution:
- def romanToInt(self, s: str) -> int:
- m = {
- 'I': 1,
- 'V': 5,
- 'X': 10,
- 'L': 50,
- 'C': 100,
- 'D': 500,
- 'M': 1000
- }
-
- ans = 0
- for i in range(len(s)):
- if i < len(s) - 1 and m[s[i]] < m[s[i+1]]:
- ans -= m[s[i]]
- else:
- ans += m[s[i]]
-
- return ans
-```
-
-### Complexity Analysis
-
-- **Time Complexity**: $O(n)$ - The algorithm iterates through each character in the input string once, where `n` is the length of the string.
-- **Space Complexity**: $O(1)$ - The amount of extra space used is constant, determined by the fixed size of the `m` map.
-
-## Conclusion
-
-The provided solutions efficiently convert a Roman numeral to an integer by iterating through the characters and using a map to handle the conversion based on the rules of the Roman numeral system. This approach ensures that the conversion adheres to the rules while maintaining linear time complexity and constant space complexity.
-
diff --git a/dsa-solutions/lc-solutions/0000-0099/0014-longest-comman-prefix.md b/dsa-solutions/lc-solutions/0000-0099/0014-longest-comman-prefix.md
deleted file mode 100644
index 3bfd0e772..000000000
--- a/dsa-solutions/lc-solutions/0000-0099/0014-longest-comman-prefix.md
+++ /dev/null
@@ -1,266 +0,0 @@
----
-id: Longest Comman Prefix
-title: Longest Comman Prefix (LeetCode)
-sidebar_label: 0014-Longest Comman Prefix
-tags:
- - Hash Table
- - Math
- - String
-description: finds logest comman prefix for a given string.
-sidebar_position: 14
----
-
-## Problem Statement
-
-Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string "".
-
-#### Example 1:
-
-- Input: `strs = ["flower","flow","flight"]`
-- Output: `"fl"`
-
-#### Example 2:
-
-- Input: `strs = ["dog","racecar","car"]`
-- Output: `""`
-- Explanation: There is no common prefix among the input strings.
-
-### Constraints:
-
-- `1 <= strs.length <= 200`
-- `0 <= strs[i].length <= 200`
-- `strs[i]` consists of only lowercase English letters.
-
-## Approaches and Solutions
-
-### Approach 1: Horizontal Scanning
-
-**Intuition:**
-Iteratively find the longest common prefix (LCP) of the first two strings, then find the LCP of the result with the next string, and so on.
-
-**Algorithm:**
-1. Initialize the prefix as the first string in the list.
-2. Iterate through the rest of the strings.
-3. Update the prefix by comparing it with the current string.
-4. If at any point the prefix becomes an empty string, return `""`.
-
-**Time Complexity:** $O(S)$, where S is the sum of all characters in all strings.
-
-**Space Complexity:** $O(1)$, since we use only constant extra space.
-
-**C++ Implementation:**
-```cpp
-class Solution {
-public:
- string longestCommonPrefix(vector& strs) {
- if (strs.empty()) return "";
- string prefix = strs[0];
- for (int i = 1; i < strs.size(); i++) {
- while (strs[i].find(prefix) != 0) {
- prefix = prefix.substr(0, prefix.length() - 1);
- if (prefix.empty()) return "";
- }
- }
- return prefix;
- }
-};
-```
-
-**Java Implementation:**
-```java
-class Solution {
- public String longestCommonPrefix(String[] strs) {
- if (strs.length == 0) return "";
- String prefix = strs[0];
- for (int i = 1; i < strs.length; i++) {
- while (strs[i].indexOf(prefix) != 0) {
- prefix = prefix.substring(0, prefix.length() - 1);
- if (prefix.isEmpty()) return "";
- }
- }
- return prefix;
- }
-}
-```
-
-**Python Implementation:**
-```python
-class Solution:
- def longestCommonPrefix(self, strs: List[str]) -> str:
- if len(strs) == 0:
- return ""
- prefix = strs[0]
- for i in range(1, len(strs)):
- while strs[i].find(prefix) != 0:
- prefix = prefix[0 : len(prefix) - 1]
- if prefix == "":
- return ""
- return prefix
-```
-
-### Approach 2: Vertical Scanning
-
-**Intuition:**
-Compare characters from top to bottom on the same column (i.e., same character index across all strings) before moving on to the next column.
-
-**Algorithm:**
-1. Iterate through the characters of the first string.
-2. Compare the current character with the corresponding character of the other strings.
-3. If they all match, continue; otherwise, return the common prefix up to the current column.
-
-**Time Complexity:** $O(S)$, where S is the sum of all characters in all strings.
-
-**Space Complexity:** $O(1)$, since we use only constant extra space.
-
-**C++ Implementation:**
-```cpp
-class Solution {
-public:
- string longestCommonPrefix(vector& strs) {
- if (strs.empty()) return "";
- for (int i = 0; i < strs[0].size(); i++) {
- char c = strs[0][i];
- for (int j = 1; j < strs.size(); j++) {
- if (i == strs[j].size() || strs[j][i] != c)
- return strs[0].substr(0, i);
- }
- }
- return strs[0];
- }
-};
-```
-
-**Java Implementation:**
-```java
-class Solution {
- public String longestCommonPrefix(String[] strs) {
- if (strs == null || strs.length == 0) return "";
- for (int i = 0; i < strs[0].length(); i++) {
- char c = strs[0].charAt(i);
- for (int j = 1; j < strs.length; j++) {
- if (i == strs[j].length() || strs[j].charAt(i) != c)
- return strs[0].substring(0, i);
- }
- }
- return strs[0];
- }
-}
-```
-
-**Python Implementation:**
-```python
-class Solution:
- def longestCommonPrefix(self, strs: List[str]) -> str:
- if strs == None or len(strs) == 0:
- return ""
- for i in range(len(strs[0])):
- c = strs[0][i]
- for j in range(1, len(strs)):
- if i == len(strs[j]) or strs[j][i] != c:
- return strs[0][0:i]
- return strs[0]
-```
-
-### Approach 3: Divide and Conquer
-
-**Intuition:**
-Use the divide and conquer technique, where the problem is divided into two subproblems, find their LCP, and then combine their results.
-
-**Algorithm:**
-1. Divide the list of strings into two halves.
-2. Recursively find the LCP of each half.
-3. Merge the results by finding the LCP of the two halves.
-
-**Time Complexity:** $O(S)$, where S is the sum of all characters in all strings.
-
-**Space Complexity:** $O(m log n)$, where m is the length of the shortest string and n is the number of strings.
-
-**C++ Implementation:**
-```cpp
-class Solution {
-public:
- string longestCommonPrefix(vector& strs) {
- if (strs.empty()) return "";
- return longestCommonPrefix(strs, 0, strs.size() - 1);
- }
-
-private:
- string longestCommonPrefix(vector& strs, int l, int r) {
- if (l == r) {
- return strs[l];
- } else {
- int mid = (l + r) / 2;
- string lcpLeft = longestCommonPrefix(strs, l, mid);
- string lcpRight = longestCommonPrefix(strs, mid + 1, r);
- return commonPrefix(lcpLeft, lcpRight);
- }
- }
-
- string commonPrefix(string left, string right) {
- int min = std::min(left.length(), right.length());
- for (int i = 0; i < min; i++) {
- if (left[i] != right[i]) return left.substr(0, i);
- }
- return left.substr(0, min);
- }
-};
-```
-
-**Java Implementation:**
-```java
-class Solution {
- public String longestCommonPrefix(String[] strs) {
- if (strs == null || strs.length == 0) return "";
- return longestCommonPrefix(strs, 0, strs.length - 1);
- }
-
- private String longestCommonPrefix(String[] strs, int l, int r) {
- if (l == r) {
- return strs[l];
- } else {
- int mid = (l + r) / 2;
- String lcpLeft = longestCommonPrefix(strs, l, mid);
- String lcpRight = longestCommonPrefix(strs, mid + 1, r);
- return commonPrefix(lcpLeft, lcpRight);
- }
- }
-
- private String commonPrefix(String left, String right) {
- int min = Math.min(left.length(), right.length());
- for (int i = 0; i < min; i++) {
- if (left.charAt(i) != right.charAt(i)) return left.substring(0, i);
- }
- return left.substring(0, min);
- }
-}
-```
-
-**Python Implementation:**
-```python
-class Solution:
- def longestCommonPrefix(self, strs):
- if not strs:
- return ""
-
- def LCP(left, right):
- min_len = min(len(left), len(right))
- for i in range(min_len):
- if left[i] != right[i]:
- return left[:i]
- return left[:min_len]
-
- def divide_and_conquer(strs, l, r):
- if l == r:
- return strs[l]
- else:
- mid = (l + r) // 2
- lcpLeft = divide_and_conquer(strs, l, mid)
- lcpRight = divide_and_conquer(strs, mid + 1, r)
- return LCP(lcpLeft, lcpRight)
-
- return divide_and_conquer(strs, 0, len(strs) - 1)
-```
-
-## Conclusion
-
-We've discussed three different approaches to solving the problem of finding the longest common prefix among an array of strings. Each approach has its own merits, and the choice of which to use depends on the specific requirements and constraints of the problem. The provided implementations in C++, Java, and Python cover horizontal scanning, vertical scanning, and divide and conquer methods.
\ No newline at end of file
diff --git a/dsa-solutions/lc-solutions/0000-0099/0015-3sum.md b/dsa-solutions/lc-solutions/0000-0099/0015-3sum.md
deleted file mode 100644
index 7c436ec62..000000000
--- a/dsa-solutions/lc-solutions/0000-0099/0015-3sum.md
+++ /dev/null
@@ -1,335 +0,0 @@
----
-id: 3Sum
-title: 3Sum (LeetCode)
-sidebar_label: 0015-3Sum
-tags:
- - Hash Table
- - Math
- - String
- - python
- - javascript
- - java
- - c++
-description: find the number of triplets with given sum .
-sidebar_position: 15
----
-
-## Problem Description
-
-Given an integer array `nums`, return all the triplets `[nums[i], nums[j], nums[k]]` such that `i != j`, `i != k`, and `j != k`, and `nums[i] + nums[j] + nums[k] == 0`.
-
-Notice that the solution set must not contain duplicate triplets.
-
-### Example 1:
-
-- **Input:** `nums = [-1,0,1,2,-1,-4]`
-- **Output:** `[[-1,-1,2],[-1,0,1]]`
-- **Explanation:**
- - `nums[0] + nums[1] + nums[2] = (-1) + 0 + 1 = 0`.
- - `nums[1] + nums[2] + nums[4] = 0 + 1 + (-1) = 0`.
- - `nums[0] + nums[3] + nums[4] = (-1) + 2 + (-1) = 0`.
- - The distinct triplets are `[-1,0,1]` and `[-1,-1,2]`.
- - Notice that the order of the output and the order of the triplets does not matter.
-
-### Example 2:
-
-- **Input:** `nums = [0,1,1]`
-- **Output:** `[]`
-- **Explanation:** The only possible triplet does not sum up to 0.
-
-### Example 3:
-
-- **Input:** `nums = [0,0,0]`
-- **Output:** `[[0,0,0]]`
-- **Explanation:** The only possible triplet sums up to 0.
-
-### Constraints
-
-- `3 <= nums.length <= 3000`
-- `-10^5 <= nums[i] <= 10^5`
-
-## Approach
-
-To solve the problem, we can use the two-pointer technique combined with sorting. Here is the step-by-step approach:
-
-1. **Sort the Input Array:**
-
- - Sort the array to enable the two-pointer technique and to handle duplicates easily.
-
-2. **Iterate Through the Array:**
-
- - Use a loop to fix the first element (`i`).
- - Use two pointers (`j` starting from `i + 1` and `k` starting from the end of the array) to find pairs that, along with the element at `i`, sum to zero.
-
-3. **Avoid Duplicates:**
-
- - Skip duplicate elements to avoid duplicate triplets.
-
-4. **Calculate and Adjust Pointers:**
-
- - Calculate the sum of the elements at `i`, `j`, and `k`.
- - If the sum is zero, add the triplet to the result and move both pointers.
- - If the sum is greater than zero, move the `k` pointer left to reduce the sum.
- - If the sum is less than zero, move the `j` pointer right to increase the sum.
-
-5. **Return the Result:**
- - Return the list of unique triplets.
-
-### Solution Code
-
-#### Python
-
-```python
-class Solution:
- def threeSum(self, nums: List[int]) -> List[List[int]]:
- res = []
- nums.sort()
-
- for i in range(len(nums)):
- if i > 0 and nums[i] == nums[i-1]:
- continue
-
- j = i + 1
- k = len(nums) - 1
-
- while j < k:
- total = nums[i] + nums[j] + nums[k]
-
- if total > 0:
- k -= 1
- elif total < 0:
- j += 1
- else:
- res.append([nums[i], nums[j], nums[k]])
- j += 1
-
- while j < k and nums[j] == nums[j-1]:
- j += 1
-
- return res
-```
-
-#### JavaScript
-
-```javascript
-var threeSum = function (nums) {
- let res = [];
- nums.sort((a, b) => a - b);
-
- for (let i = 0; i < nums.length; i++) {
- if (i > 0 && nums[i] === nums[i - 1]) {
- continue;
- }
-
- let j = i + 1;
- let k = nums.length - 1;
-
- while (j < k) {
- let total = nums[i] + nums[j] + nums[k];
-
- if (total > 0) {
- k--;
- } else if (total < 0) {
- j++;
- } else {
- res.push([nums[i], nums[j], nums[k]]);
- j++;
-
- while (j < k && nums[j] === nums[j - 1]) {
- j++;
- }
- }
- }
- }
- return res;
-};
-```
-
-#### Java
-
-```java
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-class Solution {
- public List> threeSum(int[] nums) {
- List> res = new ArrayList<>();
- Arrays.sort(nums);
-
- for (int i = 0; i < nums.length; i++) {
- if (i > 0 && nums[i] == nums[i-1]) {
- continue;
- }
-
- int j = i + 1;
- int k = nums.length - 1;
-
- while (j < k) {
- int total = nums[i] + nums[j] + nums[k];
-
- if (total > 0) {
- k--;
- } else if (total < 0) {
- j++;
- } else {
- res.add(Arrays.asList(nums[i], nums[j], nums[k]));
- j++;
-
- while (j < k && nums[j] == nums[j-1]) {
- j++;
- }
- }
- }
- }
- return res;
- }
-}
-```
-
-#### C++
-
-```cpp
-#include
-#include
-
-using namespace std;
-
-class Solution {
-public:
- vector> threeSum(vector& nums) {
- vector> res;
- sort(nums.begin(), nums.end());
-
- for (int i = 0; i < nums.size(); i++) {
- if (i > 0 && nums[i] == nums[i-1]) {
- continue;
- }
-
- int j = i + 1;
- int k = nums.size() - 1;
-
- while (j < k) {
- int total = nums[i] + nums[j] + nums[k];
-
- if (total > 0) {
- k--;
- } else if (total < 0) {
- j++;
- } else {
- res.push_back({nums[i], nums[j], nums[k]});
- j++;
-
- while (j < k && nums[j] == nums[j-1]) {
- j++;
- }
- }
- }
- }
- return res;
- }
-};
-```
-
-### Step-by-Step Algorithm
-
-1. **Initialize Result List:**
-
- - Create an empty list `res` to store the triplets whose sum is zero.
-
- ```python
- res = []
- ```
-
-2. **Sort the Input Array :**
-
- - Sort the input array `nums` in non-decreasing order.
-
- ```python
- nums.sort()
- ```
-
-3. **Iterate Through the Array :**
-
- - Iterate through each element in the sorted array `nums`.
-
- ```python
- for i in range(len(nums)):
- ```
-
-4. **Skip Duplicate Elements :**
-
- - Check if the current element is a duplicate of the previous element and skip it if it is.
-
- ```python
- if i > 0 and nums[i] == nums[i-1]:
- continue
- ```
-
-5. **Initialize Pointers :**
-
- - Initialize two pointers `j` and `k` to point to the elements next to the current element `i` and at the end of the array, respectively.
-
- ```python
- j = i + 1
- k = len(nums) - 1
- ```
-
-6. **Two-Pointer Approach :**
-
- - Use a two-pointer approach with pointers `j` and `k` to find triplets whose sum equals zero.
-
- ```python
- while j < k:
- ```
-
-7. **Calculate Total :**
-
- - Calculate the total sum of the current triplet.
-
- ```python
- total = nums[i] + nums[j] + nums[k]
- ```
-
-8. **Adjust Pointers Based on Total :**
-
- - If the total sum is greater than zero, decrement the `k` pointer to decrease the total sum.
-
- ```python
- if total > 0:
- k -= 1
- ```
-
- - If the total sum is less than zero, increment the `j` pointer to increase the total sum.
-
- ```python
- elif total < 0:
- j += 1
- ```
-
- - If the total sum equals zero, add the triplet `[nums[i], nums[j], nums[k]]` to the result list `res`.
-
- ```python
- else:
- res.append([nums[i], nums[j], nums[k]])
- j += 1
- ```
-
-9. **Handle Duplicate Triplets :**
-
- - Increment the `j` pointer to skip any duplicate elements.
-
- ```python
- while j < k and nums[j] == nums[j-1]:
- j += 1
- ```
-
-10. **Return Result :**
- - Return the list `res` containing all the unique triplets whose sum is zero.
- ```python
- return res
- ```
-
-This algorithm efficiently finds all unique trip
-
-lets in the given array `nums` whose sum equals zero using a two-pointer approach. It avoids duplicate triplets by skipping duplicate elements during traversal.
diff --git a/dsa-solutions/lc-solutions/0000-0099/0016-3sum-closest.md b/dsa-solutions/lc-solutions/0000-0099/0016-3sum-closest.md
deleted file mode 100644
index bf2207908..000000000
--- a/dsa-solutions/lc-solutions/0000-0099/0016-3sum-closest.md
+++ /dev/null
@@ -1,232 +0,0 @@
----
-id: 3Sum Closest
-title: 3Sum losest (LeetCode)
-sidebar_label: 0016-3Sum Closest
-tags:
- - Array
- - two pointers
- - Sorting
-description: Given an integer array nums of length n and an integer target, find three integers in nums such that the sum is closest to target.
-sidebar_position: 16
----
-
-## Problem Description
-
-Given an integer array `nums` of length `n` and an integer `target`, find three integers in `nums` such that the sum is closest to `target`.
-
-Return the sum of the three integers.
-
-You may assume that each input would have exactly one solution.
-
-### Example 1
-
-- **Input:** `nums = [-1,2,1,-4]`, `target = 1`
-- **Output:** `2`
-- **Explanation:** The sum that is closest to the target is `2` (`-1 + 2 + 1 = 2`).
-
-### Example 2
-
-- **Input:** `nums = [0,0,0]`, `target = 1`
-- **Output:** `0`
-- **Explanation:** The sum that is closest to the target is `0` (`0 + 0 + 0 = 0`).
-
-### Constraints
-
-- `3 <= nums.length <= 500`
-- `-1000 <= nums[i] <= 1000`
-- `-10^4 <= target <= 10^4`
-
-### Topics
-
-- Array
-- Two Pointers
-- Sorting
-
-### Intuition
-
-- Sorting combined with the two-pointer technique.
-
-### Complexity
-
-- **Time Complexity:** $O(N \log N + N^2)$ approx $O(N^2)$
-- **Space Complexity:** $(O(1))$
-
-### Solution Code and Explanation
-
-#### C++
-
-```cpp
-#include
-#include
-#include