Please provide hint for this problem (see description )

https://mycode.prepbytes.com/problems/arrays/FAVOURITES