Count strictly increasing contiguous slopes of size exactly K.
Unlock detailed company stats for this questionUpgrade
Given an integer array yCoordinates where yCoordinates[i] is the Y axis and each index is the X axis, find the number of strictly increasing contiguous slopes of size exactly K.
Example: [6,5,7,8,3,5,6] with k=3 gives output 2 - the increasing runs (1,5),(2,7),(3,8) and (4,3),(5,5),(6,6).
Constraints: 1 <= yCoordinates.size() <= 10^5; yCoordinates[i] >= 1.
Community answers
No answers contributed by the community yet.
Related questions
Alert when a stream of temperature ranges has 5 continuously strictly increasing temperatures.Related courses

Course

Course
Course
