一点背景:在技术面试中被要求回答这个问题,不能,现在我想改进但找不到回答的逻辑。
## CASE 1 ##
Given Input:
const profiles = ["Bill", "Steve", "Zuck"]
const skills =
[["Digital Marketing","SEO","UI/UX"],
["Accounting","Digital Marketing","Employer Branding"],
["Accounting","UI/UX"]]
Expected Output:
[[["Accounting"],["Steve","Zuck"]],
[["Digital Marketing"],["Bill","Steve"]],
[["Employer Branding"],["Steve"]],
[["SEO"],["Bill"]],
[["UI/UX"],["Bill","Zuck"]]]
## CASE 2 ##
Given Input:
const profiles= ["First", "Fourth", "Second", "Third"]
const skills =
[["One","Three","Two"],
["One","One three","One two"],
["One two","One two three","Two"],
["One","One three","One two","One two three","Three","Two"]]
Expected Output:
[[["One"],["First","Fourth","Third"]],
[["One three"],["Fourth","Third"]],
[["One two"],["Fourth","Second","Third"]],
[["One two three"],["Second","Third"]],
[["Three"],["First","Third"]],
[["Two"],["First","Second","Third"]]]
非常感谢!
慕容708150
浮云间
料青山看我应如是
慕标琳琳