Solution to gift-idea search challenge