##
Check whether a given array is a k sorted array or not
June 21, 2017

Given an array of n distinct elements. Check whether the given array is a k sorted array or not. A k sorted array is an… Read More »

June 21, 2017

Given an array of n distinct elements. Check whether the given array is a k sorted array or not. A k sorted array is an… Read More »

Given a sorted array of consecutive elements. The array has only one element repeated many times. The task is to find length of the sequence… Read More »

Given an array arr[] of n elements, update all elements of given array to some minimum value x i.e, arr[i] = x (0 4 *… Read More »

June 17, 2017

Given a sorted array containing only numbers 0 and 1, the task is to find the transition point efficiently. Transition point is a point where… Read More »

June 16, 2017

Given a Preorder traversal of a Binary Search Tree. The task is to print leaf nodes of the Binary Search Tree from the given preorder.… Read More »

Given an array of n integers. Find the maximum value of arr[i] mod arr[j] where arr[i] >= arr[j] and 1 <= i, j <= n… Read More »

June 15, 2017

Given a sorted array of n distinct integers rotated at some point. Given a value x. The problem is to count all the elements in… Read More »

June 14, 2017

We are given a sorted array A[] of n elements. We need to find if x is present in A or not.In binary search we… Read More »

June 12, 2017

Given an sorted array of size n. Find number of elements which are less than or equal to given element. Examples: Input : arr[] =… Read More »

June 11, 2017

Given two unsorted arrays arr1[] and arr2[]. They may contain duplicates. For each element in arr1[] count elements less than or equal to it in… Read More »

June 6, 2017

Given an array of n duplicates or distinct integers sorted in ascending order, write a function that returns a Fixed Point in the array, if… Read More »

We are given an array of size n containing positive integers. The absolute difference between values at indices i and j is |a[i] – a[j]|.… Read More »

May 29, 2017

Given two sorted arrays. There is only 1 difference between the arrays. First array has one element extra added in between. Find the index of… Read More »

May 21, 2017

Given two sorted arrays of size m and n respectively, you are tasked with finding the element that would be at the k’th position of… Read More »

May 18, 2017

Given a array of n numbers. Our task is to find out the number of ways to divide the array into three contiguous parts such… Read More »