Algorithm · Tradedesk · Easy
In a land of integers, adventurers seek the first place where the terrain changes abruptly. They hold a map called numbers, and their quest is to find the earliest index where three consecutive points rise sharply above a given threshold. Specifically, they must locate the smallest index i such that numbers[i], numbers[i + 1], and numbers[i + 2] are all strictly greater than a threshold value. If such a spot exists, they return i in triumph. If no such location is found,…
Checking your access…