0% found this document useful (0 votes)
107 views5 pages

DSA CheatSheet by JB - Sheet1

The document outlines various problems and solutions related to number theory, arrays, strings, and linked lists, categorized by concepts such as prime numbers, GCD & LCM, and greedy algorithms. Each problem is linked to its respective coding platform along with the programming language used for the solution. It serves as a comprehensive guide for practicing algorithmic challenges across different topics.

Uploaded by

studyspaceone
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
107 views5 pages

DSA CheatSheet by JB - Sheet1

The document outlines various problems and solutions related to number theory, arrays, strings, and linked lists, categorized by concepts such as prime numbers, GCD & LCM, and greedy algorithms. Each problem is linked to its respective coding platform along with the programming language used for the solution. It serves as a comprehensive guide for practicing algorithmic challenges across different topics.

Uploaded by

studyspaceone
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Concept Problem Class/HW Lang Solution

Number Theory
1. Prime Numbers
Py3 Number_Theory/Primilarity_Test/PRB01.py
Primilarity Test https://www.codechef.com/practice/course/logical-problems/DIFF800/problems/PRB01
Class C++ Number_Theory/Primilarity_Test/PRB01.cpp
https://www.spoj.com/problems/TDKPRIME/
Class C++ Number_Theory/Sieve_Of_Eratosthenes/TDKPRIME.cpp
Sieve of Eratosthenes
https://leetcode.com/problems/count-primes
HW Py3 Number_Theory/Sieve_Of_Eratosthenes/Count_primes.py
https://www.spoj.com/problems/PFACT/
HW C++ Number_Theory/Prime_Factors/PFACT.cpp
https://codeforces.com/problemset/problem/17/A
Class Py3 Number_Theory/Prime_Factors/Noldbach.py
Prime factors https://codeforces.com/problemset/problem/26/A
HW C++ Number_Theory/Prime_Factors/Almost_Prime.cpp
Segmented Seivehttps://www.spoj.com/problems/PRIME1/
Class C++ Number_Theory/Segmented_Seive/PRIME1.cpp

2. GCD & LCM


https://leetcode.com/problems/find-greatest-common-divisor-of-array/description/
HW C++ Number_Theory/Eucledian_Algorithm/GCD_array.cpp
Eucledian Algorithm
https://leetcode.com/problems/greatest-common-divisor-of-strings/description/
Class Py3 Number_Theory/Eucledian_Algorithm/GCD_string.py
https://www.geeksforgeeks.org/problems/lcm-of-given-array-elements3919/1
HW C++ Number_Theory/LCM/LCM_array.cpp
LCM https://codeforces.com/problemset/problem/1389/A
HW Py3 Number_Theory/LCM/LCM_Problem.py
C++ Number_Theory/Linear_Diophantine_Equation/CEQU.cpp
https://www.spoj.com/problems/CEQU/
Class Py3 Number_Theory/Linear_Diophantine_Equation/CEQU.py
https://codeforces.com/problemset/problem/530/C
Class Py3 Number_Theory/Linear_Diophantine_Equation/Diophantine.py
Linear Diophantine
https://leetcode.com/problems/check-if-it-is-a-good-array
Equation HW C++ Number_Theory/Linear_Diophantine_Equation/Good_Array.cpp

3. Euler’s Totient Function


https://www.codechef.com/problems/COZIE
Class C++ Number_Theory/Eulers_Totient_Function/COZIE.cpp
https://www.spoj.com/problems/ETF/
Class Py3 Number_Theory/Eulers_Totient_Function/ETF.py
https://www.spoj.com/problems/NAJPWG/
HW C++
Euler's Totient Function
https://www.spoj.com/problems/LCMSUM/
HW

4. Binary Exponentiation
C++ Number_Theory/Binary_Exponentiation/Powxn.cpp
https://leetcode.com/problems/powx-n
Class Py3 Number_Theory/Binary_Exponentiation/Powxn.py
https://leetcode.com/problems/count-good-numbers
HW C++ Number_Theory/Binary_Exponentiation/Cout_Good_Numbers.cpp
C++ Number_Theory/Binary_Exponentiation/Climbing_Stairs.cpp
https://leetcode.com/problems/climbing-stairs
Class Py3 Number_Theory/Binary_Exponentiation/Climbing_Stairs.py
https://leetcode.com/problems/student-attendance-record-ii
HW C++ Number_Theory/Binary_Exponentiation/Attendance_Record_2.cpp
Binary Exponentiation
https://codeforces.com/gym/102644
HW - Codeforces Gym for fast Exponentiation (9 problems)

