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

top of page

Search

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

Noble Integer Interviewbit Solution

Given an integer array A, find if an integer p exists in the array such that the number of integers greater than p in the array equals to p.

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

Maximum Consecutive Gap Interviewbit Solution

Given an unsorted array, find the maximum difference between the successive elements in its sorted form.
Try to solve it in linear time/spac

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

Triplets with Sum between given range Interviewbit Solution

Given an array of real numbers greater than zero in form of strings.
Find if there exists a triplet (a,b,c) such that 1 < a+b+c < 2 .
Return

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

Merge Intervals - Interviewbit Solution

Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary).
You may assume that the intervals

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

bottom of page