← Microsoft questions
CodingEasy

House and Hill Peak Matching

Filed under Microsoft

Given two arrays representing hill heights, count the number of pairs of indices (i, j) such that the maximum value in the first array range matches the minimum value in the second array range.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Microsoft questions

Collected from public candidate posts and coding forums. Updated Nov 2026.