题解 | #相同的Set#
相同的Set
https://www.nowcoder.com/practice/1417539606b84ad081147516158153a1
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> </head> <body> <script> const _isSameSet = (s1, s2) => { // 补全代码 return Array.from(s1).sort.toString() === Array.from(s2).sort.toString(); } </script> </body> </html>提供一下别的思路,类数组转换成数组,数组排序,转换成字符串,比较字符串
#牛客专项练习#