Hashing facing problem wrong output

unlock

output is showing wrong…
i guess mistake is in updating new index in hashmap after swapping ??? can u tell where