Showing posts with label Java_DynamicProgramming_coding_Question. Show all posts
Showing posts with label Java_DynamicProgramming_coding_Question. Show all posts

May 5, 2022

Question 96 : Minimum Number of Jumps to reach last Index

 Problem

Given an array A of positive integers possibly zeroes, every index indicating the maximum length of a jump that can be made from this index. The length of a jump can vary from 1 to A[index].4

Question 95: Coin Change Problem in java

Given an Amount to be paid and the currencies to pay with. There is infinite supply of every currency using combination of which, the given amount is to be paid.
Print the number of ways by which the amount can be paid.

Question 94 : Edit Distance Problem

Given two strings string1 and string2, String1 is to be converted into String2 with the given operations available in the minimum number of steps. Using any one of the given operations contributes to the increment of steps by one.

Allowed Operations are :
(i) Remove : This operation allows the Removal any one character from String.
(ii) Insert : This operation allows the Insertion of one character at any spot in the String.
(iii) Replace : This operation allows the replacement of any one character in the string with any other character.

Input: bacbbd cabddb
Output: 4

Question 93 : Given a matrix, we need to count all paths from top left to bottom right of MxN matrix. You can either move down or right.

In this post, we will see about how to count all paths from top left to bottom right of MxN matrix.

Question 92 : Given two Strings A and B. Find the length of the Longest Common Subsequence (LCS) of the given Strings

Given two Strings A and B. Find the length of the Longest Common Subsequence (LCS) of the given Strings.

Subsequence can contain any number of characters of a string including zero or all (subsequence containing zero characters is called as empty subsequence). 

Characters need not to be contiguous but must maintain the relative order as in the given String. We need to find the maximum length of this subsequence which has characters common to both the given  Strings.
INPUT : A : JAVABLOG B : ABLGOUTPUT

May 3, 2022

Question 91 : Given two String, find longest common substring

 

You may also like

Kubernetes Microservices
Python AI/ML
Spring Framework Spring Boot
Core Java Java Coding Question
Maven AWS