General doubts regarding iterators

What is l.push_back() ?
What is *it ?
Why in the template class we have generated a loop ?

hello @vanshikasharma1645

push_back is a function , it basically insert data at the end of contained

u can think it as pointer , and to access pointer value we need to use * that why here we are using *it to print value of iterator it.

that loop is linearly searching for key whose iterator we want to return .

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.