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

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

Square Root of Integer InterviewBit Solution

Given an integer, A. Compute and return the square root of A.
If A is not a perfect square, return floor(sqrt(A)).

Matrix Median InterviewBit Solution

Given a matrix of integers A of size N x M in which each row is sorted.
Find an return the overall median of the matrix A.

Sorted Permutation Rank with Repeats InterviewBit Solution

Given a string, find the rank of the string amongst its permutations sorted lexicographically.
Note that the characters might be repeated. I

Largest Coprime Divisor InterviewBit Solution

You are given two positive numbers A and B. Find the maximum valued integer X such that: X divides A i.e. A % X = 0 and gcd(X,B) = 1.

Sorted Permutation Rank InterviewBit Solution

Given a string, find the rank of the string amongst its permutations sorted lexicographically.
Assume that no characters are repeated.

Trailing Zeros in Factorial InterviewBit Solution

Given an integer A, return the number of trailing zeroes in A!.

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

Reverse Integer InterviewBit Solution

Reverse digits of an integer.

bottom of page