top of page
Search
Allocate Books InterviewBit Solution
Given an array of integers A of size N and an integer B.
College library has N bags, the ith book has A[i] number of pages.
You have to allo
Painter's Partition Problem InterviewBit Solution
Given 2 integers A and B and an array of integers C of size N.
Element C[i] represents the length of the ith board.
You have to paint all N
Greatest Common Divisor InterviewBit Solution
Given 2 non-negative integers m and n, find gcd(m, n)
GCD of 2 integers m and n is defined as the greatest integer g such that g is a diviso
Grid Unique Paths InterviewBit Solution
A robot is located at the top-left corner of an A x B grid.
The robot can only move either down or right at any point in time. The robot is
Sum of pairwise Hamming Distance InterviewBit Solution
Hamming distance between two non-negative integers is defined as the number of positions at which the corresponding bits are different.
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
bottom of page