Given an array arr[] consisting of permutation in the range [1, N], the task is to check if the given array can be reduced to… Read More

# Category Archives: Arrays

A linear search or sequential search is a method for finding an element within a list. It sequentially checks each element of the list until… Read More

Given a 2D array Blocks[][] consisting of N rows of variable length. The task is to select at most M elements with the maximum possible… Read More

Given two arrays R[] and C[] consisting of N integers such that a matrix of dimensions N x N can be formed whose element at… Read More

Given an array arr[] consisting of N integers, the task is to check if it is possible to split the integers into two equal length… Read More

Given an array arr[] consisting of N distinct positive integers, the task is to repeatedly find the minimum peak element from the given array and… Read More

Given an array arr[] consisting of N positive integers, the task is to find the sum of all array elements after reversing digits of every… Read More

Given an array arr[] consisting of N integers, the task is to find all the array elements which occurs more than floor (n/3) times. Examples:… Read More

Given a positive integer N, the task is to print the last remaining element from a sequence [1, N] after repeatedly performing the following operations… Read More

Given an array arr[] of size N, the task is to find the minimum moves to the beginning or end of the array required to… Read More

Given an integer N and a set of all non-negative powers of N as S = {N0, N1, N2, N3, … }, arrange all non-empty… Read More