String find first repitive char in single traversal


Here I have used a integer and its bits to store if a particular char is set or not if set i am printing it, But it doesnt gives correct output

just a minor update
in line 10 add parenthesis
image

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.

1 Like