5. Combinatorics
https://codeforces.com/contest/1279/problem/D
HW
https://codeforces.com/contest/300/problem/C
HW
https://leetcode.com/problems/count-anagrams/
Class Py3 Number_Theory/Combinatorics/Count_Anagrams.py
https://codeforces.com/contest/717/problem/A
HW
Combinatorics https://codeforces.com/contest/1992/problem/G
HW

Arrays, Strings & Linked Lists


6. Arrays
https://leetcode.com/problems/missing-number
Class C++ Arrays_Strings_Linked_Lists/Array_Basics/Missing_Number.cpp
https://leetcode.com/problems/single-number
HW Py3 Arrays_Strings_Linked_Lists/Array_Basics/Single_Number.py
https://leetcode.com/problems/subarray-sum-equals-k/
Class C++ Arrays_Strings_Linked_Lists/Array_Basics/Subarray_Sum_Equals_k.cpp
Py3 Arrays_Strings_Linked_Lists/Array_Basics/Two_Sum.py
https://leetcode.com/problems/two-sum/
Class C++ Arrays_Strings_Linked_Lists/Array_Basics/Two_Sum_p.cpp
https://leetcode.com/problems/3sum
Class C++ Arrays_Strings_Linked_Lists/Array_Basics/Three_Sum.cpp
https://leetcode.com/problems/4sum/
HW Py3 Arrays_Strings_Linked_Lists/Array_Basics/Four_Sum.py
Basics https://codeforces.com/group/yg7WhsFsAp/contest/355490
HW - Codeforces Gym for Basics of Arrays & Strings (9 problems)
https://www.geeksforgeeks.org/problems/segregate-0s-and-1s5106/1
HW C++ Arrays_Strings_Linked_Lists/Dutch_National_Flag_Algorithm/Segregate_0_and_1.cpp
Dutch National Flag
https://leetcode.com/problems/sort-colors
Algorithm Class Py3 Arrays_Strings_Linked_Lists/Dutch_National_Flag_Algorithm/Sort_Colors.py
https://leetcode.com/problems/majority-element
Class C++ Arrays_Strings_Linked_Lists/Moores_Voting_Algorithm/Majority_Element.cpp
Moore's Voting Algorithm
https://leetcode.com/problems/majority-element-ii
HW Py3 Arrays_Strings_Linked_Lists/Moores_Voting_Algorithm/Majority_Element_II.py
https://leetcode.com/problems/sort-array-by-parity
HW C++ Arrays_Strings_Linked_Lists/Sorting/Sort_Array_By_Parity.cpp
https://www.geeksforgeeks.org/problems/sort-in-specific-order2422/1
Class C++ Arrays_Strings_Linked_Lists/Sorting/Sort_In_Specific_Order.cpp
Sorting https://codeforces.com/group/yg7WhsFsAp/contest/355494
HW - Codeforces Gym on Sorting (10 problems)
https://leetcode.com/problems/maximum-subarray
Class Py3 Arrays_Strings_Linked_Lists/Kadanes_Algorithm/Maximum_Subarray.py
Kadane's Algorithm
https://leetcode.com/problems/maximum-product-subarray/
HW Py3 Arrays_Strings_Linked_Lists/Kadanes_Algorithm/Maximum_Product_Subarray.py

7. String Basics
https://leetcode.com/problems/longest-common-prefix
HW Py3 Arrays_Strings_Linked_Lists/String_Basics/Longest_Common_Prefix.py
https://leetcode.com/problems/check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence
HW Py3 Arrays_Strings_Linked_Lists/String_Basics/Is_Prefix_In_Sentence.py
Basics https://leetcode.com/problems/count-prefix-and-suffix-pairs-i
HW
C++ Arrays_Strings_Linked_Lists/Strings_Sliding_Window/Index_Of_First_Occurence.cpp
https://leetcode.com/problems/find-the-index-of-the-first-occurrence-in-a-string
Class Py3 Arrays_Strings_Linked_Lists/Strings_Sliding_Window/Index_Of_First_Occurence.py
https://leetcode.com/problems/rotate-string
Class Py3 Arrays_Strings_Linked_Lists/Strings_Sliding_Window/Rotate_String.py
Sliding Window
Sliding Window https://leetcode.com/problems/string-matching-in-an-array
HW Py3 Arrays_Strings_Linked_Lists/Strings_Sliding_Window/String_Matching_In_Array.py

