findstreak

In an array, find the N consecutive items whose combined value is highest. Or lowest.