From a9f2e2c1f2658af58869cf8212e55c032b355cb5 Mon Sep 17 00:00:00 2001 From: akshatnema <20bcs022@iiitdmj.ac.in> Date: Sun, 5 Feb 2023 19:25:28 +0530 Subject: [PATCH] files arranged --- ...-remove-duplicates-from-sorted-list-ii.cpp | 41 ---------------- .../NOTES.md | 1 - .../README.md | 0 .../absolute-difference-divisible-by-k.cpp | 0 .../Carpet into Box - GFG}/README.md | 0 .../carpet-into-box.cpp | 0 .../README.md | 0 .../README.md | 0 ...given-operations-exits-from-the-matrix.cpp | 0 .../Count even length - GFG}/README.md | 0 .../count-even-length.cpp | 0 .../README.md | 0 .../Find the longest string - GFG}/README.md | 0 .../find-the-longest-string.cpp | 0 .../README.md | 0 ...m-gcd-of-the-siblings-of-a-binary-tree.cpp | 0 .../Geeks And The String - GFG}/README.md | 0 .../geeks-and-the-string.cpp | 0 .../README.md | 0 ...ofit-by-choosing-a-subset-of-intervals.cpp | 0 .../Maximum Value - GFG}/README.md | 0 .../Maximum Value - GFG}/maximum-value.cpp | 0 .../Min operations - GFG}/README.md | 0 .../Min operations - GFG}/min-operations.cpp | 0 .../Minimize the sum - GFG}/README.md | 0 .../minimize-the-sum.cpp | 0 .../Next Greater Element - GFG}/README.md | 0 .../next-greater-element.cpp | 0 .../Shortest Prime Path - GFG}/README.md | 0 .../shortest-prime-path.cpp | 0 .../Total Decoding Messages - GFG}/README.md | 0 .../total-decoding-messages.cpp | 0 .../Transform to Sum Tree - GFG}/README.md | 0 .../transform-to-sum-tree.cpp | 0 .../0005-longest-palindromic-substring.cpp | 0 .../NOTES.md | 0 .../README.md | 0 .../0011-container-with-most-water.cpp | 0 .../0011-container-with-most-water}/NOTES.md | 0 .../0011-container-with-most-water}/README.md | 0 .../0015-3sum}/0015-3sum.cpp | 0 {0015-3sum => Leetcode/0015-3sum}/README.md | 0 ...-letter-combinations-of-a-phone-number.cpp | 0 .../NOTES.md | 0 .../README.md | 0 .../0022-generate-parentheses.cpp | 0 .../0022-generate-parentheses}/README.md | 0 .../0039-combination-sum.cpp | 0 .../0039-combination-sum}/NOTES.md | 0 .../0039-combination-sum}/README.md | 0 .../0040-combination-sum-ii.cpp | 0 .../0040-combination-sum-ii}/NOTES.md | 0 .../0040-combination-sum-ii}/README.md | 0 .../0045-jump-game-ii}/0045-jump-game-ii.cpp | 0 .../0045-jump-game-ii}/NOTES.md | 0 .../0045-jump-game-ii}/README.md | 0 .../0047-permutations-ii.cpp | 0 .../0047-permutations-ii}/NOTES.md | 0 .../0055-jump-game}/0055-jump-game.cpp | 0 .../0055-jump-game}/NOTES.md | 0 .../0055-jump-game}/README.md | 0 .../0057-insert-interval.cpp | 0 .../0057-insert-interval}/NOTES.md | 0 .../0057-insert-interval}/README.md | 0 .../0062-unique-paths}/0062-unique-paths.cpp | 0 .../0062-unique-paths}/NOTES.md | 0 .../0062-unique-paths}/README.md | 0 .../0078-subsets}/0078-subsets.cpp | 0 .../0078-subsets}/NOTES.md | 0 .../0078-subsets}/README.md | 0 .../0079-word-search}/0079-word-search.cpp | 0 .../0079-word-search}/README.md | 0 .../0090-subsets-ii}/0090-subsets-ii.cpp | 0 .../0090-subsets-ii}/NOTES.md | 0 .../0090-subsets-ii}/README.md | 0 .../0100-same-tree}/0100-same-tree.cpp | 0 .../0100-same-tree}/README.md | 0 ...ng-next-right-pointers-in-each-node-ii.cpp | 0 .../NOTES.md | 0 .../README.md | 0 .../0130-surrounded-regions}/README.md | 0 .../0144-binary-tree-preorder-traversal.cpp | 0 .../NOTES.md | 0 .../README.md | 0 .../0200-number-of-islands.cpp | 0 .../0200-number-of-islands}/NOTES.md | 0 .../0200-number-of-islands}/README.md | 0 .../0209-minimum-size-subarray-sum.cpp | 0 .../0209-minimum-size-subarray-sum}/README.md | 0 .../0213-house-robber-ii.cpp | 0 .../0213-house-robber-ii}/NOTES.md | 0 .../0213-house-robber-ii}/README.md | 0 .../0290-word-pattern}/0290-word-pattern.cpp | 0 .../0290-word-pattern}/README.md | 0 .../0413-arithmetic-slices.cpp | 0 .../0413-arithmetic-slices}/NOTES.md | 0 .../0413-arithmetic-slices}/README.md | 0 .../0438-find-all-anagrams-in-a-string.cpp | 0 .../NOTES.md | 0 .../README.md | 0 ...mum-number-of-arrows-to-burst-balloons.cpp | 0 .../NOTES.md | 0 .../README.md | 0 .../0491-non-decreasing-subsequences.cpp | 0 .../NOTES.md | 0 .../README.md | 0 .../0520-detect-capital.cpp | 0 .../0520-detect-capital}/README.md | 0 .../0547-number-of-provinces.cpp | 0 .../0547-number-of-provinces}/NOTES.md | 0 .../0547-number-of-provinces}/README.md | 0 .../0572-subtree-of-another-tree}/NOTES.md | 0 .../0572-subtree-of-another-tree}/README.md | 0 .../0713-subarray-product-less-than-k.cpp | 0 .../README.md | 0 .../0797-all-paths-from-source-to-target.cpp | 0 .../NOTES.md | 0 .../README.md | 0 .../0844-backspace-string-compare.cpp | 0 .../0844-backspace-string-compare}/NOTES.md | 0 .../0844-backspace-string-compare}/README.md | 0 .../0944-delete-columns-to-make-sorted.cpp | 0 .../NOTES.md | 0 .../README.md | 0 .../0986-interval-list-intersections.cpp | 0 .../NOTES.md | 0 .../README.md | 0 .../0997-find-the-town-judge.cpp | 0 .../0997-find-the-town-judge}/NOTES.md | 0 .../0997-find-the-town-judge}/README.md | 0 .../1091-shortest-path-in-binary-matrix.cpp | 0 .../NOTES.md | 0 ...m-time-to-collect-all-apples-in-a-tree.cpp | 0 .../NOTES.md | 0 .../README.md | 0 .../1833-maximum-ice-cream-bars.cpp | 0 .../1833-maximum-ice-cream-bars}/NOTES.md | 0 .../1833-maximum-ice-cream-bars}/README.md | 0 .../NOTES.md | 0 .../README.md | 0 Max Sum without Adjacents - GFG/README.md | 42 ----------------- .../max-sum-without-adjacents.cpp | 47 ------------------- 142 files changed, 131 deletions(-) delete mode 100644 0082-remove-duplicates-from-sorted-list-ii/0082-remove-duplicates-from-sorted-list-ii.cpp delete mode 100644 2244-minimum-rounds-to-complete-all-tasks/NOTES.md rename {Absolute difference divisible by K - GFG => GFG/Absolute difference divisible by K - GFG}/README.md (100%) rename {Absolute difference divisible by K - GFG => GFG/Absolute difference divisible by K - GFG}/absolute-difference-divisible-by-k.cpp (100%) rename {Carpet into Box - GFG => GFG/Carpet into Box - GFG}/README.md (100%) rename {Carpet into Box - GFG => GFG/Carpet into Box - GFG}/carpet-into-box.cpp (100%) rename {Case-specific Sorting of Strings - GFG => GFG/Case-specific Sorting of Strings - GFG}/README.md (100%) rename {Coordinates of the last cell in a Matrix on which performing given operations exits from the Matrix - GFG => GFG/Coordinates of the last cell in a Matrix on which performing given operations exits from the Matrix - GFG}/README.md (100%) rename {Coordinates of the last cell in a Matrix on which performing given operations exits from the Matrix - GFG => GFG/Coordinates of the last cell in a Matrix on which performing given operations exits from the Matrix - GFG}/coordinates-of-the-last-cell-in-a-matrix-on-which-performing-given-operations-exits-from-the-matrix.cpp (100%) rename {Count even length - GFG => GFG/Count even length - GFG}/README.md (100%) rename {Count even length - GFG => GFG/Count even length - GFG}/count-even-length.cpp (100%) rename {Find minimum number of Laptops required - GFG => GFG/Find minimum number of Laptops required - GFG}/README.md (100%) rename {Find the longest string - GFG => GFG/Find the longest string - GFG}/README.md (100%) rename {Find the longest string - GFG => GFG/Find the longest string - GFG}/find-the-longest-string.cpp (100%) rename {Find the maximum GCD of the siblings of a Binary Tree - GFG => GFG/Find the maximum GCD of the siblings of a Binary Tree - GFG}/README.md (100%) rename {Find the maximum GCD of the siblings of a Binary Tree - GFG => GFG/Find the maximum GCD of the siblings of a Binary Tree - GFG}/find-the-maximum-gcd-of-the-siblings-of-a-binary-tree.cpp (100%) rename {Geeks And The String - GFG => GFG/Geeks And The String - GFG}/README.md (100%) rename {Geeks And The String - GFG => GFG/Geeks And The String - GFG}/geeks-and-the-string.cpp (100%) rename {Maximum Profit By Choosing A Subset Of Intervals - GFG => GFG/Maximum Profit By Choosing A Subset Of Intervals - GFG}/README.md (100%) rename {Maximum Profit By Choosing A Subset Of Intervals - GFG => GFG/Maximum Profit By Choosing A Subset Of Intervals - GFG}/maximum-profit-by-choosing-a-subset-of-intervals.cpp (100%) rename {Maximum Value - GFG => GFG/Maximum Value - GFG}/README.md (100%) rename {Maximum Value - GFG => GFG/Maximum Value - GFG}/maximum-value.cpp (100%) rename {Min operations - GFG => GFG/Min operations - GFG}/README.md (100%) rename {Min operations - GFG => GFG/Min operations - GFG}/min-operations.cpp (100%) rename {Minimize the sum - GFG => GFG/Minimize the sum - GFG}/README.md (100%) rename {Minimize the sum - GFG => GFG/Minimize the sum - GFG}/minimize-the-sum.cpp (100%) rename {Next Greater Element - GFG => GFG/Next Greater Element - GFG}/README.md (100%) rename {Next Greater Element - GFG => GFG/Next Greater Element - GFG}/next-greater-element.cpp (100%) rename {Shortest Prime Path - GFG => GFG/Shortest Prime Path - GFG}/README.md (100%) rename {Shortest Prime Path - GFG => GFG/Shortest Prime Path - GFG}/shortest-prime-path.cpp (100%) rename {Total Decoding Messages - GFG => GFG/Total Decoding Messages - GFG}/README.md (100%) rename {Total Decoding Messages - GFG => GFG/Total Decoding Messages - GFG}/total-decoding-messages.cpp (100%) rename {Transform to Sum Tree - GFG => GFG/Transform to Sum Tree - GFG}/README.md (100%) rename {Transform to Sum Tree - GFG => GFG/Transform to Sum Tree - GFG}/transform-to-sum-tree.cpp (100%) rename {0005-longest-palindromic-substring => Leetcode/0005-longest-palindromic-substring}/0005-longest-palindromic-substring.cpp (100%) rename {0005-longest-palindromic-substring => Leetcode/0005-longest-palindromic-substring}/NOTES.md (100%) rename {0005-longest-palindromic-substring => Leetcode/0005-longest-palindromic-substring}/README.md (100%) rename {0011-container-with-most-water => Leetcode/0011-container-with-most-water}/0011-container-with-most-water.cpp (100%) rename {0011-container-with-most-water => Leetcode/0011-container-with-most-water}/NOTES.md (100%) rename {0011-container-with-most-water => Leetcode/0011-container-with-most-water}/README.md (100%) rename {0015-3sum => Leetcode/0015-3sum}/0015-3sum.cpp (100%) rename {0015-3sum => Leetcode/0015-3sum}/README.md (100%) rename {0017-letter-combinations-of-a-phone-number => Leetcode/0017-letter-combinations-of-a-phone-number}/0017-letter-combinations-of-a-phone-number.cpp (100%) rename {0017-letter-combinations-of-a-phone-number => Leetcode/0017-letter-combinations-of-a-phone-number}/NOTES.md (100%) rename {0017-letter-combinations-of-a-phone-number => Leetcode/0017-letter-combinations-of-a-phone-number}/README.md (100%) rename {0022-generate-parentheses => Leetcode/0022-generate-parentheses}/0022-generate-parentheses.cpp (100%) rename {0022-generate-parentheses => Leetcode/0022-generate-parentheses}/README.md (100%) rename {0039-combination-sum => Leetcode/0039-combination-sum}/0039-combination-sum.cpp (100%) rename {0039-combination-sum => Leetcode/0039-combination-sum}/NOTES.md (100%) rename {0039-combination-sum => Leetcode/0039-combination-sum}/README.md (100%) rename {0040-combination-sum-ii => Leetcode/0040-combination-sum-ii}/0040-combination-sum-ii.cpp (100%) rename {0040-combination-sum-ii => Leetcode/0040-combination-sum-ii}/NOTES.md (100%) rename {0040-combination-sum-ii => Leetcode/0040-combination-sum-ii}/README.md (100%) rename {0045-jump-game-ii => Leetcode/0045-jump-game-ii}/0045-jump-game-ii.cpp (100%) rename {0045-jump-game-ii => Leetcode/0045-jump-game-ii}/NOTES.md (100%) rename {0045-jump-game-ii => Leetcode/0045-jump-game-ii}/README.md (100%) rename {0047-permutations-ii => Leetcode/0047-permutations-ii}/0047-permutations-ii.cpp (100%) rename {0047-permutations-ii => Leetcode/0047-permutations-ii}/NOTES.md (100%) rename {0055-jump-game => Leetcode/0055-jump-game}/0055-jump-game.cpp (100%) rename {0055-jump-game => Leetcode/0055-jump-game}/NOTES.md (100%) rename {0055-jump-game => Leetcode/0055-jump-game}/README.md (100%) rename {0057-insert-interval => Leetcode/0057-insert-interval}/0057-insert-interval.cpp (100%) rename {0057-insert-interval => Leetcode/0057-insert-interval}/NOTES.md (100%) rename {0057-insert-interval => Leetcode/0057-insert-interval}/README.md (100%) rename {0062-unique-paths => Leetcode/0062-unique-paths}/0062-unique-paths.cpp (100%) rename {0062-unique-paths => Leetcode/0062-unique-paths}/NOTES.md (100%) rename {0062-unique-paths => Leetcode/0062-unique-paths}/README.md (100%) rename {0078-subsets => Leetcode/0078-subsets}/0078-subsets.cpp (100%) rename {0078-subsets => Leetcode/0078-subsets}/NOTES.md (100%) rename {0078-subsets => Leetcode/0078-subsets}/README.md (100%) rename {0079-word-search => Leetcode/0079-word-search}/0079-word-search.cpp (100%) rename {0079-word-search => Leetcode/0079-word-search}/README.md (100%) rename {0090-subsets-ii => Leetcode/0090-subsets-ii}/0090-subsets-ii.cpp (100%) rename {0082-remove-duplicates-from-sorted-list-ii => Leetcode/0090-subsets-ii}/NOTES.md (100%) rename {0090-subsets-ii => Leetcode/0090-subsets-ii}/README.md (100%) rename {0100-same-tree => Leetcode/0100-same-tree}/0100-same-tree.cpp (100%) rename {0100-same-tree => Leetcode/0100-same-tree}/README.md (100%) rename {0117-populating-next-right-pointers-in-each-node-ii => Leetcode/0117-populating-next-right-pointers-in-each-node-ii}/0117-populating-next-right-pointers-in-each-node-ii.cpp (100%) rename {0090-subsets-ii => Leetcode/0117-populating-next-right-pointers-in-each-node-ii}/NOTES.md (100%) rename {0117-populating-next-right-pointers-in-each-node-ii => Leetcode/0117-populating-next-right-pointers-in-each-node-ii}/README.md (100%) rename {0130-surrounded-regions => Leetcode/0130-surrounded-regions}/README.md (100%) rename {0144-binary-tree-preorder-traversal => Leetcode/0144-binary-tree-preorder-traversal}/0144-binary-tree-preorder-traversal.cpp (100%) rename {0117-populating-next-right-pointers-in-each-node-ii => Leetcode/0144-binary-tree-preorder-traversal}/NOTES.md (100%) rename {0144-binary-tree-preorder-traversal => Leetcode/0144-binary-tree-preorder-traversal}/README.md (100%) rename {0200-number-of-islands => Leetcode/0200-number-of-islands}/0200-number-of-islands.cpp (100%) rename {0144-binary-tree-preorder-traversal => Leetcode/0200-number-of-islands}/NOTES.md (100%) rename {0200-number-of-islands => Leetcode/0200-number-of-islands}/README.md (100%) rename {0209-minimum-size-subarray-sum => Leetcode/0209-minimum-size-subarray-sum}/0209-minimum-size-subarray-sum.cpp (100%) rename {0209-minimum-size-subarray-sum => Leetcode/0209-minimum-size-subarray-sum}/README.md (100%) rename {0213-house-robber-ii => Leetcode/0213-house-robber-ii}/0213-house-robber-ii.cpp (100%) rename {0200-number-of-islands => Leetcode/0213-house-robber-ii}/NOTES.md (100%) rename {0213-house-robber-ii => Leetcode/0213-house-robber-ii}/README.md (100%) rename {0290-word-pattern => Leetcode/0290-word-pattern}/0290-word-pattern.cpp (100%) rename {0290-word-pattern => Leetcode/0290-word-pattern}/README.md (100%) rename {0413-arithmetic-slices => Leetcode/0413-arithmetic-slices}/0413-arithmetic-slices.cpp (100%) rename {0213-house-robber-ii => Leetcode/0413-arithmetic-slices}/NOTES.md (100%) rename {0413-arithmetic-slices => Leetcode/0413-arithmetic-slices}/README.md (100%) rename {0438-find-all-anagrams-in-a-string => Leetcode/0438-find-all-anagrams-in-a-string}/0438-find-all-anagrams-in-a-string.cpp (100%) rename {0413-arithmetic-slices => Leetcode/0438-find-all-anagrams-in-a-string}/NOTES.md (100%) rename {0438-find-all-anagrams-in-a-string => Leetcode/0438-find-all-anagrams-in-a-string}/README.md (100%) rename {0452-minimum-number-of-arrows-to-burst-balloons => Leetcode/0452-minimum-number-of-arrows-to-burst-balloons}/0452-minimum-number-of-arrows-to-burst-balloons.cpp (100%) rename {0438-find-all-anagrams-in-a-string => Leetcode/0452-minimum-number-of-arrows-to-burst-balloons}/NOTES.md (100%) rename {0452-minimum-number-of-arrows-to-burst-balloons => Leetcode/0452-minimum-number-of-arrows-to-burst-balloons}/README.md (100%) rename {0491-non-decreasing-subsequences => Leetcode/0491-non-decreasing-subsequences}/0491-non-decreasing-subsequences.cpp (100%) rename {0452-minimum-number-of-arrows-to-burst-balloons => Leetcode/0491-non-decreasing-subsequences}/NOTES.md (100%) rename {0491-non-decreasing-subsequences => Leetcode/0491-non-decreasing-subsequences}/README.md (100%) rename {0520-detect-capital => Leetcode/0520-detect-capital}/0520-detect-capital.cpp (100%) rename {0520-detect-capital => Leetcode/0520-detect-capital}/README.md (100%) rename {0547-number-of-provinces => Leetcode/0547-number-of-provinces}/0547-number-of-provinces.cpp (100%) rename {0491-non-decreasing-subsequences => Leetcode/0547-number-of-provinces}/NOTES.md (100%) rename {0547-number-of-provinces => Leetcode/0547-number-of-provinces}/README.md (100%) rename {0547-number-of-provinces => Leetcode/0572-subtree-of-another-tree}/NOTES.md (100%) rename {0572-subtree-of-another-tree => Leetcode/0572-subtree-of-another-tree}/README.md (100%) rename {0713-subarray-product-less-than-k => Leetcode/0713-subarray-product-less-than-k}/0713-subarray-product-less-than-k.cpp (100%) rename {0713-subarray-product-less-than-k => Leetcode/0713-subarray-product-less-than-k}/README.md (100%) rename {0797-all-paths-from-source-to-target => Leetcode/0797-all-paths-from-source-to-target}/0797-all-paths-from-source-to-target.cpp (100%) rename {0572-subtree-of-another-tree => Leetcode/0797-all-paths-from-source-to-target}/NOTES.md (100%) rename {0797-all-paths-from-source-to-target => Leetcode/0797-all-paths-from-source-to-target}/README.md (100%) rename {0844-backspace-string-compare => Leetcode/0844-backspace-string-compare}/0844-backspace-string-compare.cpp (100%) rename {0797-all-paths-from-source-to-target => Leetcode/0844-backspace-string-compare}/NOTES.md (100%) rename {0844-backspace-string-compare => Leetcode/0844-backspace-string-compare}/README.md (100%) rename {0944-delete-columns-to-make-sorted => Leetcode/0944-delete-columns-to-make-sorted}/0944-delete-columns-to-make-sorted.cpp (100%) rename {0844-backspace-string-compare => Leetcode/0944-delete-columns-to-make-sorted}/NOTES.md (100%) rename {0944-delete-columns-to-make-sorted => Leetcode/0944-delete-columns-to-make-sorted}/README.md (100%) rename {0986-interval-list-intersections => Leetcode/0986-interval-list-intersections}/0986-interval-list-intersections.cpp (100%) rename {0944-delete-columns-to-make-sorted => Leetcode/0986-interval-list-intersections}/NOTES.md (100%) rename {0986-interval-list-intersections => Leetcode/0986-interval-list-intersections}/README.md (100%) rename {0997-find-the-town-judge => Leetcode/0997-find-the-town-judge}/0997-find-the-town-judge.cpp (100%) rename {0986-interval-list-intersections => Leetcode/0997-find-the-town-judge}/NOTES.md (100%) rename {0997-find-the-town-judge => Leetcode/0997-find-the-town-judge}/README.md (100%) rename {1091-shortest-path-in-binary-matrix => Leetcode/1091-shortest-path-in-binary-matrix}/1091-shortest-path-in-binary-matrix.cpp (100%) rename {0997-find-the-town-judge => Leetcode/1091-shortest-path-in-binary-matrix}/NOTES.md (100%) rename {1443-minimum-time-to-collect-all-apples-in-a-tree => Leetcode/1443-minimum-time-to-collect-all-apples-in-a-tree}/1443-minimum-time-to-collect-all-apples-in-a-tree.cpp (100%) rename {1091-shortest-path-in-binary-matrix => Leetcode/1443-minimum-time-to-collect-all-apples-in-a-tree}/NOTES.md (100%) rename {1443-minimum-time-to-collect-all-apples-in-a-tree => Leetcode/1443-minimum-time-to-collect-all-apples-in-a-tree}/README.md (100%) rename {1833-maximum-ice-cream-bars => Leetcode/1833-maximum-ice-cream-bars}/1833-maximum-ice-cream-bars.cpp (100%) rename {1443-minimum-time-to-collect-all-apples-in-a-tree => Leetcode/1833-maximum-ice-cream-bars}/NOTES.md (100%) rename {1833-maximum-ice-cream-bars => Leetcode/1833-maximum-ice-cream-bars}/README.md (100%) rename {1833-maximum-ice-cream-bars => Leetcode/2244-minimum-rounds-to-complete-all-tasks}/NOTES.md (100%) rename {2244-minimum-rounds-to-complete-all-tasks => Leetcode/2244-minimum-rounds-to-complete-all-tasks}/README.md (100%) delete mode 100644 Max Sum without Adjacents - GFG/README.md delete mode 100644 Max Sum without Adjacents - GFG/max-sum-without-adjacents.cpp diff --git a/0082-remove-duplicates-from-sorted-list-ii/0082-remove-duplicates-from-sorted-list-ii.cpp b/0082-remove-duplicates-from-sorted-list-ii/0082-remove-duplicates-from-sorted-list-ii.cpp deleted file mode 100644 index 5dca5c4..0000000 --- a/0082-remove-duplicates-from-sorted-list-ii/0082-remove-duplicates-from-sorted-list-ii.cpp +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Definition for singly-linked list. - * struct ListNode { - * int val; - * ListNode *next; - * ListNode() : val(0), next(nullptr) {} - * ListNode(int x) : val(x), next(nullptr) {} - * ListNode(int x, ListNode *next) : val(x), next(next) {} - * }; - */ -class Solution { -public: - ListNode* deleteDuplicates(ListNode* head) { - if(head==NULL) return NULL; - vector freq(201, 0); - ListNode* temp=head; - ListNode* ans=NULL, *tmp=NULL; - while(temp!=NULL){ - freq[temp->val+100]++; - temp=temp->next; - } - for(int i=0;i<201;i++){ - if(freq[i]==0 || freq[i]>1) continue; - else{ - ListNode* newNode=new ListNode; - newNode->val=i-100; - newNode->next=NULL; - if(ans==NULL){ - ans=newNode; - } - if(tmp==NULL){ - tmp=newNode; - }else{ - tmp->next=newNode; - tmp=newNode; - } - } - } - return ans; - } -}; \ No newline at end of file diff --git a/2244-minimum-rounds-to-complete-all-tasks/NOTES.md b/2244-minimum-rounds-to-complete-all-tasks/NOTES.md deleted file mode 100644 index 38c1374..0000000 --- a/2244-minimum-rounds-to-complete-all-tasks/NOTES.md +++ /dev/null @@ -1 +0,0 @@ -​ \ No newline at end of file diff --git a/Absolute difference divisible by K - GFG/README.md b/GFG/Absolute difference divisible by K - GFG/README.md similarity index 100% rename from Absolute difference divisible by K - GFG/README.md rename to GFG/Absolute difference divisible by K - GFG/README.md diff --git a/Absolute difference divisible by K - GFG/absolute-difference-divisible-by-k.cpp b/GFG/Absolute difference divisible by K - GFG/absolute-difference-divisible-by-k.cpp similarity index 100% rename from Absolute difference divisible by K - GFG/absolute-difference-divisible-by-k.cpp rename to GFG/Absolute difference divisible by K - GFG/absolute-difference-divisible-by-k.cpp diff --git a/Carpet into Box - GFG/README.md b/GFG/Carpet into Box - GFG/README.md similarity index 100% rename from Carpet into Box - GFG/README.md rename to GFG/Carpet into Box - GFG/README.md diff --git a/Carpet into Box - GFG/carpet-into-box.cpp b/GFG/Carpet into Box - GFG/carpet-into-box.cpp similarity index 100% rename from Carpet into Box - GFG/carpet-into-box.cpp rename to GFG/Carpet into Box - GFG/carpet-into-box.cpp diff --git a/Case-specific Sorting of Strings - GFG/README.md b/GFG/Case-specific Sorting of Strings - GFG/README.md similarity index 100% rename from Case-specific Sorting of Strings - GFG/README.md rename to GFG/Case-specific Sorting of Strings - GFG/README.md diff --git a/Coordinates of the last cell in a Matrix on which performing given operations exits from the Matrix - GFG/README.md b/GFG/Coordinates of the last cell in a Matrix on which performing given operations exits from the Matrix - GFG/README.md similarity index 100% rename from Coordinates of the last cell in a Matrix on which performing given operations exits from the Matrix - GFG/README.md rename to GFG/Coordinates of the last cell in a Matrix on which performing given operations exits from the Matrix - GFG/README.md diff --git a/Coordinates of the last cell in a Matrix on which performing given operations exits from the Matrix - GFG/coordinates-of-the-last-cell-in-a-matrix-on-which-performing-given-operations-exits-from-the-matrix.cpp b/GFG/Coordinates of the last cell in a Matrix on which performing given operations exits from the Matrix - GFG/coordinates-of-the-last-cell-in-a-matrix-on-which-performing-given-operations-exits-from-the-matrix.cpp similarity index 100% rename from Coordinates of the last cell in a Matrix on which performing given operations exits from the Matrix - GFG/coordinates-of-the-last-cell-in-a-matrix-on-which-performing-given-operations-exits-from-the-matrix.cpp rename to GFG/Coordinates of the last cell in a Matrix on which performing given operations exits from the Matrix - GFG/coordinates-of-the-last-cell-in-a-matrix-on-which-performing-given-operations-exits-from-the-matrix.cpp diff --git a/Count even length - GFG/README.md b/GFG/Count even length - GFG/README.md similarity index 100% rename from Count even length - GFG/README.md rename to GFG/Count even length - GFG/README.md diff --git a/Count even length - GFG/count-even-length.cpp b/GFG/Count even length - GFG/count-even-length.cpp similarity index 100% rename from Count even length - GFG/count-even-length.cpp rename to GFG/Count even length - GFG/count-even-length.cpp diff --git a/Find minimum number of Laptops required - GFG/README.md b/GFG/Find minimum number of Laptops required - GFG/README.md similarity index 100% rename from Find minimum number of Laptops required - GFG/README.md rename to GFG/Find minimum number of Laptops required - GFG/README.md diff --git a/Find the longest string - GFG/README.md b/GFG/Find the longest string - GFG/README.md similarity index 100% rename from Find the longest string - GFG/README.md rename to GFG/Find the longest string - GFG/README.md diff --git a/Find the longest string - GFG/find-the-longest-string.cpp b/GFG/Find the longest string - GFG/find-the-longest-string.cpp similarity index 100% rename from Find the longest string - GFG/find-the-longest-string.cpp rename to GFG/Find the longest string - GFG/find-the-longest-string.cpp diff --git a/Find the maximum GCD of the siblings of a Binary Tree - GFG/README.md b/GFG/Find the maximum GCD of the siblings of a Binary Tree - GFG/README.md similarity index 100% rename from Find the maximum GCD of the siblings of a Binary Tree - GFG/README.md rename to GFG/Find the maximum GCD of the siblings of a Binary Tree - GFG/README.md diff --git a/Find the maximum GCD of the siblings of a Binary Tree - GFG/find-the-maximum-gcd-of-the-siblings-of-a-binary-tree.cpp b/GFG/Find the maximum GCD of the siblings of a Binary Tree - GFG/find-the-maximum-gcd-of-the-siblings-of-a-binary-tree.cpp similarity index 100% rename from Find the maximum GCD of the siblings of a Binary Tree - GFG/find-the-maximum-gcd-of-the-siblings-of-a-binary-tree.cpp rename to GFG/Find the maximum GCD of the siblings of a Binary Tree - GFG/find-the-maximum-gcd-of-the-siblings-of-a-binary-tree.cpp diff --git a/Geeks And The String - GFG/README.md b/GFG/Geeks And The String - GFG/README.md similarity index 100% rename from Geeks And The String - GFG/README.md rename to GFG/Geeks And The String - GFG/README.md diff --git a/Geeks And The String - GFG/geeks-and-the-string.cpp b/GFG/Geeks And The String - GFG/geeks-and-the-string.cpp similarity index 100% rename from Geeks And The String - GFG/geeks-and-the-string.cpp rename to GFG/Geeks And The String - GFG/geeks-and-the-string.cpp diff --git a/Maximum Profit By Choosing A Subset Of Intervals - GFG/README.md b/GFG/Maximum Profit By Choosing A Subset Of Intervals - GFG/README.md similarity index 100% rename from Maximum Profit By Choosing A Subset Of Intervals - GFG/README.md rename to GFG/Maximum Profit By Choosing A Subset Of Intervals - GFG/README.md diff --git a/Maximum Profit By Choosing A Subset Of Intervals - GFG/maximum-profit-by-choosing-a-subset-of-intervals.cpp b/GFG/Maximum Profit By Choosing A Subset Of Intervals - GFG/maximum-profit-by-choosing-a-subset-of-intervals.cpp similarity index 100% rename from Maximum Profit By Choosing A Subset Of Intervals - GFG/maximum-profit-by-choosing-a-subset-of-intervals.cpp rename to GFG/Maximum Profit By Choosing A Subset Of Intervals - GFG/maximum-profit-by-choosing-a-subset-of-intervals.cpp diff --git a/Maximum Value - GFG/README.md b/GFG/Maximum Value - GFG/README.md similarity index 100% rename from Maximum Value - GFG/README.md rename to GFG/Maximum Value - GFG/README.md diff --git a/Maximum Value - GFG/maximum-value.cpp b/GFG/Maximum Value - GFG/maximum-value.cpp similarity index 100% rename from Maximum Value - GFG/maximum-value.cpp rename to GFG/Maximum Value - GFG/maximum-value.cpp diff --git a/Min operations - GFG/README.md b/GFG/Min operations - GFG/README.md similarity index 100% rename from Min operations - GFG/README.md rename to GFG/Min operations - GFG/README.md diff --git a/Min operations - GFG/min-operations.cpp b/GFG/Min operations - GFG/min-operations.cpp similarity index 100% rename from Min operations - GFG/min-operations.cpp rename to GFG/Min operations - GFG/min-operations.cpp diff --git a/Minimize the sum - GFG/README.md b/GFG/Minimize the sum - GFG/README.md similarity index 100% rename from Minimize the sum - GFG/README.md rename to GFG/Minimize the sum - GFG/README.md diff --git a/Minimize the sum - GFG/minimize-the-sum.cpp b/GFG/Minimize the sum - GFG/minimize-the-sum.cpp similarity index 100% rename from Minimize the sum - GFG/minimize-the-sum.cpp rename to GFG/Minimize the sum - GFG/minimize-the-sum.cpp diff --git a/Next Greater Element - GFG/README.md b/GFG/Next Greater Element - GFG/README.md similarity index 100% rename from Next Greater Element - GFG/README.md rename to GFG/Next Greater Element - GFG/README.md diff --git a/Next Greater Element - GFG/next-greater-element.cpp b/GFG/Next Greater Element - GFG/next-greater-element.cpp similarity index 100% rename from Next Greater Element - GFG/next-greater-element.cpp rename to GFG/Next Greater Element - GFG/next-greater-element.cpp diff --git a/Shortest Prime Path - GFG/README.md b/GFG/Shortest Prime Path - GFG/README.md similarity index 100% rename from Shortest Prime Path - GFG/README.md rename to GFG/Shortest Prime Path - GFG/README.md diff --git a/Shortest Prime Path - GFG/shortest-prime-path.cpp b/GFG/Shortest Prime Path - GFG/shortest-prime-path.cpp similarity index 100% rename from Shortest Prime Path - GFG/shortest-prime-path.cpp rename to GFG/Shortest Prime Path - GFG/shortest-prime-path.cpp diff --git a/Total Decoding Messages - GFG/README.md b/GFG/Total Decoding Messages - GFG/README.md similarity index 100% rename from Total Decoding Messages - GFG/README.md rename to GFG/Total Decoding Messages - GFG/README.md diff --git a/Total Decoding Messages - GFG/total-decoding-messages.cpp b/GFG/Total Decoding Messages - GFG/total-decoding-messages.cpp similarity index 100% rename from Total Decoding Messages - GFG/total-decoding-messages.cpp rename to GFG/Total Decoding Messages - GFG/total-decoding-messages.cpp diff --git a/Transform to Sum Tree - GFG/README.md b/GFG/Transform to Sum Tree - GFG/README.md similarity index 100% rename from Transform to Sum Tree - GFG/README.md rename to GFG/Transform to Sum Tree - GFG/README.md diff --git a/Transform to Sum Tree - GFG/transform-to-sum-tree.cpp b/GFG/Transform to Sum Tree - GFG/transform-to-sum-tree.cpp similarity index 100% rename from Transform to Sum Tree - GFG/transform-to-sum-tree.cpp rename to GFG/Transform to Sum Tree - GFG/transform-to-sum-tree.cpp diff --git a/0005-longest-palindromic-substring/0005-longest-palindromic-substring.cpp b/Leetcode/0005-longest-palindromic-substring/0005-longest-palindromic-substring.cpp similarity index 100% rename from 0005-longest-palindromic-substring/0005-longest-palindromic-substring.cpp rename to Leetcode/0005-longest-palindromic-substring/0005-longest-palindromic-substring.cpp diff --git a/0005-longest-palindromic-substring/NOTES.md b/Leetcode/0005-longest-palindromic-substring/NOTES.md similarity index 100% rename from 0005-longest-palindromic-substring/NOTES.md rename to Leetcode/0005-longest-palindromic-substring/NOTES.md diff --git a/0005-longest-palindromic-substring/README.md b/Leetcode/0005-longest-palindromic-substring/README.md similarity index 100% rename from 0005-longest-palindromic-substring/README.md rename to Leetcode/0005-longest-palindromic-substring/README.md diff --git a/0011-container-with-most-water/0011-container-with-most-water.cpp b/Leetcode/0011-container-with-most-water/0011-container-with-most-water.cpp similarity index 100% rename from 0011-container-with-most-water/0011-container-with-most-water.cpp rename to Leetcode/0011-container-with-most-water/0011-container-with-most-water.cpp diff --git a/0011-container-with-most-water/NOTES.md b/Leetcode/0011-container-with-most-water/NOTES.md similarity index 100% rename from 0011-container-with-most-water/NOTES.md rename to Leetcode/0011-container-with-most-water/NOTES.md diff --git a/0011-container-with-most-water/README.md b/Leetcode/0011-container-with-most-water/README.md similarity index 100% rename from 0011-container-with-most-water/README.md rename to Leetcode/0011-container-with-most-water/README.md diff --git a/0015-3sum/0015-3sum.cpp b/Leetcode/0015-3sum/0015-3sum.cpp similarity index 100% rename from 0015-3sum/0015-3sum.cpp rename to Leetcode/0015-3sum/0015-3sum.cpp diff --git a/0015-3sum/README.md b/Leetcode/0015-3sum/README.md similarity index 100% rename from 0015-3sum/README.md rename to Leetcode/0015-3sum/README.md diff --git a/0017-letter-combinations-of-a-phone-number/0017-letter-combinations-of-a-phone-number.cpp b/Leetcode/0017-letter-combinations-of-a-phone-number/0017-letter-combinations-of-a-phone-number.cpp similarity index 100% rename from 0017-letter-combinations-of-a-phone-number/0017-letter-combinations-of-a-phone-number.cpp rename to Leetcode/0017-letter-combinations-of-a-phone-number/0017-letter-combinations-of-a-phone-number.cpp diff --git a/0017-letter-combinations-of-a-phone-number/NOTES.md b/Leetcode/0017-letter-combinations-of-a-phone-number/NOTES.md similarity index 100% rename from 0017-letter-combinations-of-a-phone-number/NOTES.md rename to Leetcode/0017-letter-combinations-of-a-phone-number/NOTES.md diff --git a/0017-letter-combinations-of-a-phone-number/README.md b/Leetcode/0017-letter-combinations-of-a-phone-number/README.md similarity index 100% rename from 0017-letter-combinations-of-a-phone-number/README.md rename to Leetcode/0017-letter-combinations-of-a-phone-number/README.md diff --git a/0022-generate-parentheses/0022-generate-parentheses.cpp b/Leetcode/0022-generate-parentheses/0022-generate-parentheses.cpp similarity index 100% rename from 0022-generate-parentheses/0022-generate-parentheses.cpp rename to Leetcode/0022-generate-parentheses/0022-generate-parentheses.cpp diff --git a/0022-generate-parentheses/README.md b/Leetcode/0022-generate-parentheses/README.md similarity index 100% rename from 0022-generate-parentheses/README.md rename to Leetcode/0022-generate-parentheses/README.md diff --git a/0039-combination-sum/0039-combination-sum.cpp b/Leetcode/0039-combination-sum/0039-combination-sum.cpp similarity index 100% rename from 0039-combination-sum/0039-combination-sum.cpp rename to Leetcode/0039-combination-sum/0039-combination-sum.cpp diff --git a/0039-combination-sum/NOTES.md b/Leetcode/0039-combination-sum/NOTES.md similarity index 100% rename from 0039-combination-sum/NOTES.md rename to Leetcode/0039-combination-sum/NOTES.md diff --git a/0039-combination-sum/README.md b/Leetcode/0039-combination-sum/README.md similarity index 100% rename from 0039-combination-sum/README.md rename to Leetcode/0039-combination-sum/README.md diff --git a/0040-combination-sum-ii/0040-combination-sum-ii.cpp b/Leetcode/0040-combination-sum-ii/0040-combination-sum-ii.cpp similarity index 100% rename from 0040-combination-sum-ii/0040-combination-sum-ii.cpp rename to Leetcode/0040-combination-sum-ii/0040-combination-sum-ii.cpp diff --git a/0040-combination-sum-ii/NOTES.md b/Leetcode/0040-combination-sum-ii/NOTES.md similarity index 100% rename from 0040-combination-sum-ii/NOTES.md rename to Leetcode/0040-combination-sum-ii/NOTES.md diff --git a/0040-combination-sum-ii/README.md b/Leetcode/0040-combination-sum-ii/README.md similarity index 100% rename from 0040-combination-sum-ii/README.md rename to Leetcode/0040-combination-sum-ii/README.md diff --git a/0045-jump-game-ii/0045-jump-game-ii.cpp b/Leetcode/0045-jump-game-ii/0045-jump-game-ii.cpp similarity index 100% rename from 0045-jump-game-ii/0045-jump-game-ii.cpp rename to Leetcode/0045-jump-game-ii/0045-jump-game-ii.cpp diff --git a/0045-jump-game-ii/NOTES.md b/Leetcode/0045-jump-game-ii/NOTES.md similarity index 100% rename from 0045-jump-game-ii/NOTES.md rename to Leetcode/0045-jump-game-ii/NOTES.md diff --git a/0045-jump-game-ii/README.md b/Leetcode/0045-jump-game-ii/README.md similarity index 100% rename from 0045-jump-game-ii/README.md rename to Leetcode/0045-jump-game-ii/README.md diff --git a/0047-permutations-ii/0047-permutations-ii.cpp b/Leetcode/0047-permutations-ii/0047-permutations-ii.cpp similarity index 100% rename from 0047-permutations-ii/0047-permutations-ii.cpp rename to Leetcode/0047-permutations-ii/0047-permutations-ii.cpp diff --git a/0047-permutations-ii/NOTES.md b/Leetcode/0047-permutations-ii/NOTES.md similarity index 100% rename from 0047-permutations-ii/NOTES.md rename to Leetcode/0047-permutations-ii/NOTES.md diff --git a/0055-jump-game/0055-jump-game.cpp b/Leetcode/0055-jump-game/0055-jump-game.cpp similarity index 100% rename from 0055-jump-game/0055-jump-game.cpp rename to Leetcode/0055-jump-game/0055-jump-game.cpp diff --git a/0055-jump-game/NOTES.md b/Leetcode/0055-jump-game/NOTES.md similarity index 100% rename from 0055-jump-game/NOTES.md rename to Leetcode/0055-jump-game/NOTES.md diff --git a/0055-jump-game/README.md b/Leetcode/0055-jump-game/README.md similarity index 100% rename from 0055-jump-game/README.md rename to Leetcode/0055-jump-game/README.md diff --git a/0057-insert-interval/0057-insert-interval.cpp b/Leetcode/0057-insert-interval/0057-insert-interval.cpp similarity index 100% rename from 0057-insert-interval/0057-insert-interval.cpp rename to Leetcode/0057-insert-interval/0057-insert-interval.cpp diff --git a/0057-insert-interval/NOTES.md b/Leetcode/0057-insert-interval/NOTES.md similarity index 100% rename from 0057-insert-interval/NOTES.md rename to Leetcode/0057-insert-interval/NOTES.md diff --git a/0057-insert-interval/README.md b/Leetcode/0057-insert-interval/README.md similarity index 100% rename from 0057-insert-interval/README.md rename to Leetcode/0057-insert-interval/README.md diff --git a/0062-unique-paths/0062-unique-paths.cpp b/Leetcode/0062-unique-paths/0062-unique-paths.cpp similarity index 100% rename from 0062-unique-paths/0062-unique-paths.cpp rename to Leetcode/0062-unique-paths/0062-unique-paths.cpp diff --git a/0062-unique-paths/NOTES.md b/Leetcode/0062-unique-paths/NOTES.md similarity index 100% rename from 0062-unique-paths/NOTES.md rename to Leetcode/0062-unique-paths/NOTES.md diff --git a/0062-unique-paths/README.md b/Leetcode/0062-unique-paths/README.md similarity index 100% rename from 0062-unique-paths/README.md rename to Leetcode/0062-unique-paths/README.md diff --git a/0078-subsets/0078-subsets.cpp b/Leetcode/0078-subsets/0078-subsets.cpp similarity index 100% rename from 0078-subsets/0078-subsets.cpp rename to Leetcode/0078-subsets/0078-subsets.cpp diff --git a/0078-subsets/NOTES.md b/Leetcode/0078-subsets/NOTES.md similarity index 100% rename from 0078-subsets/NOTES.md rename to Leetcode/0078-subsets/NOTES.md diff --git a/0078-subsets/README.md b/Leetcode/0078-subsets/README.md similarity index 100% rename from 0078-subsets/README.md rename to Leetcode/0078-subsets/README.md diff --git a/0079-word-search/0079-word-search.cpp b/Leetcode/0079-word-search/0079-word-search.cpp similarity index 100% rename from 0079-word-search/0079-word-search.cpp rename to Leetcode/0079-word-search/0079-word-search.cpp diff --git a/0079-word-search/README.md b/Leetcode/0079-word-search/README.md similarity index 100% rename from 0079-word-search/README.md rename to Leetcode/0079-word-search/README.md diff --git a/0090-subsets-ii/0090-subsets-ii.cpp b/Leetcode/0090-subsets-ii/0090-subsets-ii.cpp similarity index 100% rename from 0090-subsets-ii/0090-subsets-ii.cpp rename to Leetcode/0090-subsets-ii/0090-subsets-ii.cpp diff --git a/0082-remove-duplicates-from-sorted-list-ii/NOTES.md b/Leetcode/0090-subsets-ii/NOTES.md similarity index 100% rename from 0082-remove-duplicates-from-sorted-list-ii/NOTES.md rename to Leetcode/0090-subsets-ii/NOTES.md diff --git a/0090-subsets-ii/README.md b/Leetcode/0090-subsets-ii/README.md similarity index 100% rename from 0090-subsets-ii/README.md rename to Leetcode/0090-subsets-ii/README.md diff --git a/0100-same-tree/0100-same-tree.cpp b/Leetcode/0100-same-tree/0100-same-tree.cpp similarity index 100% rename from 0100-same-tree/0100-same-tree.cpp rename to Leetcode/0100-same-tree/0100-same-tree.cpp diff --git a/0100-same-tree/README.md b/Leetcode/0100-same-tree/README.md similarity index 100% rename from 0100-same-tree/README.md rename to Leetcode/0100-same-tree/README.md diff --git a/0117-populating-next-right-pointers-in-each-node-ii/0117-populating-next-right-pointers-in-each-node-ii.cpp b/Leetcode/0117-populating-next-right-pointers-in-each-node-ii/0117-populating-next-right-pointers-in-each-node-ii.cpp similarity index 100% rename from 0117-populating-next-right-pointers-in-each-node-ii/0117-populating-next-right-pointers-in-each-node-ii.cpp rename to Leetcode/0117-populating-next-right-pointers-in-each-node-ii/0117-populating-next-right-pointers-in-each-node-ii.cpp diff --git a/0090-subsets-ii/NOTES.md b/Leetcode/0117-populating-next-right-pointers-in-each-node-ii/NOTES.md similarity index 100% rename from 0090-subsets-ii/NOTES.md rename to Leetcode/0117-populating-next-right-pointers-in-each-node-ii/NOTES.md diff --git a/0117-populating-next-right-pointers-in-each-node-ii/README.md b/Leetcode/0117-populating-next-right-pointers-in-each-node-ii/README.md similarity index 100% rename from 0117-populating-next-right-pointers-in-each-node-ii/README.md rename to Leetcode/0117-populating-next-right-pointers-in-each-node-ii/README.md diff --git a/0130-surrounded-regions/README.md b/Leetcode/0130-surrounded-regions/README.md similarity index 100% rename from 0130-surrounded-regions/README.md rename to Leetcode/0130-surrounded-regions/README.md diff --git a/0144-binary-tree-preorder-traversal/0144-binary-tree-preorder-traversal.cpp b/Leetcode/0144-binary-tree-preorder-traversal/0144-binary-tree-preorder-traversal.cpp similarity index 100% rename from 0144-binary-tree-preorder-traversal/0144-binary-tree-preorder-traversal.cpp rename to Leetcode/0144-binary-tree-preorder-traversal/0144-binary-tree-preorder-traversal.cpp diff --git a/0117-populating-next-right-pointers-in-each-node-ii/NOTES.md b/Leetcode/0144-binary-tree-preorder-traversal/NOTES.md similarity index 100% rename from 0117-populating-next-right-pointers-in-each-node-ii/NOTES.md rename to Leetcode/0144-binary-tree-preorder-traversal/NOTES.md diff --git a/0144-binary-tree-preorder-traversal/README.md b/Leetcode/0144-binary-tree-preorder-traversal/README.md similarity index 100% rename from 0144-binary-tree-preorder-traversal/README.md rename to Leetcode/0144-binary-tree-preorder-traversal/README.md diff --git a/0200-number-of-islands/0200-number-of-islands.cpp b/Leetcode/0200-number-of-islands/0200-number-of-islands.cpp similarity index 100% rename from 0200-number-of-islands/0200-number-of-islands.cpp rename to Leetcode/0200-number-of-islands/0200-number-of-islands.cpp diff --git a/0144-binary-tree-preorder-traversal/NOTES.md b/Leetcode/0200-number-of-islands/NOTES.md similarity index 100% rename from 0144-binary-tree-preorder-traversal/NOTES.md rename to Leetcode/0200-number-of-islands/NOTES.md diff --git a/0200-number-of-islands/README.md b/Leetcode/0200-number-of-islands/README.md similarity index 100% rename from 0200-number-of-islands/README.md rename to Leetcode/0200-number-of-islands/README.md diff --git a/0209-minimum-size-subarray-sum/0209-minimum-size-subarray-sum.cpp b/Leetcode/0209-minimum-size-subarray-sum/0209-minimum-size-subarray-sum.cpp similarity index 100% rename from 0209-minimum-size-subarray-sum/0209-minimum-size-subarray-sum.cpp rename to Leetcode/0209-minimum-size-subarray-sum/0209-minimum-size-subarray-sum.cpp diff --git a/0209-minimum-size-subarray-sum/README.md b/Leetcode/0209-minimum-size-subarray-sum/README.md similarity index 100% rename from 0209-minimum-size-subarray-sum/README.md rename to Leetcode/0209-minimum-size-subarray-sum/README.md diff --git a/0213-house-robber-ii/0213-house-robber-ii.cpp b/Leetcode/0213-house-robber-ii/0213-house-robber-ii.cpp similarity index 100% rename from 0213-house-robber-ii/0213-house-robber-ii.cpp rename to Leetcode/0213-house-robber-ii/0213-house-robber-ii.cpp diff --git a/0200-number-of-islands/NOTES.md b/Leetcode/0213-house-robber-ii/NOTES.md similarity index 100% rename from 0200-number-of-islands/NOTES.md rename to Leetcode/0213-house-robber-ii/NOTES.md diff --git a/0213-house-robber-ii/README.md b/Leetcode/0213-house-robber-ii/README.md similarity index 100% rename from 0213-house-robber-ii/README.md rename to Leetcode/0213-house-robber-ii/README.md diff --git a/0290-word-pattern/0290-word-pattern.cpp b/Leetcode/0290-word-pattern/0290-word-pattern.cpp similarity index 100% rename from 0290-word-pattern/0290-word-pattern.cpp rename to Leetcode/0290-word-pattern/0290-word-pattern.cpp diff --git a/0290-word-pattern/README.md b/Leetcode/0290-word-pattern/README.md similarity index 100% rename from 0290-word-pattern/README.md rename to Leetcode/0290-word-pattern/README.md diff --git a/0413-arithmetic-slices/0413-arithmetic-slices.cpp b/Leetcode/0413-arithmetic-slices/0413-arithmetic-slices.cpp similarity index 100% rename from 0413-arithmetic-slices/0413-arithmetic-slices.cpp rename to Leetcode/0413-arithmetic-slices/0413-arithmetic-slices.cpp diff --git a/0213-house-robber-ii/NOTES.md b/Leetcode/0413-arithmetic-slices/NOTES.md similarity index 100% rename from 0213-house-robber-ii/NOTES.md rename to Leetcode/0413-arithmetic-slices/NOTES.md diff --git a/0413-arithmetic-slices/README.md b/Leetcode/0413-arithmetic-slices/README.md similarity index 100% rename from 0413-arithmetic-slices/README.md rename to Leetcode/0413-arithmetic-slices/README.md diff --git a/0438-find-all-anagrams-in-a-string/0438-find-all-anagrams-in-a-string.cpp b/Leetcode/0438-find-all-anagrams-in-a-string/0438-find-all-anagrams-in-a-string.cpp similarity index 100% rename from 0438-find-all-anagrams-in-a-string/0438-find-all-anagrams-in-a-string.cpp rename to Leetcode/0438-find-all-anagrams-in-a-string/0438-find-all-anagrams-in-a-string.cpp diff --git a/0413-arithmetic-slices/NOTES.md b/Leetcode/0438-find-all-anagrams-in-a-string/NOTES.md similarity index 100% rename from 0413-arithmetic-slices/NOTES.md rename to Leetcode/0438-find-all-anagrams-in-a-string/NOTES.md diff --git a/0438-find-all-anagrams-in-a-string/README.md b/Leetcode/0438-find-all-anagrams-in-a-string/README.md similarity index 100% rename from 0438-find-all-anagrams-in-a-string/README.md rename to Leetcode/0438-find-all-anagrams-in-a-string/README.md diff --git a/0452-minimum-number-of-arrows-to-burst-balloons/0452-minimum-number-of-arrows-to-burst-balloons.cpp b/Leetcode/0452-minimum-number-of-arrows-to-burst-balloons/0452-minimum-number-of-arrows-to-burst-balloons.cpp similarity index 100% rename from 0452-minimum-number-of-arrows-to-burst-balloons/0452-minimum-number-of-arrows-to-burst-balloons.cpp rename to Leetcode/0452-minimum-number-of-arrows-to-burst-balloons/0452-minimum-number-of-arrows-to-burst-balloons.cpp diff --git a/0438-find-all-anagrams-in-a-string/NOTES.md b/Leetcode/0452-minimum-number-of-arrows-to-burst-balloons/NOTES.md similarity index 100% rename from 0438-find-all-anagrams-in-a-string/NOTES.md rename to Leetcode/0452-minimum-number-of-arrows-to-burst-balloons/NOTES.md diff --git a/0452-minimum-number-of-arrows-to-burst-balloons/README.md b/Leetcode/0452-minimum-number-of-arrows-to-burst-balloons/README.md similarity index 100% rename from 0452-minimum-number-of-arrows-to-burst-balloons/README.md rename to Leetcode/0452-minimum-number-of-arrows-to-burst-balloons/README.md diff --git a/0491-non-decreasing-subsequences/0491-non-decreasing-subsequences.cpp b/Leetcode/0491-non-decreasing-subsequences/0491-non-decreasing-subsequences.cpp similarity index 100% rename from 0491-non-decreasing-subsequences/0491-non-decreasing-subsequences.cpp rename to Leetcode/0491-non-decreasing-subsequences/0491-non-decreasing-subsequences.cpp diff --git a/0452-minimum-number-of-arrows-to-burst-balloons/NOTES.md b/Leetcode/0491-non-decreasing-subsequences/NOTES.md similarity index 100% rename from 0452-minimum-number-of-arrows-to-burst-balloons/NOTES.md rename to Leetcode/0491-non-decreasing-subsequences/NOTES.md diff --git a/0491-non-decreasing-subsequences/README.md b/Leetcode/0491-non-decreasing-subsequences/README.md similarity index 100% rename from 0491-non-decreasing-subsequences/README.md rename to Leetcode/0491-non-decreasing-subsequences/README.md diff --git a/0520-detect-capital/0520-detect-capital.cpp b/Leetcode/0520-detect-capital/0520-detect-capital.cpp similarity index 100% rename from 0520-detect-capital/0520-detect-capital.cpp rename to Leetcode/0520-detect-capital/0520-detect-capital.cpp diff --git a/0520-detect-capital/README.md b/Leetcode/0520-detect-capital/README.md similarity index 100% rename from 0520-detect-capital/README.md rename to Leetcode/0520-detect-capital/README.md diff --git a/0547-number-of-provinces/0547-number-of-provinces.cpp b/Leetcode/0547-number-of-provinces/0547-number-of-provinces.cpp similarity index 100% rename from 0547-number-of-provinces/0547-number-of-provinces.cpp rename to Leetcode/0547-number-of-provinces/0547-number-of-provinces.cpp diff --git a/0491-non-decreasing-subsequences/NOTES.md b/Leetcode/0547-number-of-provinces/NOTES.md similarity index 100% rename from 0491-non-decreasing-subsequences/NOTES.md rename to Leetcode/0547-number-of-provinces/NOTES.md diff --git a/0547-number-of-provinces/README.md b/Leetcode/0547-number-of-provinces/README.md similarity index 100% rename from 0547-number-of-provinces/README.md rename to Leetcode/0547-number-of-provinces/README.md diff --git a/0547-number-of-provinces/NOTES.md b/Leetcode/0572-subtree-of-another-tree/NOTES.md similarity index 100% rename from 0547-number-of-provinces/NOTES.md rename to Leetcode/0572-subtree-of-another-tree/NOTES.md diff --git a/0572-subtree-of-another-tree/README.md b/Leetcode/0572-subtree-of-another-tree/README.md similarity index 100% rename from 0572-subtree-of-another-tree/README.md rename to Leetcode/0572-subtree-of-another-tree/README.md diff --git a/0713-subarray-product-less-than-k/0713-subarray-product-less-than-k.cpp b/Leetcode/0713-subarray-product-less-than-k/0713-subarray-product-less-than-k.cpp similarity index 100% rename from 0713-subarray-product-less-than-k/0713-subarray-product-less-than-k.cpp rename to Leetcode/0713-subarray-product-less-than-k/0713-subarray-product-less-than-k.cpp diff --git a/0713-subarray-product-less-than-k/README.md b/Leetcode/0713-subarray-product-less-than-k/README.md similarity index 100% rename from 0713-subarray-product-less-than-k/README.md rename to Leetcode/0713-subarray-product-less-than-k/README.md diff --git a/0797-all-paths-from-source-to-target/0797-all-paths-from-source-to-target.cpp b/Leetcode/0797-all-paths-from-source-to-target/0797-all-paths-from-source-to-target.cpp similarity index 100% rename from 0797-all-paths-from-source-to-target/0797-all-paths-from-source-to-target.cpp rename to Leetcode/0797-all-paths-from-source-to-target/0797-all-paths-from-source-to-target.cpp diff --git a/0572-subtree-of-another-tree/NOTES.md b/Leetcode/0797-all-paths-from-source-to-target/NOTES.md similarity index 100% rename from 0572-subtree-of-another-tree/NOTES.md rename to Leetcode/0797-all-paths-from-source-to-target/NOTES.md diff --git a/0797-all-paths-from-source-to-target/README.md b/Leetcode/0797-all-paths-from-source-to-target/README.md similarity index 100% rename from 0797-all-paths-from-source-to-target/README.md rename to Leetcode/0797-all-paths-from-source-to-target/README.md diff --git a/0844-backspace-string-compare/0844-backspace-string-compare.cpp b/Leetcode/0844-backspace-string-compare/0844-backspace-string-compare.cpp similarity index 100% rename from 0844-backspace-string-compare/0844-backspace-string-compare.cpp rename to Leetcode/0844-backspace-string-compare/0844-backspace-string-compare.cpp diff --git a/0797-all-paths-from-source-to-target/NOTES.md b/Leetcode/0844-backspace-string-compare/NOTES.md similarity index 100% rename from 0797-all-paths-from-source-to-target/NOTES.md rename to Leetcode/0844-backspace-string-compare/NOTES.md diff --git a/0844-backspace-string-compare/README.md b/Leetcode/0844-backspace-string-compare/README.md similarity index 100% rename from 0844-backspace-string-compare/README.md rename to Leetcode/0844-backspace-string-compare/README.md diff --git a/0944-delete-columns-to-make-sorted/0944-delete-columns-to-make-sorted.cpp b/Leetcode/0944-delete-columns-to-make-sorted/0944-delete-columns-to-make-sorted.cpp similarity index 100% rename from 0944-delete-columns-to-make-sorted/0944-delete-columns-to-make-sorted.cpp rename to Leetcode/0944-delete-columns-to-make-sorted/0944-delete-columns-to-make-sorted.cpp diff --git a/0844-backspace-string-compare/NOTES.md b/Leetcode/0944-delete-columns-to-make-sorted/NOTES.md similarity index 100% rename from 0844-backspace-string-compare/NOTES.md rename to Leetcode/0944-delete-columns-to-make-sorted/NOTES.md diff --git a/0944-delete-columns-to-make-sorted/README.md b/Leetcode/0944-delete-columns-to-make-sorted/README.md similarity index 100% rename from 0944-delete-columns-to-make-sorted/README.md rename to Leetcode/0944-delete-columns-to-make-sorted/README.md diff --git a/0986-interval-list-intersections/0986-interval-list-intersections.cpp b/Leetcode/0986-interval-list-intersections/0986-interval-list-intersections.cpp similarity index 100% rename from 0986-interval-list-intersections/0986-interval-list-intersections.cpp rename to Leetcode/0986-interval-list-intersections/0986-interval-list-intersections.cpp diff --git a/0944-delete-columns-to-make-sorted/NOTES.md b/Leetcode/0986-interval-list-intersections/NOTES.md similarity index 100% rename from 0944-delete-columns-to-make-sorted/NOTES.md rename to Leetcode/0986-interval-list-intersections/NOTES.md diff --git a/0986-interval-list-intersections/README.md b/Leetcode/0986-interval-list-intersections/README.md similarity index 100% rename from 0986-interval-list-intersections/README.md rename to Leetcode/0986-interval-list-intersections/README.md diff --git a/0997-find-the-town-judge/0997-find-the-town-judge.cpp b/Leetcode/0997-find-the-town-judge/0997-find-the-town-judge.cpp similarity index 100% rename from 0997-find-the-town-judge/0997-find-the-town-judge.cpp rename to Leetcode/0997-find-the-town-judge/0997-find-the-town-judge.cpp diff --git a/0986-interval-list-intersections/NOTES.md b/Leetcode/0997-find-the-town-judge/NOTES.md similarity index 100% rename from 0986-interval-list-intersections/NOTES.md rename to Leetcode/0997-find-the-town-judge/NOTES.md diff --git a/0997-find-the-town-judge/README.md b/Leetcode/0997-find-the-town-judge/README.md similarity index 100% rename from 0997-find-the-town-judge/README.md rename to Leetcode/0997-find-the-town-judge/README.md diff --git a/1091-shortest-path-in-binary-matrix/1091-shortest-path-in-binary-matrix.cpp b/Leetcode/1091-shortest-path-in-binary-matrix/1091-shortest-path-in-binary-matrix.cpp similarity index 100% rename from 1091-shortest-path-in-binary-matrix/1091-shortest-path-in-binary-matrix.cpp rename to Leetcode/1091-shortest-path-in-binary-matrix/1091-shortest-path-in-binary-matrix.cpp diff --git a/0997-find-the-town-judge/NOTES.md b/Leetcode/1091-shortest-path-in-binary-matrix/NOTES.md similarity index 100% rename from 0997-find-the-town-judge/NOTES.md rename to Leetcode/1091-shortest-path-in-binary-matrix/NOTES.md diff --git a/1443-minimum-time-to-collect-all-apples-in-a-tree/1443-minimum-time-to-collect-all-apples-in-a-tree.cpp b/Leetcode/1443-minimum-time-to-collect-all-apples-in-a-tree/1443-minimum-time-to-collect-all-apples-in-a-tree.cpp similarity index 100% rename from 1443-minimum-time-to-collect-all-apples-in-a-tree/1443-minimum-time-to-collect-all-apples-in-a-tree.cpp rename to Leetcode/1443-minimum-time-to-collect-all-apples-in-a-tree/1443-minimum-time-to-collect-all-apples-in-a-tree.cpp diff --git a/1091-shortest-path-in-binary-matrix/NOTES.md b/Leetcode/1443-minimum-time-to-collect-all-apples-in-a-tree/NOTES.md similarity index 100% rename from 1091-shortest-path-in-binary-matrix/NOTES.md rename to Leetcode/1443-minimum-time-to-collect-all-apples-in-a-tree/NOTES.md diff --git a/1443-minimum-time-to-collect-all-apples-in-a-tree/README.md b/Leetcode/1443-minimum-time-to-collect-all-apples-in-a-tree/README.md similarity index 100% rename from 1443-minimum-time-to-collect-all-apples-in-a-tree/README.md rename to Leetcode/1443-minimum-time-to-collect-all-apples-in-a-tree/README.md diff --git a/1833-maximum-ice-cream-bars/1833-maximum-ice-cream-bars.cpp b/Leetcode/1833-maximum-ice-cream-bars/1833-maximum-ice-cream-bars.cpp similarity index 100% rename from 1833-maximum-ice-cream-bars/1833-maximum-ice-cream-bars.cpp rename to Leetcode/1833-maximum-ice-cream-bars/1833-maximum-ice-cream-bars.cpp diff --git a/1443-minimum-time-to-collect-all-apples-in-a-tree/NOTES.md b/Leetcode/1833-maximum-ice-cream-bars/NOTES.md similarity index 100% rename from 1443-minimum-time-to-collect-all-apples-in-a-tree/NOTES.md rename to Leetcode/1833-maximum-ice-cream-bars/NOTES.md diff --git a/1833-maximum-ice-cream-bars/README.md b/Leetcode/1833-maximum-ice-cream-bars/README.md similarity index 100% rename from 1833-maximum-ice-cream-bars/README.md rename to Leetcode/1833-maximum-ice-cream-bars/README.md diff --git a/1833-maximum-ice-cream-bars/NOTES.md b/Leetcode/2244-minimum-rounds-to-complete-all-tasks/NOTES.md similarity index 100% rename from 1833-maximum-ice-cream-bars/NOTES.md rename to Leetcode/2244-minimum-rounds-to-complete-all-tasks/NOTES.md diff --git a/2244-minimum-rounds-to-complete-all-tasks/README.md b/Leetcode/2244-minimum-rounds-to-complete-all-tasks/README.md similarity index 100% rename from 2244-minimum-rounds-to-complete-all-tasks/README.md rename to Leetcode/2244-minimum-rounds-to-complete-all-tasks/README.md diff --git a/Max Sum without Adjacents - GFG/README.md b/Max Sum without Adjacents - GFG/README.md deleted file mode 100644 index a707e40..0000000 --- a/Max Sum without Adjacents - GFG/README.md +++ /dev/null @@ -1,42 +0,0 @@ -# Max Sum without Adjacents -## Easy -

