Complexity of the linkedlist

ohhh yes it do not have you can use insert after in it it is in the link i provided you

there are do many stl like list - vector forward list queue deque … you can google and learn about them .

hope there wont be any other doubts so you can mark it as resolved now @Vikaspal :smiley:

@vatsal38 insert after will works ?

yes its in the link @Vikaspal

is it ok ? will you be able to do it?

@vatsal38 sorry for asking to many question . but i am confused although i read the article but not able to understand the two like of code
forward_list< int >::iterator ptr; here what does :: iterator ptr why?
ptr = flist.insert_after(flist.begin(), {1, 2, 3}); and the args ?
what i have to insert the one elements ?

it all comes under iterator you have to study it first otherwise wont be able to explain. you can simple use vector or list it supports push back. best choice would be vector @Vikaspal

its ok i know that you are confused just take it one at a time focus on list and vector dont use forward list because all its functions can be implemented with vector or list easily. i also never used forward list came to know about it by you only😃

@vatsal38 yes the list is like the doubly LL to have to take care of the both the pointer prev and next one

yes @Vikaspal you are right

so any more doubt s @Vikaspal?
if not mark the doubt as resolved

@vatsal38 send me the links

just write the name of stl which you want functions of and gfg afterwards like
list stl gfg
vector stl gfg …
@Vikaspal

@vatsal38 i mean the thread link to marks the doubt as resolved

go to my doubts section in your portal there you will see the option @Vikaspal