Pascal Triangle Interviewbit SolutionGiven 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 SolutionGiven an integer A, generate a square matrix filled with elements from 1 to A2 in spiral order.
Repeat and Missing Number Array Interviewbit SolutionYou 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 SolutionGiven an array A of integers, find the maximum of j - i subjected to the constraint of A[i] <= A[j].
Maximum Unsorted Subarray Interviewbit SolutionYou 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(
Wave Array Interviewbit SolutionGiven 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
First Missing Integer Interviewbit SolutionGiven an unsorted integer array, find the first missing positive integer. Example: Given [1,2,0] return 3, [3,4,-1,1] return 2, [-8, -7, -6