JPMorgan Chase·Software Engineer·Technical Phone Screen
- You have n computers arranged in a circle, each either on or off (represented as 1s and 0s in an array), and an integer k. Find the maximum number of on computers within any k consecutive positions, where the window can wrap around the ring.
- Given two strings where the second is formed by deleting exactly one character from the first, return all zero-based indices in the first string where that deletion could have occurred to produce the second string.
“The sliding window part I got pretty quickly, but the ring wrapping threw me off for a bit.”