Mex of an array is the smallest non-negative integer that does not appear in the array. Given an array of non-negative integers, find mex of its elements. Examples : Input : arr[] Read more →
Given an array arr of size n, the task is to sort this array using minimum swaps. We are allowed to swap only adjacent elements. Examples: Input: arr[] = {1, 4, 3, Read more →
Given an array with n elements, task is to calculate the difference between the sum of those elements occurring at odd indexes and those at even indexes. Note : For the above Read more →
We have n boxes in which we have to place c magnets such that minimum distance between two magnet should be maximum. As we know any two magnet become aggressive when kept Read more →
In Artificial Intelligence you will encounter this puzzle. Given below is a crypt-arithmetic problem solved. Example : SEND + MORE ------- = MONEY ------- CP + IS + FUN -------- = TRUE Read more →
You have to paint n boards of length {L1, L2, L3,…,Ln-1}. There are k painters available and each painter takes t time to paint 1 unit of board. You have to get Read more →
Given an array A[] and size of array is N. The task is to replace element of array A[] are in given range L to R both are included. Element replace by Read more →
There is given a sum and you have to find whether this sum is resultant of summation of first n natural numbers or not. If it is summation of first n natural Read more →
You have a total of n coins and you want to arrange the coins in staircase shape, where every i-th row must have exactly i coins. You want to find the total Read more →
Given an array in increasing order and a target, return indices of two numbers such that they add up to the target. You have to return an array of indices where the Read more →