Company: Amazon_5sep
Difficulty: medium
Calculate Max Distance Problem Description At Amazon's research laboratory, k engineers need to be assigned to workstations based on their expertise sets. Each engineer has a specific expertise, represented by a character in the expertise string. Engineers appear in the order they need to be assigned. The laboratory has a row of j available workstations, each tagged with the expertise it supports, represented by the workspace string. The i th character of workspace shows the expertise accepted by the i th workstation. Assignment Rules: Each engineer must be assigned to a compatible workstation (matching their expertise). Engineers must be placed in the same order as they appear in the expertise string. Workstations assigned to engineers don't have to be next to each other, i.e., (they do not need to be contiguous). Goal: Find the maximum isolation of any valid assignment. Isolation is defined as the largest gap (in workstation indices) between any two adjacent engineers. More formally,