Given start and end time of all the cars in a given interval, find the maximum time gap in which no car travels. The start timings are given in sorted order. Examples: Read more →
Mathematical
84 postsGiven 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 →
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 →
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 →
Given a Binary String S of length N which consists of only 0 and 1, the task is to remove minimum number of 0’s from the string such that all 1’s form Read more →
Given an array of size N, print the index of the distinct element from the array, provided the array has only one distinct element and rest other elements are same. Examples: Input: Read more →
Given two lowercase alphabet strings s and t return whether you can create a 1-to-1 mapping for each letter in s to another letter (could be the same letter) such that s Read more →
The min-product of an array is equal to the minimum value in the array multiplied by the array’s sum. For example, the array [3,2,5] (minimum value is 2) has a min-product of Read more →
Given an array of distinct positive integers arr[] of length N, the task is to count all the number of pairs of indices (i , j) such that a[j]−a[i] = j−i given Read more →
Mithlesh has ‘N’ buckets each consisting of some fruits. Mithlesh wants to eat at least ‘M’ fruits and so, he decided to set a marker (integer) as maximum as possible such that Read more →