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.

Search

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.

Prime Sum Interviewbit Solution

Given an even number ( greater than 2 ), return two prime numbers whose sum will be equal to given number.

Anti Diagonals Interviewbit Solution

Give a N*N square matrix, return an array of its anti-diagonals. Look at the example for more details.

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

Spiral Order Matrix II Interviewbit Solution

Given an integer A, generate a square matrix filled with elements from 1 to A2 in spiral order.

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

Repeat and Missing Number Array Interviewbit Solution

You are given a read only array of n integers from 1 to n.
Each integer appears exactly once except A which appears twice and B which is mis

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(