Skip to content

Category Archives: C++ Programs

Given an integer x, the task is to find if every k-cycle shift on the element produces a number greater than or equal to the… Read More
Given two numbers represented by linked lists, write a function that returns the multiplication of these two linked lists. Examples:  Input: 9->4->6 8->4 Output: 79464… Read More
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:  Input… 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

Start Your Coding Journey Now!