2940. Find Building Where Alice and Bob Can Meet
You are given a 0-indexed array
heightsof positive integers, whereheights[i]represents the height of theithbuilding.If a person is in building
i, they can move to any other buildingjif and only ifi < jandheights[i] < heights[j].You are also given another array
querieswherequeries[i] = [ai, bi]. On theithquery, Alice is in buildingaiwhile Bob is in buildingbi.Return an array
answhereans[i]is the index of the leftmost building where Alice and Bob can meet on theithquery. If Alice and Bob cannot move to a common building on queryi, setans[i]to-1.