Skip to content

Category Archives: C++ Programs

Given a n × m binary matrix, count the number of sets where a set can be formed one or more same values in a… Read More
Given a 4 x 4 matrix, we have to interchange the elements of first and last row and show the resulting matrix.Examples : Input: 3… Read More
Given a n x n matrix. The problem is to sort the given matrix in strict order. Here strict order means that matrix is sorted… Read More
An array is given, find length of the subarray having maximum sum. Examples :  Input : a[] = {1, -2, 1, 1, -2, 1} Output… Read More
Given a string str and an array of strings arr[], the task is to check if the given string can be formed by any of… Read More
Given a linked list of n nodes which is first sorted, then rotated by k elements. Find the value of k. Recommended: Please try your… Read More
Given a 2D square matrix, find the sum of elements in Principal and Secondary diagonals. For example, consider the following 4 X 4 input matrix. … Read More
Given a singly linked list, rearrange the list so that even and odd nodes are alternate in the list.There are two possible forms of this… Read More
Given a matrix, the task is to find the maximum element of each row. Examples:  Input : [1, 2, 3] [1, 4, 9] [76, 34,… Read More
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

Start Your Coding Journey Now!