I can’t see any output after submitting my code but I can see sample test case passing
No output is comming after submiting code but sample case is passing
1<=A[i]<=10^9
maximum element of array can be greater the10^6
it is not possibe to make array of size greater than 10^6 that why you are not geting any output
i have not used array of size 10^6 please see my code
How to start a chat ?
you have to analyze what the hash function wants to do and then you have to
do it using a better way
Here hash function gives number of distinct element counter till that element (except that element). so think how you can do it in a better way
if input is 1 2 6 2 7 1 3 2
Ouput should be 6 7 1 6 2
as 3 distinct elements before 6
as 4 distinct elements before 7
as 5 distinct elements before 1
as 6 distinct elements before 6
as 7 distinct elements before 2
So I have to rewrite hash function is that what you are saying, but i belive has function is already given
yes hash function is given but how they write it, is not effecient approach.
you have to give an better approach to solve it