IBM·Software Engineer·Technical Phone Screen
- Given an array of integers, count how many contiguous subarrays of length 2 or more consist of consecutive decreasing elements where each value is exactly one less than the previous.
“My first instinct was to brute force it with nested loops and I started explaining that before catching myself.”