## Count pairs in a sorted array whose product is less than k

Given a sorted integer array and number k, the task is to count pairs in an array whose product is less than x. Examples: Input:… Read More »

Given a sorted integer array and number k, the task is to count pairs in an array whose product is less than x. Examples: Input:… Read More »

Given an array of distinct integers(considering only positive numbers) and a number ‘m’, find the number of triplets with the product equal to ‘m’. Examples:… Read More »

Given an array arr[] of positive numbers, find minimum number of sets in array which satisfy following property, 1. A set can contain maximum two… Read More »

Given an array of distinct integers and a sum value. Print all triplets with sum smaller than given sum value. Expected Time Complexity is O(n2).… Read More »

Given an array of N numbers where a subarray is sorted in descending order and rest of the numbers in the array are in ascending… Read More »

Given an array of non negative integers and a number x, find a pair in array whose product is closest to x. Examples : Input… Read More »

Given two sorted arrays of distinct elements, we need to print those elements from both arrays that are not common. The output should be printed… 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 »

Two pointer is really an easy and effective technique which is typically used for searching pairs in a sorted arrays. Given a sorted array A… Read More »

Given an array of integers you have to find three numbers such that sum of two elements equals the third element. Examples: Input : {5,… Read More »

Given an array of distinct elements. The task is to find triplets in array whose sum is zero. Examples : Input : arr[] = {0,… Read More »

Given two sorted arrays and a number x, find the pair whose sum is closest to x and the pair has an element from each… Read More »

Given a sorted array and a number x, find a pair in array whose sum is closest to x. My Personal Notes arrow_drop_up Save Improved… Read More »

Given an array of integers, find all combination of four elements in the array whose sum is equal to a given value X. My Personal… Read More »

Given an array and a value, find if there is a triplet in array whose sum is equal to the given value. If there is… Read More »