Skip to content

Tag Archives: Arrays

Given a string S of size N representing a monoalphabetic cipher, the task is to print the top five possible plain texts that can be… Read More
Given an array arr[][] consisting of N pairs such that each pair {L, R} represents that ith house can be painted in L number of… Read More
Given an array arr[] of size N, the task is to calculate the maximum sum that can be obtained by dividing the array into several… Read More
Given an array A[] of N positive numbers, the task is to find the maximum sum that can be formed which has no three consecutive… Read More
The following article discusses the way to return a local variable created inside a function, which can be done by returning a pointer to the… Read More
Given an array arr[] consisting of N integers, the task is to repeatedly remove elements that are smaller than the next element. Examples: Input: arr[]… Read More
Given a lower triangular matrix Mat[][], the task is to store the matrix using column-major mapping. Lower Triangular Matrix: A Lower Triangular Matrix is a… Read More
Given an array A[] and a positive integer X. The task is to find the absolute difference between the floor of the total sum divided… Read More
Prerequisite: Switch Statement in C/C++, Functions in C/C++, Loops in C and C++, C/C++ do-while loop with Examples Write a menu-driven program to perform below… Read More
Given an array arr[], the task is to find the count of array elements whose squares are already present in the array. Examples: Input: arr[]… Read More
Given an array arr[] of size N and an integer K, the task is to find all the array elements that appear more than (N… Read More
Given an array arr[] of size N and an integer K, the task is to check if all array elements can be made equal by… Read More
Given an array arr[] of size N, the task is to find the largest non-repeating element present in the given array. If no such element… Read More