# Category Archives: Java Programs

Given a numeric string S, the task is to find the maximum length of a subsequence having its left rotation equal to its right rotation.… Read More
Given an array of integers, you have to find three numbers such that the sum of two elements equals the third element.Examples: Input: {5, 32,… Read More
Two pointers is really an easy and effective technique which is typically used for searching pairs in a sorted array.Given a sorted array A (sorted… Read More
An array consisting of N integers is given. There are several Right Circular Rotations of range[L..R] that we perform. After performing these rotations, we need… Read More
In mathematics, a square matrix is said to be diagonally dominant if for every row of the matrix, the magnitude of the diagonal entry in… Read More
Given an array arr[] of N distinct elements, the task is to check if it is possible to make the array increasing or decreasing by… Read More
Given an array of size N, the task is to determine whether its possible to sort the array or not by just one shuffle. In… Read More
Given an array of sorted integers. We need to find the closest value to the given number. Array may contain duplicate values and negative numbers. … Read More
Given an array arr[], count number of pairs arr[i], arr[j] such that arr[i] + arr[j] is maximum and i < j. Example : Input :… Read More
Given a numeric string target of length N and a set of numeric strings blocked, each of length N, the task is to find the… Read More
Given an array arr[] of size N (consisting of duplicates), the task is to check if the given array can be converted to a non-decreasing… Read More
Given a number N, the task is to count all the rotations of the given number which are divisible by 10.Examples:   Input: N = 10203 Output:… Read More
Given an array of N distinct integers. The task is to write a program to check if this array is sorted and rotated counter-clockwise. A… Read More
Given two integer arrays arr1[] and arr2[] sorted in ascending order and an integer k. Find k pairs with smallest sums such that one element… Read More
Given a Linked List of length n and block length k rotate in a circular manner towards right/left each block by a number d. If… Read More