โ† PayPal questions
CodingHard

Construct Array B based on indices in A

Filed under PayPal

The question

Given an array A of size n where elements range from 1 to n, construct an array B. The condition is that B[i] must be less than or equal to B[j] for all values of j that appear as elements within array A.

No write-up yet. Related questions below have one.

Related PayPal questions

Collected from public candidate posts and coding forums. Updated Nov 2026.