Given a string containing different sentences with keys (strings) and a list of keys (strings), find all the sentences which contains the input keys (all of them) and return a list with the other keys in this selected sentences without any duplicate.
First, you have to split the string so that you can select each sentence. I chose to create a matrix with one sentence per line and one word per cell. Once it's done, you need to find the sentences that contains all the keys. Then you must select these sentences and return the keys (ie words, cells), that are different from the input keys. Example: let's assume you already have your matrix. Input: matrix (M) and list of keys (Keys) M: [[I love love Datadog Datadog] [I like Datadog]] Keys: [Datadog, I] You should select both sentences and return [love, like] (don't contain any duplicate).