## Java Program for Cutting a Rod | DP-13

Given a rod of length n inches and an array of prices that contains prices of all pieces of size smaller than n. Determine the… Read More »

- How to create a COVID-19 Tracker Android App
- Kth most frequent Character in a given String
- How to find duplicate elements in a Stream in Java
- Factory method design pattern in Java
- Java program to print Even length words in a String
- How to generate and read QR code with Java using ZXing Library
- How to Left or Right rotate an Array in Java
- Program to find absolute value of a given number
- Atomic Variables in Java with Examples
- Java Program to Add two Matrices
- How to validate identifier using Regular Expression in Java
- How to validate a Password using Regular Expressions in Java
- GUI Application for the Student Management System
- Bloom Filter in Java with Examples
- Pizza Shop Billing System using Java Swing
- Java Program to Multiply two Matrices of any size
- JDBC Using Model Object and Singleton Class
- Menu-Driven program to implement Travel Agency
- Extends vs Implements in Java
- Convert camel case string to snake case in Java
- How to check if string contains only digits in Java
- Escape Sequences in Java
- How to remove all non-alphanumeric characters from a string in Java
- Remove first and last character of a string in Java
- How to create a basic application in Java Spring Boot
- Fermat's Factorization method for large numbers
- Program to Convert Octal to Hexadecimal
- How to convert a string to boolean in Java
- How to find the first and last character of a string in Java
- Output of Java Programs | Set 55 (Java Collections Framework)

Given a rod of length n inches and an array of prices that contains prices of all pieces of size smaller than n. Determine the… Read More »

Given a sequence, find the length of the longest palindromic subsequence in it. As another example, if the given sequence is “BBABCBCAB”, then the output… Read More »

The following is a description of the instance of this famous puzzle involving n=2 eggs and a building with k=36 floors. Suppose that we wish… Read More »

Given a directed graph, check whether the graph contains a cycle or not. Your function should return true if the given graph contains at least… Read More »

You are given n activities with their start and finish times. Select the maximum number of activities that can be performed by a single person,… Read More »

Recursive Solution filter_none edit close play_arrow link brightness_4 code /* A Naive recursive implementation of 0-1 Knapsack problem */ class Knapsack { // A… Read More »

Given a sequence of matrices, find the most efficient way to multiply these matrices together. The problem is not actually to perform the multiplications, but… Read More »

Given a value N, if we want to make change for N cents, and we have infinite supply of each of S = { S1,… Read More »

Given an array of integers where each element represents the max number of steps that can be made forward from that element. Write a function… Read More »

Given a cost matrix cost[][] and a position (m, n) in cost[][], write a function that returns cost of minimum cost path to reach (m,… Read More »

The N Queen is the problem of placing N chess queens on an N×N chessboard so that no two queens attack each other. For example,… Read More »

We have discussed Backtracking and Knight’s tour problem in Set 1. Let us discuss Rat in a Maze as another example problem that can be… Read More »

LCS Problem Statement: Given two sequences, find the length of longest subsequence present in both of them. A subsequence is a sequence that appears in… Read More »

The Longest Increasing Subsequence (LIS) problem is to find the length of the longest subsequence of a given sequence such that all elements of the… Read More »

Given a text txt[0..n-1] and a pattern pat[0..m-1], write a function search(char pat[], char txt[]) that prints all occurrences of pat[] in txt[]. You may… Read More »