Longest substring with atmost k unique chars

could u modify my code bcz it is not getting complied …and i am not able to correct it

hello @amaaanahmedkhan987

when we iterate map then its returns a pair (key and its value).
image

here u need to reciever pair instead of char.
and then u can get key and its value by using first and second.

check now->

pls rewatch ur map stl videos

ok i watched but still getting wrong ans in one test case on hackerblocks

pls share ur updated code with me, i will check.
also share that hackerblock question link

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.