Showing 3 of 141 questions
You're given a sorted array of integers and need to return a list of ranges summarizing the consecutive numbers. Each range should be represented as "a->b" if a != b, or just "a" if a == b.
#1. Summary Ranges
You're given a row of seats, some occupied and some empty. Find the best seat to maximize the distance to the nearest person.
#2. Maximize Distance to Closest Person
Find the longest contiguous subarray containing only 1s after deleting at most one element from the given binary array (containing only 0s and 1s).
#3. Longest Subarray of 1's After Deleting One Element