isUnique check using bit vectors