Back to problems

Minimum Talent-Complete Team from Every Start

Algorithm · Walmart Labs · Medium

Requirements The inputs are talentsCount, which gives the total number of talent categories, and talent, a list where every student possesses one talent numbered from 1 to talentsCount. A valid team is a contiguous slice that includes at least one student from each talent category. For every starting position, determine the size of the smallest valid slice that starts there. Use -1 for any index whose suffix does not contain all talent categories. Input sizes can be as large…

Checking your access…