C++ Any Help would be appreciated.
Autocomplete Ready > Hinclude bits/stdc++.h>... Every project on Thumbtack belongs to a category. Each set of two categories has a relevance score from to which represents how relevant they are to each other. A category has a relevance score of 10 toisel - Complete the 'categorySuggestions' function below. The function is expected to return a 20 STRING ARRAY. The function accepts following parameters: 1. STRING_ARRAY categories 2. STRING_ARRY projects 3. INTEGER K vector vector
> category Suggestions (vector categories, vector projects, int k) ( > int main() QWERTYUIOP ASOROMKL ZXCVBNM Every time a project that belongs to use is completed the Thumbtack search bar updates to display the most relevant category suggestions for that not. These top categories are chosen by. Subalt Code Test Results Custom Input il for that user. These top categones are chosen by first sorting all the categories that are relevant to at least one of the already created projects by relevance. Then, in the case that their relevance is equal, they should be sorted by category name. If the same category is relevant to 2 or more projects, it should be included only once with the maximum relevance score. If there are fewer than k total relevant projects, the suggestions list will be shorter than k. You have a relevance graph of all the Thumbtack categories, represented as an array of strings of comma-separated words. For each string in categories, the first two elements are the categories being compared and the third is their relevance score. You are also given an array of the categories of the projects that a particular user wants to create. For example: "House Painting, Interion Painting.o.8 means that House Painting and Interior Painting have a relevance score of 0.8 (1.e. highly relevant) and Handyman, Massage Therapy means thal Handyman and Massage Therapy have a relevan de score la calbare relevant Werenset Ho the shoulent ...... Given the relevance graph categories, the list of the user's projects, and the number of category suggestions the user should see in the Thumbtack search bark, return an array of arrays that represents the state of the search bar suggestions list after each of the projects in projects is created Example For categories = "House Painting, Interior Painting,0.9 "Handyman, Massage Therapy,0.1", "Handyman, House Painting,0.5", "House Painting, House Cleaning,0.6", Furniture Assembly, Handyman, 0.8", "Furniture Assembly, Massage Therapy, E "Plumbing Drain Repair,Junk Removal, projects = ["House Painting", "Handymany, and k = 3. the output should be category Suggestions (categories, projects, k = ["House Painting" "Interior Painting". "House Cleaning"). "Handyman", "House Painting. "Interior Painting"]]. After the first project House Painting is completed the most relevant suggestions are (in order of their rele datekin Relevance Category Relevance House Painting 1.0 Interior Painting House Cleaning 0.6 Handyman After the second project is completed, the most relevant suggestions are: Category Relevance Handyman 1.0 House Painting 16 Interior Painting 0.9 Furniture Assembly 0.8 House Cleaning 0.6 0.1 Massage Therapy Input/Output 1 [input] array.string categories Category relevancies given in the format category.name, , , . relevance is a float number in the range (0,1] and has no more than 6 decimal places after the point. It is guaranteed that there are no duplicate entries with the same category pairs (i.e. with will be distinct). Category names can only consists of spaces and English letters. Guaranteed constraints: Os categories.lengths 1000, 5 $ categories[i]. length