Skip to content

Category Archives: C++ Programs

Given a sorted array of distinct positive integers, print all triplets that form AP (or Arithmetic Progression)Examples :   Input : arr[] = { 2, 6,… Read More
Given a singly linked list and an integer K, the task is to rotate the linked list clockwise to the right by K places.Examples:   Input:… Read More
Given an array arr[] consisting of N positive integers, the task is to rotate the digits of array elements in an anti-clockwise direction such that… Read More
Given a range [L, R], we need to find the count of total numbers of prime numbers in the range [L, R] where 0 <=… Read More
Given an Array of size N and a values K, around which we need to right rotate the array. How to quickly print the right… Read More
Given two vectors, a and b of different sizes, where array a has m number of elements and array b has n number of elements.… Read More
A significant benefit of object-oriented programming is the reusability of code which eliminates redundant coding. An important feature of C++ is called templates. Templates support… Read More
Given a binary array arr[N], (where N = 2) of size two having at least one element as zero. The task is to write a… Read More
Given a n x n matrix. The problem is to sort the matrix row-wise and column wise.Examples:   Input : mat[][] = { {4, 1, 3},… Read More
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

Start Your Coding Journey Now!