← ALL NOTES
Array

2940. Find Building Where Alice and Bob Can Meet

Given building heights and queries (a, b). Alice is at a, Bob at b; they can meet at building j if they only move right to strictly taller buildings — i.e. j ≥ max(a, b) with heights[j] > heights[a]…

Loading…