Given an array of integers. The task is to find the Minimum index of repeating element in an array in linear time and in a single traversal of the array. Examples: Input Read more →
Arrays
106 postsIn a prison, there are N cells. The positions of the cells are given in an array. The Jailer has to place all the prisoners in the cells in an ordered manner Read more →
Given an integer array arr[], the task is to find the number of triplets at distinct indices that can be removed from the array such that the mean remains the same as Read more →
Given a positive integer N, the task is to construct an array of length N and maximize the value at index K such that the sum of all the array elements is Read more →
Given an array of size n, your task is to find the least common multiple or LCM of all the elements of the array. Examples: Input : arr = [ 8, 9, Read more →
We have to find a Matrix of order 3 formed by given 9-elements whose determinant is maximum. Examples: Input: arr[9] = { 1, 2, 3, 4, 5, 6, 7, 8, 9} Max Read more →
Print all the perfect squares in a range i.e. a and b are the lower and upper bounds respectively. So print all the perfect squares between them and both are inclusive. Examples: Read more →
Given a n*m chess board. We can choose any rectangle formed by board squares and perform an inversion. Every white cell in the inverted rectangle becomes black and every black one becomes Read more →
Given an arithmetic progression and having any number of duplicates, we have to find the index of first occurrence of duplicate element in the series. After getting the index we will remove Read more →
Given an array of unique integers, print the array in such a way that the first element is first maximum and second element is first minimum and so on. We have to Read more →