Given an array A[0 … n-1] containing n positive integers, a subarray A[i … j] is bitonic if there is a k with i < = k = A[j].
Given an unsorted array arr and two numbers x and y, find the minimum distance between x and y in arr.
Given an array arr, find the maximum j – i such that arr[j] > arr[i].
Given a sorted array of n distinct integers where each integer is in the range from 0 to m-1 and m > n.
Given an unsorted array of numbers, write a function that returns true if array consists of consecutive numbers.
Difficulty Level: Rookie Both Arrays and Linked List can be used to store linear data of similar types, but they both have some advantages and disadvantages over each other.
Equilibrium index of an array is an index such that the sum of elements at lower indexes is equal to the sum of elements at higher indexes. For example, in an arrya A:
Given an array of n elements which contains elements from 0 to n-1, with any of these numbers appearing any number of times. Find these repeating numbers in O(n) and using only constant memory space.
You are given an array of n+2 elements. All elements of the array are in range 1 to n. And all elements occur once except two numbers which occur twice. Find the two repeating numbers.
Given an array A, write a function that segregates even and odd numbers. The functions should put all even numbers first, and then odd numbers.
Given an array arr of n integers, construct a Product Array prod (of same size) such that prod[i] is equal to the product of all the elements of arr except arr[i]. Solve it without division operator and in O(n).