top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

You have given height array of array. Generate the original array?

–2 votes
350 views

You have given height array of array. Generate the original array.

Input: [6,3,0,2,2,0,0]
Output : [ 1,5,7,3,2,6,4]

A[i] value in input array is the number of greater element on right side.

posted Nov 21, 2017 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
0 votes

Given an array of sorted integers and find the closest value to the given number. Array may contain duplicate values and negative numbers.

Example : Array : 2,5,6,7,8,8,9
Target number : 5
Output : 5

Target number : 11
Output : 9

Target Number : 4
Output : 5

0 votes

Given an unsorted array which has a number in the majority (a number appears more than 50% in the array), how to find that number?

–1 vote

Say you are given two arrays where second array is duplicate with one missing element. What should be the best possible way to find that missing element -
array1: [1,2,3,4,5,6,7]
array2: [1,3,4,5,6,7]

Missing Element: 2

...