8. String Hashing
https://leetcode.com/problems/string-matching-in-an-array
HW
Polynomial Hashing
https://leetcode.com/problems/rotate-string
HW
https://acmp.ru/asp/do/index.asp?main=task&id_course=2&id_section=18&id_topic=42&id_problem=262
Class C++ Arrays_Strings_Linked_Lists/Rabin_Karp_Algorithm/Substring_Search_Rabin_Karp.cpp
https://www.spoj.com/problems/NAJPF/
HW
Rabin-Karp Algorithm
https://codeforces.com/problemset/problem/271/D
HW

9. Pattern Searching in Strings


https://www.geeksforgeeks.org/problems/search-pattern0205/1
Class Py3 Arrays_Strings_Linked_Lists/KMP_Algorithm/Substring_Search_KMP.py
https://acmp.ru/asp/do/index.asp?main=task&id_course=2&id_section=18&id_topic=42&id_problem=262
HW
KMP Algorithm https://leetcode.com/problems/longest-happy-prefix
HW
https://www.geeksforgeeks.org/problems/search-pattern-z-algorithm--141631/1
Class C++ Arrays_Strings_Linked_Lists/Z_Algorithm/Substring_Search_Z_Algorithm.cpp
Z Algorithm https://leetcode.com/problems/shortest-palindrome
HW

10. Linked Lists


C++ Arrays_Strings_Linked_Lists/Linked_List_Traversal/PrintLinkedListElements.cpp
https://www.geeksforgeeks.org/problems/print-linked-list-elements/1
Class Py3 Arrays_Strings_Linked_Lists/Linked_List_Traversal/PrintLinkedListElements.py
https://leetcode.com/problems/reverse-linked-list/
Class C++ Arrays_Strings_Linked_Lists/Linked_List_Traversal/ReverseLinkedList.cpp
Traversal https://www.interviewbit.com/problems/palindrome-list/
HW Py3 Arrays_Strings_Linked_Lists/Linked_List_Traversal/LinkedList_Palindrome_Check.py
https://www.hackerrank.com/challenges/insert-a-node-at-the-tail-of-a-linked-list/problem
HW Py3 Arrays_Strings_Linked_Lists/Linked_List_Insertion/LinkedList_InsertAt_End.py
https://www.hackerrank.com/challenges/insert-a-node-at-a-specific-position-in-a-linked-list/problem
Class C++ Arrays_Strings_Linked_Lists/Linked_List_Insertion/InsertNodeAtSpecificPosition.cpp
Insertion https://www.geeksforgeeks.org/problems/insert-in-a-sorted-list/1
HW
https://www.geeksforgeeks.org/problems/search-in-linked-list-1664434326/0
HW
https://www.hackerrank.com/challenges/find-the-merge-point-of-two-joined-linked-lists/problem
Class C++ Arrays_Strings_Linked_Lists/Linked_List_Search/FindMergePointOfTwoLists.cpp
Search https://leetcode.com/problems/intersection-of-two-linked-lists
HW Py3 Arrays_Strings_Linked_Lists/Linked_List_Search/Intersection_of_two_linked_lists.py
https://leetcode.com/problems/linked-list-cycle
HW Py3 Arrays_Strings_Linked_Lists/Linked_List_Loop_Detection/Linked_List_Cycle.py
Loop Detection https://leetcode.com/problems/linked-list-cycle-ii
Class Py3 Arrays_Strings_Linked_Lists/Linked_List_Loop_Detection/Linked_List_Cycle_II.py
https://www.hackerrank.com/challenges/delete-a-node-from-a-linked-list/problem
HW Py3 Arrays_Strings_Linked_Lists/Linked_List_Deletion/Delete_Node_From_Linked_List.py
Deletion https://leetcode.com/problems/remove-nth-node-from-end-of-list/
HW
https://leetcode.com/problems/sort-list/
HW
https://www.interviewbit.com/problems/sort-binary-linked-list/
HW
Sorting https://leetcode.com/problems/merge-two-sorted-lists/
HW
https://www.hackerrank.com/challenges/reverse-a-doubly-linked-list/problem
HW
Doubly Linked Lists
https://leetcode.com/problems/flatten-a-multilevel-doubly-linked-list/
HW

11. Binary & Ternary Search


