Return a binary string marking which values k are balanced in an array.
Unlock detailed company stats for this questionUpgrade
Given an array of length n, a number k is balanced if there are 2 indices i and j such that arr[i], arr[i+1], ..., arr[j] is a permutation of 1, 2, ..., k. Return a binary string of length n, where 1 means the ith number is balanced. Example: [4, 1, 3, 2] gives "1011".
Format · HackerRank OA.
Community answers
No answers contributed by the community yet.


