Coding Challenge:
Given the attached list of names, write a function that prints all of the 2-name-pairs, that when combined, share letters with the following key ‘laheravtam’ (order of letters doesn't matter).
Please submit a cleaned (remove compiled files, etc) & zipped source code folder with solution. Whatever language you want.
If you have questions or are unsure if you understand the prompt, email Spencer (spencer.jones@cgi.com)
For example:
Names = [‘steve’,’alan’,’lee’,’harvey’,’nala’]
Key = ‘alanlee’
Answer: (order of the pairs doesn’t matter)
[‘alan’,’lee’]
[‘lee’,’nala’]
Example 2:
Names = [‘steve’,’alan’,’lee’,’harvey’,’nala’] (same as above)
Key = ‘laanlee’ (anagram of above key)
Answer:
[‘alan’,’lee’]
[‘lee’,’nala’]
Example 3:
Names = ['a','b','c','ab','bc','ac']
Key = 'cba'
Answer:
['ab','c']
['a', 'bc']
['ac','b']
'''