Help with error

prob: find first duplicate element

sol: https://ide.codingblocks.com/s/406324

trying using frequency array

Hello @raghav007 your code is working fine.


Happy Learning!!

It is not working here with vector

working fine here also:


you have to cout the result.

oh I forgot, but still the answer should be 3 and not 2.

@raghav007 you are returning the frequency.
Return the element it will give 3 then.

ohh thanks a lot, silly mistakes…

Can you recommend of some website to practice problems on recursion

first practice your portal problems then you can go for another problems on hackerblocks.
you can mark this as resolved.
Happy Learning!!

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.