ShanCW

Results 4 comments of ShanCW

正则 ```js function findMost(s){ let arr = s.match(/([a-z])\1+/g)||[] if(!arr.length){ return s.split('').reduce((prev,cur)=>{ if(cur === undefined) return prev[cur] = 1 return prev },{}) } let maxVal = 1; arr.forEach(item=>{ item.length > maxVal...

```js class Node { constructor(val){ this.val = val; this.next = null } } class NodeList{ constructor(array){ array.forEach((val,index)=>{ index == 0?this.head = new Node(val) : this.insertNewNode(val) }) } insertNewNode(val){ let cur...

### 递归解决JSON.stringify(obj)的 key位置不同,重复添加 ```js function removeSame(arr){ let hash = {} //对象排序 return [... new Set(arr)].filter(item=>{ if(Object.prototype.toString.call(item) == '[object Object]'){ item = sortByKey(item) } let key = JSON.stringify(item) if(hash[key]){ return false...

> ![image](https://user-images.githubusercontent.com/26795319/222030466-950ff6dc-3f54-4b28-8978-58b7c692d9f0.png) Now I also encounter this situation. It prompts that there is an Ecc certificate, but when copying the certificate, an error as shown in the picture is reported....