哈希法:
https://blog.csdn.net/weixin_34395205/article/details/89133619
function Deduplicate() {
let tmp = [
[1, 1, 2],
[1, 1, 2],
[3, 4, 5]
];
let hash = {};
let res = [];
for (let i = 0; i < tmp.length; i++) {
if (!hash[tmp[i]]) {
res.push(tmp[i]);
hash[tmp[i]] = true;
}
}
return res;
}
console.log(Deduplicate());