# dynamic programming

## Jump Game II LeetCode Solution

You are given a 0-indexed array of integers nums of length n. You are initially positioned at nums. Each element nums[i] represents the maximum length of a forward jump from index i. In other words, if you are at nums[i], you can jump to any nums[i + j] where: 0 <= j <= nums[i] and i + j < n. Return the minimum number of jumps to reach nums[n - 1].

## Wildcard Matching LeetCode Solution

Given an input string (s) and a pattern (p), implement wildcard pattern matching with support for ‘?’ and ‘*’ where: ‘?’ Matches any single character.’*’ Matches any sequence of characters (including the empty sequence).The matching should cover the entire input string.

## Trapping Rain Water LeetCode Solution

Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after raining.

## Longest Valid Parentheses LeetCode Solution

Given a string containing just the characters ‘(‘ and ‘)’, return the length of the longest valid (well-formed) parentheses substring.

## Climbing Stairs LeetCode Solution

You are climbing a staircase. It takes n steps to reach the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?

## Regular Expression Matching LeetCode Solution

Given an input string s and a pattern p, implement regular expression matching with support for ‘.’ and ‘*’ where ‘.’ Matches any single character and ‘*’ Matches zero or more of the preceding element.

## House Robber LeetCode Solution

Given an integer array nums representing the amount of money of each house, return the maximum amount of money you can rob tonight without alerting the police.

## Maximal Square LeetCode Solution

Given an m x n binary matrix filled with 0’s and 1’s, find the largest square containing only 1’s and return its area.

## Longest Palindromic Substring LeetCode Solution

Given a string s, return the longest palindromic substring in s. A palindrome is a string which reads the same in both directions. For example, S = “aba” is a palindrome, S = “abc” is not.

## Dynamic Programming

Here, We will discuss about Dynamic Programming, their strategy, properties and approaches like memoization and tabulation and their applications. What is Dynamic Programming? Dynamic Programming is a powerful technique to solve a complicated problem by breaking it down into simpler subproblems. The idea of dynamic programming is to avoid making redundant method calls. In Divide …

Scroll to Top