Find Permutation - Interviewbit Solution

Given a positive integer n and a string s consisting only of letters D or I, you have to find any permutation of first n positive integer th

top of page

Search

Find Permutation - Interviewbit Solution

Given a positive integer n and a string s consisting only of letters D or I, you have to find any permutation of first n positive integer th

Next Permutation - Interviewbit Solution

Implement the next permutation, which rearranges numbers into the numerically next greater permutation of numbers for a given array A

Rotate Matrix - Interviewbit Solution

You are given an n x n 2D matrix representing an image.
Rotate the image by 90 degrees (clockwise).
You need to do this in place.

Largest Number - Interviewbit Solution

Given a list of non negative integers, arrange them such that they form the largest number.

Flip - Interviewbit Solution

You are given a binary string(i.e. with characters 0 and 1) S consisting of characters S1, S2, â€¦, SN. In a single operation, you can choose

Maximum Absolute Difference - Interviewbit Solution

You are given an array of N integers, A1, A2 ,â€¦, AN. Return maximum value of f(i, j) for all 1 â‰¤ i, j â‰¤ N.
f(i, j) is defined as |A[i] - A[j

Max Sum Contiguous Subarray - Interviewbit Solution

Find the contiguous subarray within an array, A of length N which has the largest sum.

Add One To Number: Interviewbit Solution

Given a non-negative number represented as an array of digits,
add 1 to the number ( increment the number represented by the digits ).

Min Steps in Infinite Grid - Interviewbit Solution

You are in an infinite 2D grid where you can move in any of the 8 directions. You are given a sequence of points and the order in which you

bottom of page