Bucket Values Into Boundary Ranges

Asked at Bloomberg · Coding & Leetcode-style Questions · Difficulty: Medium

Given a sorted boundary array `boundaries` (length `m`) and an array `arr`, bucket each value in `arr` into the interval formed by adjacent boundaries.

Loading the problem…