Longest consecutive subsequence

problem:


corrections in my code only required don’t want to mug somebody else solution :slight_smile:
I am doing it using hashmap as prateek bhaiya taught but I guess repetition of numbers doing something wrong plz fix my code:::::>>>>>>>