Algorithm · Whatnot · Medium
A music analyst is investigating singers’ performance histories to uncover which roles tend to be taken on by the same artist within a narrow window of years. You are provided with a list of performances where each entry is a three-element list [ , , ], along with an integer period. Two distinct roles A and B are said to co-occur when the same singer performs both and the absolute difference of their performance years is no greater than period (inclusive). Every such pair…
Checking your access…