出一道我发明的题,难度算简单吧。# JobHunting - 待字闺中
P*e
1 楼
有两个有序的array of strings,
array1 = ["abc","def","ghi","jkl"]
array2 = ["abc","jkl"]
返回所有在array1但不在array2的单词: ["def","ghi"]
array1 = ["Zebra"]
array2 = ["Antelope","Bison","Cow"]
返回 ["Zebra"]
限制: 不允许吧两个array加入两个hashmap或set然后比较两者差。
array1 = ["abc","def","ghi","jkl"]
array2 = ["abc","jkl"]
返回所有在array1但不在array2的单词: ["def","ghi"]
array1 = ["Zebra"]
array2 = ["Antelope","Bison","Cow"]
返回 ["Zebra"]
限制: 不允许吧两个array加入两个hashmap或set然后比较两者差。