https://leetcode.com/problems/binary-search/
Class Py3 Arrays_Strings_Linked_Lists/Binary_Search/Binary_Search.py
https://www.geeksforgeeks.org/problems/floor-in-a-sorted-array-1587115620/1
HW Py3 Arrays_Strings_Linked_Lists/Binary_Search/Floor_In_Sorted_Array.py
https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array
HW Py3 Arrays_Strings_Linked_Lists/Binary_Search/First_Last_Position_Sorted_Array.py
C++ Arrays_Strings_Linked_Lists/Binary_Search/Sqrt_x.cpp
https://leetcode.com/problems/sqrtx
Class Py3 Arrays_Strings_Linked_Lists/Binary_Search/Sqrt_x.py
https://www.geeksforgeeks.org/problems/koko-eating-bananas/1
Class Py3 Arrays_Strings_Linked_Lists/Binary_Search/Koko_Eating_Bananas.py
https://leetcode.com/problems/find-the-smallest-divisor-given-a-threshold
Class Py3 Arrays_Strings_Linked_Lists/Binary_Search/Smallest_Divisor_Given_Threshold.py
https://codeforces.com/problemset/problem/1985/F
HW
https://codeforces.com/problemset/problem/231/C
HW
https://www.geeksforgeeks.org/problems/minimum-days-to-make-m-bouquets/1
Class C++ Arrays_Strings_Linked_Lists/Binary_Search/Minimum_Days_To_Make_M_Bouquets.cpp
https://leetcode.com/problems/shortest-subarray-with-sum-at-least-k
HW
Binary Search https://codeforces.com/contest/1486/problem/D
HW
https://codeforces.com/problemset/problem/1978/B
Class C++ Arrays_Strings_Linked_Lists/Ternary_Search/New_Bakery.cpp
https://www.codechef.com/problems/AMCS03
HW
https://www.hackerearth.com/problem/algorithm/rescuer-2d2495cb/
HW
Ternary Search https://www.spoj.com/problems/KOPC12A/
HW

12. Greedy Algorithms


https://leetcode.com/problems/maximum-units-on-a-truck/
HW
https://leetcode.com/problems/minimum-number-of-arrows-to-burst-balloons/
Class C++ Arrays_Strings_Linked_Lists/Standard_Greedy_Algorithms/Min_Arrows_Burst_Balloons.cpp
https://www.geeksforgeeks.org/problems/huffman-encoding3345/1
HW
https://www.geeksforgeeks.org/problems/huffman-decoding/1
HW
https://www.geeksforgeeks.org/problems/job-sequencing-problem-1587115620/1
Class C++ Arrays_Strings_Linked_Lists/Standard_Greedy_Algorithms/Job_Sequencing_Problem.cpp
https://www.geeksforgeeks.org/problems/water-connection-problem5822/1
HW
Standard Greedy https://leetcode.com/problems/minimized-maximum-of-products-distributed-to-any-store/
Algorithms HW
https://leetcode.com/problems/assign-cookies/
HW
https://www.geeksforgeeks.org/problems/minimum-element-whose-n-th-power-is-greater-than-product-of-an-array4640/1
HW
C++ Arrays_Strings_Linked_Lists/Greedy_Problems_Arrays/Maximize_Sum_K_Negations.cpp
https://leetcode.com/problems/maximize-sum-of-array-after-k-negations/
Class Py3 Arrays_Strings_Linked_Lists/Greedy_Problems_Arrays/Maximize_Sum_K_Negations.py
https://leetcode.com/problems/jump-game/
HW
https://leetcode.com/problems/jump-game-ii/
HW
https://leetcode.com/problems/single-threaded-cpu/
HW
https://leetcode.com/problems/candy/
Class Py3 Arrays_Strings_Linked_Lists/Greedy_Problems_Arrays/Candy.py
Greedy Problems on Arrays
Greedy Problemshttps://www.geeksforgeeks.org/problems/partition-a-set-into-two-subsets-such-that-the-difference-of-subset-sums-is-minimum-set-2/1
on Arrays HW
https://leetcode.com/problems/generate-parentheses/
HW
Greedy Problemshttps://leetcode.com/problems/largest-number/
on Strings Class Py3 Arrays_Strings_Linked_Lists/Greedy_Problems_Strings/Largest_Number.py

Stack, Queues, Priority Queues & Heaps


