Rosetta Problems

Most Beautiful Item for Each Query

https://leetcode.com/problems/most-beautiful-item-for-each-query