Given an array Arr of size N containing positive integers. Find the maximum sum of a subsequence such that no two numbers in the sequence should be adjacent in the array.

- -

Example 1:

- -
Input:
-N = 6
-Arr[] = {5, 5, 10, 100, 10, 5}
-Output: 110
-Explanation: If you take indices 0, 3
-and 5, then Arr[0]+Arr[3]+Arr[5] =
-5+100+5 = 110.
- -

 

- -

Example 2:

- -
Input:
-N = 4
-Arr[] = {3, 2, 7, 10}
-Output: 13
-Explanation: 3 and 10 forms a non
-continuous  subsequence with maximum
-sum.
- -

 

- -

Your Task:
-You don't need to read input or print anything. Your task is to complete the function findMaxSum() which takes the array of integers arr and n as parameters and returns an integer denoting the answer. It is guaranteed that your answer will always fit in the 32-bit integer.

- -

 

- -

Expected Time Complexity: O(N)
-Expected Auxiliary Space: O(1)

- -

 

- -

Constraints:
-1 ≤ N ≤ 106
-1 ≤ Arri ≤ 107

-
\ No newline at end of file diff --git a/Max Sum without Adjacents - GFG/max-sum-without-adjacents.cpp b/Max Sum without Adjacents - GFG/max-sum-without-adjacents.cpp deleted file mode 100644 index 5a912e1..0000000 --- a/Max Sum without Adjacents - GFG/max-sum-without-adjacents.cpp +++ /dev/null @@ -1,47 +0,0 @@ -//{ Driver Code Starts -#include - -using namespace std; - - -// } Driver Code Ends -//User function template for C++ -class Solution{ -public: - // calculate the maximum sum with out adjacent - int findMaxSum(int *arr, int n) { - vector dp(n, 0); - for(int i=0;i> 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.findMaxSum(arr, n); - cout << ans << "\n"; - } - return 0; -} -// } Driver Code Ends \ No newline at end of file