as vector v={0012} it has 0 2 time
How to find any elements no of occurence in a vector does it have any inbuilt function
@kailash_01
to get count of a number in vector or array we have count function .
syntax is as follows (assuming v is a vector and x is element whose count we need to find)
count(v.begin(),v.end(),x);
this will give u number of times x occured in vector v.
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.