Given three arrays X[], Y[], and Z[] each consisting of N integers, the task is to find the maximum number of triplets (X[i], Y[i], Z[i])… Read More

# Category Archives: Arrays

Given an array arr[] of size N, the task is to sort the array in descending order starting from the mid of the array having… Read More

Given an array, arr[] of N distinct integers and an integer K, the task is to rearrange the given array in such a way, that… Read More

Given an positive integer N, the task is to find the number of triplets (X, Y, Z) such that the sum of product of any… Read More

Given an array arr[] consisting of N integers, the task is to check if the sum of K most frequent array elements and the sum… Read More

Given an array A[] consisting of N integers and two integers X and Y, the task is to find the maximum sum of the averages… Read More

Rahul and Ankit are the only two waiters in Royal Restaurant. Today, the restaurant received N orders. The amount of tips may differ when handled… Read More

Consider a linear running track. Some racers are running on the track between a particular segment. A person is trying to take pictures of every… Read More

Given two arrays dist[] and speed[] consisting of N integers, where dist[i] is the initial distance of the ith giant from the city and speed[i]… Read More

Given an array arr[] and brr[] both consisting of N integers and a positive integer K, the task is to find the minimum value of… Read More

Given a positive integer N, the task is to count the number of N-digit numbers whose sum of digits is a prime number. Examples: Input:… Read More