Algorithm stl auto

what is the use of auto???

@Ambuj-Singh-514796906079795 auto is a generic iterator. It makes the things easy when you have to use iterators for maps and sets.

that means in some case I can use auto in place of for loop??

Yes you can use it as well

1 Like

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.