top of page
Search
Max Distance Interviewbit Solution
Given an array A of integers, find the maximum of j - i subjected to the constraint of A[i] <= A[j].
Maximum Unsorted Subarray Interviewbit Solution
You are given an array (zero indexed) of N non-negative integers, A0, A1 ,…, AN-1.
Find the minimum sub array Al, Al+1 ,…, Ar so if we sort(
Wave Array Interviewbit Solution
Given an array of integers, sort the array into a wave like array and return it,
In other words, arrange the elements into a sequence such t
First Missing Integer Interviewbit Solution
Given an unsorted integer array, find the first missing positive integer.
Example:
Given [1,2,0] return 3,
[3,4,-1,1] return 2,
[-8, -7, -6
Set Matrix Zeros Interviewbit Solution
Given a matrix, A of size M x N of 0s and 1s. If an element is 0, set its entire row and column to 0.
Note: This will be evaluated on the e
Find Duplicate in Array Interviewbit Solution
Given a read only array of n + 1 integers between 1 and n, find one number that repeats in linear time using less than O(n) space and traver
Merge Overlapping Intervals
Given a collection of intervals, merge all overlapping intervals.
For example:
Given [1,3],[2,6],[8,10],[15,18],
return [1,6],[8,10],[15,18
Find Permutation - Interviewbit Solution
Given a positive integer n and a string s consisting only of letters D or I, you have to find any permutation of first n positive integer th
Next Permutation - Interviewbit Solution
Implement the next permutation, which rearranges numbers into the numerically next greater permutation of numbers for a given array A
Rotate Matrix - Interviewbit Solution
You are given an n x n 2D matrix representing an image.
Rotate the image by 90 degrees (clockwise).
You need to do this in place.
bottom of page