13. Stacks
https://leetcode.com/problems/next-greater-element-i/
Class Py3 Stacks_Queues_PQ_Heaps/Stacks/Next_Greater_Element_I.py
https://leetcode.com/problems/next-greater-element-ii/
HW Py3 Stacks_Queues_PQ_Heaps/Stacks/Next_Greater_Element_II.py
https://www.hackerearth.com/practice/data-structures/stacks/basics-of-stacks/practice-problems/algorithm/killer-monsters-0b5cb283/
HW
https://leetcode.com/problems/valid-parentheses/
Class C++ Stacks_Queues_PQ_Heaps/Stacks/Valid_Parentheses.cpp
https://leetcode.com/problems/check-if-a-parentheses-string-can-be-valid/
HW
https://leetcode.com/problems/longest-valid-parentheses/
HW
https://www.hackerearth.com/practice/data-structures/stacks/basics-of-stacks/practice-problems/algorithm/mancunian-and-fantabulous-pairs/
HW
C++ Stacks_Queues_PQ_Heaps/Stacks/Largest_Rectangle_in_Histogram.cpp
https://leetcode.com/problems/largest-rectangle-in-histogram/
Class Py3 Stacks_Queues_PQ_Heaps/Stacks/Largest_Rectangle_in_Histogram.py
https://leetcode.com/problems/trapping-rain-water/
HW
https://www.geeksforgeeks.org/problems/stock-span-problem-1587115621/1
HW
https://www.geeksforgeeks.org/problems/restrictive-candy-crush--141631/1
Class C++ Stacks_Queues_PQ_Heaps/Stacks/Restrictive_Candy_Crush.cpp
Stacks https://leetcode.com/problems/basic-calculator-iv/
HW

14. Queues
https://leetcode.com/problems/implement-queue-using-stacks/
Class C++ Stacks_Queues_PQ_Heaps/Queues/Queue_Using_Stacks.cpp
https://leetcode.com/problems/implement-stack-using-queues/
HW
https://leetcode.com/problems/first-unique-character-in-a-string/
Class Py3 Stacks_Queues_PQ_Heaps/Queues/First_Unique_Character_String.py
https://www.geeksforgeeks.org/problems/reverse-first-k-elements-of-queue/1
HW
https://www.geeksforgeeks.org/problems/restricted-pacman--141631/1
HW
Queues https://leetcode.com/problems/lru-cache/
HW
https://www.geeksforgeeks.org/problems/first-negative-integer-in-every-window-of-size-k3345/1
Class C++ Stacks_Queues_PQ_Heaps/Deque/First_Negative_In_Every_Window_Size_K.cpp
https://www.geeksforgeeks.org/problems/ipl-2021-match-day-2--141634/1
HW
Deque https://leetcode.com/problems/design-circular-deque/
HW

15. Priority Queue & Heaps


https://leetcode.com/problems/sort-an-array/
Class C++ Stacks_Queues_PQ_Heaps/Heaps_and_Heap_Sort/Sort_Array.cpp
https://www.geeksforgeeks.org/problems/height-of-heap5025/1
HW
Heaps and Heap https://www.geeksforgeeks.org/problems/operations-on-binary-min-heap/1
Sort HW
https://leetcode.com/problems/kth-largest-element-in-a-stream/
Class C++ Stacks_Queues_PQ_Heaps/Heap_Applications/Kth_Largest_Stream.cpp
https://leetcode.com/problems/last-stone-weight/
HW
https://leetcode.com/problems/ugly-number-ii/
HW
https://leetcode.com/problems/top-k-frequent-elements/
Class C++ Stacks_Queues_PQ_Heaps/Heap_Applications/Top_K_Frequent_Elements.cpp
https://leetcode.com/problems/task-scheduler/
HW
Heap Applicationshttps://leetcode.com/problems/remove-stones-to-minimize-the-total/
HW
https://leetcode.com/problems/find-median-from-data-stream/
Class C++ Stacks_Queues_PQ_Heaps/Advanced_Heap_Problems/Median_Data_Stream.cpp
https://leetcode.com/problems/merge-k-sorted-lists
HW
https://leetcode.com/problems/sliding-window-maximum/
HW
Advanced Heap Problems
https://leetcode.com/problems/the-skyline-problem/
HW

Trees & Graphs


