我正在尝试解决要求的leetcode问题Givenanarrayofintegerswhere1≤a[i]≤n(n=sizeofarray),someelementsappeartwiceandothersappearonce.Findalltheelementsof[1,n]inclusivethatdonotappearinthisarray.我的解决方案是:funcfindDisappearedNumbers(_nums:[Int])->[Int]{varreturnedArray=[Int]()ifnums.isEmpty==false{foriin1...nums.count