#
Category: Array

Problem: Find a number in the sorted array having least difference with the given number. You might have come across searching a number in a given array. In this …

Problem: Find max and min in array of integers with minimum number of comparisons. The array is unsorted. Solution: Efficiency is heart of any algorithm. Solving a problem …

Problem: Given an array arr, find the maximum j – i such that arr > arr. We have to find the maximum difference in an array. Solution: We will …

Problem: Write a program to find the equilibrium position of the array. Ex: given an array: 1,2,3,4,5,6,7,8 equilibrium position should be 5(element 6) i.e sum of numbers before …

Problem: Find frequency of elements in an array of integers. Count number of occurrences of an element in an array. We have to find out frequency of each element in …