16. Trees & Binary Search Trees
Class C++ Trees_and_Graphs/Tree_Representation/Binary_Tree_Representation.cpp
Tree Representation
https://www.geeksforgeeks.org/problems/binary-tree-representation/1
Class Py3 Trees_and_Graphs/Tree_Representation/Binary_Tree_Representation.py
https://leetcode.com/problems/binary-tree-preorder-traversal/
HW
https://leetcode.com/problems/binary-tree-inorder-traversal/
HW
https://leetcode.com/problems/maximum-depth-of-binary-tree/
HW
https://leetcode.com/problems/diameter-of-binary-tree/
HW
https://leetcode.com/problems/n-ary-tree-level-order-traversal/
Class C++ Trees_and_Graphs/Tree_Traversal/N_Ary_Tree_Level_Order_Traversal.cpp
https://www.geeksforgeeks.org/problems/boundary-traversal-of-binary-tree/1
HW
https://leetcode.com/problems/binary-tree-right-side-view/
Class C++ Trees_and_Graphs/Tree_Traversal/Binary_Tree_Right_Side_View.cpp
https://www.geeksforgeeks.org/problems/bottom-view-of-binary-tree/1
HW
https://leetcode.com/problems/maximum-width-of-binary-tree/
HW
https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/
Class Py3 Trees_and_Graphs/Tree_Traversal/LCA_Binary_Tree.py
Tree Traversal https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/
HW
https://codeforces.com/problemset/gymProblem/102452/B
HW
https://leetcode.com/problems/binary-tree-cameras/
HW
https://codeforces.com/contest/1004/problem/E
Class C++ Trees_and_Graphs/Tree_Applications/Sonya_Ice_Cream.cpp
https://www.codechef.com/APRIL14/problems/FBCHEF
HW
Tree Applications https://codeforces.com/contest/633/problem/F
HW
https://leetcode.com/problems/search-in-a-binary-search-tree/
Class C++ Trees_and_Graphs/Binary_Search_Trees/Search_Binary_Search_Tree.cpp
https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/
HW
https://leetcode.com/problems/unique-binary-search-trees-ii/
HW
https://leetcode.com/problems/construct-binary-search-tree-from-preorder-traversal/
HW
https://leetcode.com/problems/maximum-sum-bst-in-binary-tree/
Class Py3 Trees_and_Graphs/Binary_Search_Trees/Maximum_Sum_BST_In_Binary_Tree.py

Binary Search Trees


https://leetcode.com/problems/merge-bsts-to-create-single-bst/
HW
Binary Search Trees
https://leetcode.com/problems/number-of-ways-to-reorder-array-to-get-same-bst/
HW
https://leetcode.com/problems/balanced-binary-tree/
Class Py3 Trees_and_Graphs/Balanced_Trees/Balanced_Binary_Tree.py
https://leetcode.com/problems/balance-a-binary-search-tree/
HW
https://www.geeksforgeeks.org/problems/avl-tree-insertion/1
Class C++ Trees_and_Graphs/Balanced_Trees/AVL_Tree_Insertion.cpp
https://www.geeksforgeeks.org/problems/avl-tree-deletion/1
HW
Balanced Trees https://leetcode.com/problems/count-of-range-sum/
HW

