DFS Dynamic Programming SPOJ RPLA - Answer the boss! - SPOJ Solution C++ May 14, 2021 Add Comment ➤ Problem Link : RPLA 👉 Hint : 1D DP ✅ C++ Solution : #include<bits/stdc++.h> using namespace std; vector<int> adj[100... Read More
Bitmasks Dynamic Programming SPOJ GNY07H - Tiling a Grid With Dominoes - SPOJ Solution C++ May 13, 2021 Add Comment ➤ Problem Link : GNY07H 👉 Hint : Simple 2D DP ✅ C++ Solution : #include<bits/stdc++.h> using namespace std; #define ll long l... Read More
Dynamic Programming SPOJ MIXTURES - Mixtures - SPOJ Solution C++ May 12, 2021 Add Comment ➤ Problem Link : MIXTURES 👉 Hint : Simple DP ✅ C++ Solution : #include<bits/stdc++.h> using namespace std; int arr[101]; int... Read More
Dynamic Programming Greedy SPOJ MBEEWALK - Bee Walk - SPOJ Solution C++ May 08, 2021 Add Comment ➤ Problem Link : MBEEWALK 👉 Hint : Use unordered map ✅ C++ Solution : #include<bits/stdc++.h> using namespace std; #define l... Read More
Dynamic Programming SPOJ ANARC05H - Chop Ahoy! Revisited! - SPOJ Solution C++ May 06, 2021 Add Comment ➤ Problem Link : ANARC05H 👉 Hint : Simple 2D DP ✅ C++ Solution : #include<bits/stdc++.h> using namespace std; #define ll long... Read More
Dynamic Programming SPOJ MAXWOODS - MAXIMUM WOOD CUTTER - SPOJ Solution C++ May 05, 2021 Add Comment ➤ Problem Link : MAXWOODS 👉 Hint : Use 2D or 3D DP ✅ C++ Solution : #include<bits/stdc++.h> using namespace std; int dp[201][... Read More
Binary Search Dynamic Programming SPOJ ANARC05B - The Double HeLiX - SPOJ Solution C++ May 03, 2021 Add Comment ➤ Problem Link : ANARC05B 👉 Hint : Binary search with cumulative array ✅ C++ Solution : #include<bits/stdc++.h> using namesp... Read More
Dynamic Programming SPOJ BYTESM2 - Philosophers Stone - SPOJ Solution C++ May 03, 2021 Add Comment ➤ Problem Link : BYTESM2 👉 Hint : Simple 2D DP ✅ C++ Solution : #include<bits/stdc++.h> using namespace std; int dp[101][101... Read More
Dynamic Programming Greedy SPOJ TWENDS - Two Ends -SPOJ Solution C++ May 02, 2021 Add Comment ➤ Problem Link : TWENDS 👉 Hint : Use DP and Greedy approach ✅ C++ Solution : #include<bits/stdc++.h> using namespace std; in... Read More