# Category Archives: Java Programs

Given a matrix and the task is to check matrix is involutory matrix or not. Involutory Matrix: A matrix is said to be involutory matrix if… Read More
Given a linked list and two positions ‘m’ and ‘n’. The task is to rotate the sublist from position m to n, to the right… Read More
Given a N * N matrix and the task is to check matrix is idempotent matrix or not.Idempotent matrix: A matrix is said to be… Read More
Given two permutations P1 and P2 of numbers from 1 to N, the task is to find the maximum count of corresponding same elements in… Read More
Given n strings that are permutations of each other. We need to make all strings same with an operation that takes front character of any… Read More
Given an array of n elements. Our task is to write a program to rearrange the array such that elements at even positions are greater… Read More
Given a square matrix mat[][] of dimension N and an integer K, the task is to rotate the matrix by 90 degrees K times without… Read More
Given a linked list and a number n. Find the sum of the last n nodes of the linked list.Constraints: 0 <= n <= number… Read More
Given two strings s1 and s2, find if s1 is a substring of s2. If yes, return the index of the first occurrence, else return… Read More
Given an array of positive integers. We are required to write a program to print the minimum product of any two numbers of the given… Read More
Introduction to Identity Matrix :  The dictionary definition of an Identity Matrix is a square matrix in which all the elements of the principal or… Read More
Given a linked list containing n nodes. The problem is to insert a new node with data x at the middle of the list. If… Read More
Given an array a, we have to find the minimum product possible with the subset of elements present in the array. The minimum product can… Read More
Given a singly linked list, find middle of the linked list and set middle node of the linked list at beginning of the linked list. Examples:… Read More
Given two sorted arrays of distinct elements, we need to print those elements from both arrays that are not common. The output should be printed… Read More