Amazon logoAmazon
Coding·60 minMembers

Longest Consecutive Sequence — Adjacent Gap ≤ K

Members only

LC 128 variant: instead of demanding successive integers, two values are considered consecutive when their absolute difference is at most `k`.

SWE
array
sorting
greedy
medium
Frequency
Single report
Last asked
2026-05-13
Stage
onsite-coding

Log in to continue reading the full content

Comments

Sign in to join the discussion
Loading...