class Solution: def leftmostBuildingQueries(self, heights: List[int], queries: List[List[int]]) -> List[int]: ans = [] # O(n^2 sol..) for i in range(len(queries)): # low & high are index high = max(queries[i]) low = min(queries[i]) if high == low or heights[high] > heights[low] : ans.append(high) co..