Company: Amazon_5_Jan
Difficulty: medium
Code Question 1 Problem Description The artificial intelligence researchers at Amazon are building an advanced data augmentation system to expand the training dataset for enhanced model performance. In one such system, there are 26 different labels possible and the i th data sample is classified to belong to the samples[i] label where samples is a string of lowercase English letters. However, for some data samples, samples[i] is equal to '?' representing that the corresponding data sample label is missing and needs to be replaced with some lowercase English letter. The overhead of any index of the string samples is defined as the number of indices before it that also have the same label result. For example, For the string "hello" the overheads are [0, 0, 0, 1, 0] corresponding to each index. For the string "abc" the overheads are [0, 0, 0] corresponding to each index. For the string "aaccbbc" the overheads are [0, 1, 0, 1, 0, 1, 2] corresponding to each index because before the last c