HaystackAnalytics interview question

Describe the possible solution for the given problem