17. Graphs
Class C++ Trees_and_Graphs/Graph_Representation/Print_Adjacency_List.cpp
Graph Representation
https://www.geeksforgeeks.org/problems/print-adjacency-list-1587115620/1
Class Py3 Trees_and_Graphs/Graph_Representation/Print_Adjacency_List.py
https://www.geeksforgeeks.org/problems/depth-first-traversal-for-a-graph/1
HW
https://www.geeksforgeeks.org/problems/bfs-traversal-of-graph/1
Class C++ Trees_and_Graphs/Graph_Traversal/BFS_Of_Graph.cpp
https://leetcode.com/problems/number-of-provinces/
HW
https://leetcode.com/problems/count-the-number-of-complete-components/
HW
https://www.geeksforgeeks.org/problems/depth-first-traversal-for-a-graph/1
Class C++ Trees_and_Graphs/Graph_Traversal/DFS_Of_Graph.cpp
https://leetcode.com/problems/course-schedule-ii/
HW
http://codeforces.com/contest/734/problem/E
HW
https://leetcode.com/problems/flood-fill/
Class Py3 Trees_and_Graphs/Graph_Traversal/Flood_Fill.py
http://codeforces.com/contest/813/problem/C
HW
https://leetcode.com/problems/word-ladder-ii/
HW
Graph Traversal https://www.spoj.com/problems/INVESORT/
HW
Class C++ Trees_and_Graphs/Disjoint_Sets/Union_Find_By_Rank.cpp
https://www.geeksforgeeks.org/problems/union-find/1
HW (Union by size)
https://leetcode.com/problems/redundant-connection/
Class Py3 Trees_and_Graphs/Disjoint_Sets/Redundant_Connection.py
https://www.geeksforgeeks.org/problems/detect-cycle-in-an-undirected-graph/1
HW
https://www.geeksforgeeks.org/problems/minimum-spanning-tree/1
Class C++ Trees_and_Graphs/Disjoint_Sets/Minimum_Spanning_Tree_Kruskals.cpp
https://leetcode.com/problems/number-of-islands/
HW
Disjoint Sets https://leetcode.com/problems/groups-of-strings/
HW
https://www.geeksforgeeks.org/problems/minimum-spanning-tree/1
Class C++ Trees_and_Graphs/Minimum_Spanning_Trees/Minimum_Spanning_Tree_Prims.cpp
https://leetcode.com/problems/min-cost-to-connect-all-points/
HW
https://codeforces.com/contest/1245/problem/D
Class C++ Trees_and_Graphs/Minimum_Spanning_Trees/Shichikuji_And_Power_Grid.cpp
https://www.hackerearth.com/practice/algorithms/graphs/minimum-spanning-tree/practice-problems/algorithm/complete-journey-bf38d697/
HW
https://www.hackerearth.com/practice/algorithms/graphs/minimum-spanning-tree/practice-problems/algorithm/grid-of-many-xors-de84b766/
HW
Minimum Spanning
https://leetcode.com/problems/find-critical-and-pseudo-critical-edges-in-minimum-spanning-tree/
Trees HW
C++ Trees_and_Graphs/Topological_Sorting/Topological_Sort_DFS.cpp
https://www.geeksforgeeks.org/problems/topological-sort/1
Class Py3 Trees_and_Graphs/Topological_Sorting/Topological_Sort_Kahns.py
https://codeforces.com/problemset/problem/510/C
HW
https://leetcode.com/problems/course-schedule/
HW
https://leetcode.com/problems/course-schedule-ii/
HW
https://www.hackerrank.com/contests/101hack40/challenges/next-topological-sorting
HW
Topological Sorting
https://cses.fi/problemset/task/1681
HW
https://www.geeksforgeeks.org/problems/shortest-path-in-undirected-graph-having-unit-distance/1
Class C++ Trees_and_Graphs/Shortest_Path/Undirected_Unweighted_Graph_BFS.cpp
https://www.geeksforgeeks.org/problems/shortest-path-in-undirected-graph/1
HW
https://www.geeksforgeeks.org/problems/shortest-path-in-weighted-undirected-graph/1?utm_source=youtube&utm_medium=collab_striver_ytdescription&utm_campaign=shorte
HW
https://codeforces.com/contest/20/problem/C
HW
https://www.geeksforgeeks.org/problems/implementing-dijkstra-set-1-adjacency-matrix/1
Class C++ Trees_and_Graphs/Shortest_Path/Weighted_Graph_Dijkstra.cpp
https://leetcode.com/problems/evaluate-division/
HW
https://leetcode.com/problems/network-delay-time/
HW
https://leetcode.com/problems/cheapest-flights-within-k-stops/
HW
https://www.geeksforgeeks.org/problems/distance-from-the-source-bellman-ford-algorithm/1
Class Py3 Trees_and_Graphs/Shortest_Path/Bellman_Ford.py
https://leetcode.com/problems/design-graph-with-shortest-path-calculator/
HW
https://leetcode.com/problems/find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance/
HW
https://leetcode.com/problems/number-of-ways-to-arrive-at-destination/
Class Py3 Trees_and_Graphs/Shortest_Path/Number_Ways_Arrive_At_Destination.py
Shortest Path https://codeforces.com/problemset/problem/141/D
HW

Dynamic Programming
18. DP on Arrays & Matrices
https://leetcode.com/problems/fibonacci-number/
HW
Py3 Dynamic_Programming/Standard_Array_Matrix_DP/Longest_Increasing_Subssequence.py
https://leetcode.com/problems/longest-increasing-subsequence/
Class C++ Dynamic_Programming/Standard_Array_Matrix_DP/Longest_Increasing_Subssequence.cpp
https://leetcode.com/problems/minimum-cost-to-cut-a-stick/
HW
https://www.geeksforgeeks.org/problems/0-1-knapsack-problem0945/1
HW
https://www.geeksforgeeks.org/problems/subset-sum-problem-1611555638/1
HW
https://www.hackerrank.com/challenges/coin-change/problem
Class Py3 Dynamic_Programming/Standard_Array_Matrix_DP/Coin_Change_Problem.py
Standard Array & https://www.geeksforgeeks.org/problems/matrix-chain-multiplication0303/1
Matrix DP Problems
HW
https://leetcode.com/problems/climbing-stairs/
HW
https://leetcode.com/problems/coin-change
HW
https://www.geeksforgeeks.org/problems/minimal-cost/1
Class C++ Dynamic_Programming/Array_DP/Minimal_Cost.cpp
https://www.hackerrank.com/challenges/two-robots/
HW
C++ Dynamic_Programming/Array_DP/House_Robber.cpp
https://leetcode.com/problems/house-robber/
Class

