## Sparse Search

Given a sorted array of strings which is interspersed with empty strings, write a method to find the location of a given string. Examples: Input… Read More »

Given a sorted array of strings which is interspersed with empty strings, write a method to find the location of a given string. Examples: Input… Read More »

Given two sorted matrices mat1 and mat2 of size n x n of distinct elements. Given a value x. The problem is to count all… Read More »

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

Given a n x n strictly sorted matrix and a value x. The problem is to count the elements smaller than or equal to x… Read More »

Given two lists list1 and list2 containing m and n items respectively. Each item is associated with two fields: name and price. The problem is… Read More »

Given an array arr[] and an integer k, we need to print k maximum elements of given array. The elements should printed in the order… Read More »

Binary search is a popular method of searching in a sorted array or list. It simply divides the list into two halves and discard the… Read More »

Given two integers, n and k. Initially we have a sequence consisting of a single number 1. We need to consider series formed after n… Read More »

Given an integer n, we need to find the number of positive integers whose factorial ends with n zeros. Examples: Input : n = 1… Read More »

We have to paint n boards of length {A1, A2, .. An}. There are k painters available and each takes 1 unit time to paint… Read More »

Given an array and two numbers x and k. Find the number of different ordered pairs of indexes (i, j) such that a[j] >= a[i]… Read More »

Given an array of sorted integers. We need to find the closest value to the given number. Array may contain duplicate values and negative numbers.… Read More »

Given two arrays a[] and b[], we need to build an array c[] such that every element c[i] of c[] contains a value from a[]… Read More »

Given a number s (1 n, r = mid – 1. e) Else sum < n, l = mid + 1. 3- Return -1, if… Read More »

Given an array a[] and an element x, find number of occurrences of x in a[]. Examples: Input : a[] = {0, 5, 5, 5,… Read More »