Coin Change II – LeetCode Solution [Medium] You are given an integer array coins representing coins and an integer amount. Return the number of combinations that make up that amount. Arrays, Competitive Programming, Dynamic Programming
Coin Change – LeetCode Solution [Medium] You are given an integer vector coins[n] representing coins of different denominations and an integer amount representing a total amount of money. Arrays, Competitive Programming, Dynamic Programming
Floyd-Warshall Algorithm Implementation | All pairs shortest path Floyd-Warshall algorithm helps in finding the shortest path between all pairs of vertices in a graph. Algorithms, Dynamic Programming, Graphs
Lucy and Flowers | HackerRank Solution [Medium] The number of possible Binary Search Trees with n keys is Catalan Number (Cn). You could learn about Catalan Number & Binomial Coefficient. Competitive Programming, Dynamic Programming, Mathematics
Program for Nth Catalan Number Catalan numbers (Cn) are a sequence of natural numbers. Nth Catalan number has applications in many counting problems. Competitive Programming, Dynamic Programming, Mathematics
How to calculate Binomial Coefficient (nCr) in O(r) time complexity The recomputations in calculating binomial coefficient (nCr) can be avoided by exploiting optimal substructure and overlapping subproblems Competitive Programming, Dynamic Programming, Mathematics
nCr table | HackerRank Solution [Medium] Jim is doing his discrete maths homework which requires him to repeatedly calculate nCr(n choose r) for different values of n Dynamic Programming, Mathematics
Common Child | Algorithms | HackerRank Solution [Medium] Given two strings p and q of equal length, what’s the longest string that can be constructed such that it is a child of both? Dynamic Programming
Substring Diff | HackerRank (Algorithms) | Longest Common Substring Given two strings and an integer, determine the length of the longest common substrings of the two strings that differ in no more than k positions. Competitive Programming, Dynamic Programming
Fibonacci Numbers Solution (O(1) auxiliary space) To find the nth fibonacci number, we need not store previous Fibonacci numbers in an array. We could use two temporary variables instead of an array to store previous fibonacci numbers Dynamic Programming, Mathematics