top of page
Search
Kth Row of Pascal's Triangle Interviewbit Solution
Given an index k, return the kth row of the Pascal’s triangle.
Pascal’s triangle : To generate A[C] in row R, sum up A’[C] and A’[C-1] from
Pascal Triangle Interviewbit Solution
Given numRows, generate the first numRows of Pascal’s triangle.
Pascal’s triangle : To generate A[C] in row R, sum up A’[C] and A’[C-1] from
N/3 Repeat Number Interviewbit Solution
You’re given a read only array of n integers. Find out if any integer occurs more than n/3 times in the array in linear time and constant ad
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].
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
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
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.
Max Sum Contiguous Subarray - Interviewbit Solution
Find the contiguous subarray within an array, A of length N which has the largest sum.
Add One To Number: Interviewbit Solution
Given a non-negative number represented as an array of digits,
add 1 to the number ( increment the number represented by the digits ).
bottom of page