WA for test case 2 and 3

here is my code:


pls check why is it failing test case 2 and 3

@Garvit012, you should initialize j with 0 and you should not push a[i] in the freq set
corrected code :- https://ide.codingblocks.com/s/291271

Thanks for your help its working now