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