In this tutorial we shall solve a very famous problem “House Robber” problem. This problem can be solved by using DP method. Problem Statement: You are given an array of +ve numbers that represents amount present inside the house, you need to rob the house such …
This is a variant of the previous problem. Like previous coin change problem, we shall solve with help of Dynamic Programming. Problem Statement: You are given total amount and certain coin denomination. You need to get the total number of ways you make the change. …
Introduction: Kadane Algorithm is an efficient way to solve the maximum sub array problem. Explanation: So before we know about Kadane algorithm, first we shall look at that is the maximum sub array problem? You will be given with an array, you need to find the …