Array DP
https://leetcode.com/problems/house-robber/
Class Py3 Dynamic_Programming/Array_DP/House_Robber.py
https://leetcode.com/problems/house-robber-ii/
HW
Array DP https://codeforces.com/problemset/problem/1061/C
HW
https://leetcode.com/problems/unique-paths/
HW
https://leetcode.com/problems/unique-paths-ii/
Class C++ Dynamic_Programming/Matrix_DP/Unique_Paths_II.cpp
https://leetcode.com/problems/minimum-path-sum/
HW
https://leetcode.com/problems/minimum-falling-path-sum
HW
https://www.geeksforgeeks.org/problems/chocolates-pickup/1
Class C++ Dynamic_Programming/Matrix_DP/Chocolates_Pickup.cpp
https://www.hackerrank.com/challenges/queens-on-board/
HW
Matrix DP https://www.hackerrank.com/challenges/matrix-land/
HW

19. DP on Strings
https://leetcode.com/problems/longest-common-subsequence/
HW
https://www.geeksforgeeks.org/problems/print-all-lcs-sequences3413/1
HW
https://leetcode.com/problems/edit-distance/
HW
Standard String DP
https://www.geeksforgeeks.org/problems/palindromic-patitioning4845/1
Problems Class Py3 Dynamic_Programming/Standard_String_DP/Palindromic_Partitioning.cpp
https://www.geeksforgeeks.org/problems/longest-common-substring1452/1
HW
https://leetcode.com/problems/minimum-insertion-steps-to-make-a-string-palindrome/
HW
Class Py3 Dynamic_Programming/String_DP/Sam_And_Substrings.py
https://www.hackerrank.com/challenges/sam-and-substrings/
Class C++ Dynamic_Programming/String_DP/Sam_And_Substrings.cpp
https://codeforces.com/problemset/problem/766/C
HW
https://leetcode.com/problems/distinct-subsequences/
HW
https://leetcode.com/problems/shortest-common-supersequence/
Class C++ Dynamic_Programming/String_DP/Shortest_Common_Supersequence.cpp
https://www.hackerrank.com/challenges/alien-languages/
HW
https://leetcode.com/problems/wildcard-matching/
Class C++ Dynamic_Programming/String_DP/Wildcard_Matching.cpp
https://atcoder.jp/contests/abc122/tasks/abc122_d
HW
String DP https://codeforces.com/problemset/problem/977/F
HW

20. DP on Trees & Graphs


https://www.geeksforgeeks.org/problems/shortest-path-in-undirected-graph/1
HW
https://www.geeksforgeeks.org/problems/distance-from-the-source-bellman-ford-algorithm/1
HW
https://www.geeksforgeeks.org/problems/implementing-floyd-warshall2042/1
Class C++ Dynamic_Programming/Standard_Trees_Graphs_DP/Floyd_Warshall.cpp
Standard Tree & Graph
https://www.geeksforgeeks.org/problems/travelling-salesman-problem2732/1
DP Problems
HW
https://leetcode.com/problems/minimum-time-to-collect-all-apples-in-a-tree/
HW
https://www.geeksforgeeks.org/problems/diagonal-traversal-of-binary-tree/1
HW
https://leetcode.com/problems/minimum-height-trees/
HW
https://leetcode.com/problems/sum-of-distances-in-tree/
Class C++ Dynamic_Programming/Tree_DP/Sum_Of_Distances_In_Tree.cpp
Tree DP https://codeforces.com/contest/161/problem/D
HW
https://www.hackerrank.com/contests/algorithms-2/challenges/a-simple-dp
HW
https://leetcode.com/problems/largest-color-value-in-a-directed-graph/
Class Py3 Dynamic_Programming/Graph_DP/Largest_Color_Value_Directed_Graph.py
https://leetcode.com/problems/count-ways-to-build-rooms-in-an-ant-colony/
HW
https://leetcode.com/problems/cat-and-mouse/
Class Py3 Dynamic_Programming/Graph_DP/Cat_And_Mouse.py
https://leetcode.com/problems/cat-and-mouse-ii/
HW
https://codeforces.com/problemset/problem/1369/D
HW
Graph DP https://codeforces.com/problemset/problem/855/C
HW

You might also like