I'm trying to filter an array for duplicates:
for i in 0...arrCheck.count-1 {
let searchNum = arrCheck[i]
let filteredArray = arrCheck.indices.filter{arrCheck[$0] == searchNum}...
if I pass something like [2, 3, 3, 4, 5, 2] this works fine. But when I pass [2, 2] it blows up - filteredArray gets millions of items. Any idea where I am falling off the rails?
Thanks