Given a binary string S consisting of N characters, the task is to print the minimum number of operations required to remove all the characters… Read More

Given a number N, the task is to check if for every value of i (0 <= i <= len), the first i digits of… Read More

Given a numeric string S, the task is to find the number of ways to partition a string into substrings consisting of digits in increasing… Read More

Given an array A[] of size N, the task is to find the maximum sum of a subsequence such that for each pair present in… Read More

Given a positive integer N, the task is to construct a permutation of first N natural numbers such that the absolute difference between adjacent elements… Read More

Given an integer K and an array arr[] consisting of N integers, where an array element arr[i] represents the price of the ith book. Profit… Read More

Given an array of pairs A[][] of size N, the task is to find the longest subsequences where the first element is increasing and the… Read More

Given an array arr[] consisting of N positive integers, the task is to find the number of array elements whose highest power of 2 less… Read More

Given a string S consisting of N characters, the task is to print all palindromic strings of length 3 in lexicographical order that can be… Read More

Given an array arr[] consisting of N integers, the task is to find the largest number K (> 0) such that both the values K… Read More

Given a string S consisting of N lowercase characters, the task is to find the length of the longest substring consisting of an even number… Read More

Here we will be discussing out how we can, we improve the performance while using HashMap in Java, the Importance of the hashCode() contract and… Read More

Given an array arr[] consisting of N integers, the task is to repeatedly remove elements that are smaller than the next element. Examples: Input: arr[]… Read More

Given two strings X and Y consisting of N and M characters, the task is to find the longest subsequence of a string X which… Read More

Given four integers N, M, A, and B, the task is to print all numbers ( in increasing order ) that can be obtained by… Read More