Skip to content

Category Archives: C++ Programs

Given a string S of lowercase English alphabets, the task is to find the minimum number of characters to be changed such that the left… Read More
Given a matrix of size N*M, and a number K. We have to rotate the matrix K times to the right side. Examples:   Input : N… Read More
An array contains both positive and negative numbers in random order. Rearrange the array elements so that positive and negative numbers are placed alternatively. Number… Read More
Given an n x n matrix .In the given matrix, you have to print the elements of the matrix in the snake pattern. Examples : … Read More
Given an array of n integers. You are given q queries. Write a program to print the floor value of mean in range l to… Read More
Given an array A[] of size N. Solve Q queries. Find the product in the range [L, R] under modulo P ( P is Prime). … Read More
Given two arrays with size n, maximize the first array by using the elements from the second array such that the new array formed contains… Read More
Given a square matrix and the task is to check the matrix is in lower triangular form or not. A square matrix is called lower… Read More
Given a matrix of N*M order. Find the shortest distance from a source cell to a destination cell, traversing through limited cells only. Also you… Read More
Given a square matrix, the task is that we turn it by 180 degrees in an anti-clockwise direction without using any extra space.  Examples : … Read More
Given a String S of length N, two integers B and C, the task is to traverse characters starting from the beginning, swapping a character… Read More
Given a singly linked list containing n nodes. The problem is to sort the list using the recursive selection sort technique. The approach should be… Read More
We have one 2D array, filled with zeros and ones. We have to find the starting point and ending point of all rectangles filled with… Read More
Given an array arr[] and an integer k, we need to print k maximum elements of given array. The elements should printed in the order… Read More

Start Your Coding Journey Now!