Can anytone guide me with the approach

I am getting how hashing is done and how values are computed but the output how it is generating and what relation it has with the hash fn defined in the question

hello @great
IN output u need to print all disitnct number.
and at ith position u need to print that number whose has value is i-1
dry run on some small test cases and observer the pattern.