Given an array arr that represents a permutation of integers from n, you have a binary string of length n initially containing all
At each step i (from n), the bit at position arr[i - 1] (
A group of
Return the latest step at which there exists a group of m. If no such group exists at any step, return
Constraints:
n arr.length
m n
arr[i] n
All integers in arr are distinct.
Given an array arr that represents a permutation of integers from n, you have a binary string of length n initially containing all
At each step i (from n), the bit at position arr[i - 1] (
A group of
Return the latest step at which there exists a group of m. If no such group exists at any step, return
Constraints:
n arr.length
m n
arr[i] n
All integers in arr are distinct.