Why vec.insert is accepting 3 options?
Why vec.insert is accepting 3 options?
Okayy Sir.
But Can’t I use
vector.insert(position,value)
there are many forms of insert function, depending upon situation there params be vary.
refer this ->article
Yes Sir, Smjh gya
res.insert(nums.begin() + i,res.begin() + index[i]);
Sir but isse bhi nhi chalrha.
Like it is res.insert(pos,val);
But res.insert(val,itr1,itr2);
is working fine.
this is wrong,
see first param of insert is for positiion where u want to insert.
here u are giving num in its argument which is wrong because insertion has to be done on res and not on nums.
Ab shi hain?
check now>
Sorry, vector tn direct access krega. Pointer se nhi krega.
And Sir wo question hogya jisme 50/100 aarhe the in CC
. . . . . . . . .
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.