You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 14, 2023. It is now read-only.
做出来的第一道简单题
思路:两个循环 把相同的数字取出来 并且里面的循环去掉取出的数字 避免外部循环出现相同的数字
var intersect = function(nums1, nums2) { var arr = [] nums1.map((item) => { nums2.some((ite,idx) => { if(item === ite) { arr.push(item) nums2[idx] = null return true } }) }) return arr };
The text was updated successfully, but these errors were encountered: