Given a binary array containing only 0s and 1s, compute the minimum and maximum sequence lengths of contiguous 1s. If the array contains no 1s, return 0 for both minimum and maximum lengths.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.