## Find closest number in array

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 »

- Merge K sorted arrays | Set 3 ( Using Divide and Conquer Approach )
- Merge K sorted arrays of different sizes | ( Divide and Conquer Approach )
- Maximum element in a sorted and rotated array
- Interactive Problems in Competitive Programming
- Search element in a Spirally sorted Matrix
- Count the triplets such that A[i] < B[j] < C[k]
- Minimum steps to delete a string by deleting substring comprising of same characters
- Maximum Sum SubArray using Divide and Conquer | Set 2
- Lazy Propagation in Segment Tree | Set 2
- Sum of maximum of all subarrays | Divide and Conquer
- Find minimum steps required to reach the end of a matrix | Set - 1
- Generate a random permutation of elements from range [L, R] (Divide and Conquer)
- Find minimum steps required to reach the end of a matrix | Set 2
- IntroSort or Introspective sort
- Largest number N which can be reduced to 0 in K steps
- Kth smallest element in the array using constant space when array can't be modified
- Complexity Analysis of Binary Search
- Find 2^(2^A) % B
- Minimum operations of the given type required to make a complete graph
- Find the number of different numbers in the array after applying the given operation q times
- Find the value of XXXX.....(N times) % M where N is large
- Sum of i * countDigits(i)^2 for all i in range [L, R]
- Cost Based Tower of Hanoi
- Cartesian tree from inorder traversal | Segment Tree

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 »

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

Given a tank with capacity C liters which is completely filled in starting. Everyday tank is filled with l liters of water and in the… Read More »

Given an array of 2n elements in the following format { a1, a2, a3, a4, ….., an, b1, b2, b3, b4, …., bn }. The… Read More »

I was contacted by the HR on LinkedIn about the opening of Full Stack Developer at PayTM Noida. 1st Round (Duration – 2 hours) Tell… Read More »

Round 1 (Online Test): Four Programming Questions- a) Given a string find number of different substrings that are palindromes. b) In a matrix we can… Read More »

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 »

Given two integers m & n, find the number of possible sequences of length n such that each of the next element is greater than… Read More »

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 »

A convex hull is the smallest convex polygon containing all the given points. Input is an array of points specified by their x and y… Read More »

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 »

Given many stacks of coins which are arranged adjacently. We need to collect all these coins in the minimum number of steps where in one… Read More »

An element is a peak element if it is greater than or equal to its four neighbors, left, right, top and bottom. For example neighbors… Read More »

Given a sorted matrix mat[n][m] and an element ‘x’. Find position of x in the matrix if it is present, else print -1. Matrix is… Read More »

Given a set of points, a Convex hull is the smallest convex polygon containing all the given points. Input is an array of points specified… Read More »