Anti Diagonals Interviewbit Solution

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

Search

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(

Hotel Bookings Possible Interviewbit Solution

A hotel manager has to process N advance bookings of rooms for the next season. His hotel has C rooms. Bookings contain an arrival date and

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