JPMorgan Chase logoJPMorgan Chase
Coding·60 minMembers

Alternating Triplets

Members only

Given an array, inspect every adjacent triple and count triples where the middle element is greater than both neighbors or less than both neighbors.

SWE
array
simulation
oa
easy
Frequency
Single report
Last asked
2025-06-30
Stage
oa

Log in to continue reading the full content

Comments

Sign in to join the discussion
Loading...