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

# Tag Archives: Arrays

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

Given an N-ary tree consisting of N nodes numbered from 1 to N rooted at node 1, the task is to assign values to each… 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 a positive integer K, the task is to find the minimum possible cost to split the array… 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