Given a binary array nums, find the index of the zero that, when replaced with a 1, produces the maximum number of consecutive 1s. If the array contains no zeros, return -1. If multiple indices…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.