["hello", "hey"]應(yīng)該返回false,因為字符串"hello"并不包含字符"y"。["Alien", "line"]應(yīng)該返回true,因為"line"中所有字符都可以在"Alien"找到。mutation(["hello", "hey"]) //應(yīng)該返回 false.mutation(["zyxwvutsrqponmlkjihgfedcba", "qrstu"]) //應(yīng)該返回 true.mutation(["Mary", "Aarmy"]) //應(yīng)該返回 true.mutation(["Alien", "line"]) //應(yīng)該返回 true.mutation(["floor", "for"]) //應(yīng)該返回 true.mutation(["hello", "neo"]) //應(yīng)該返回 false.
JS如何實現(xiàn)數(shù)組第一個字符串元素包含了第二個字符串元素的所有字符,函數(shù)就返回true
ITMISS
2018-09-07 14:08:51