Most Beautiful Item for Each Query - DSA Problem | Talentd