how to sort a vector using in built function??
Sorting a vector using inbuilt function
@khushipriya681 hey khushi priya
like
the vector is like that
vector v;
then in bulid sort work like
sort(v.begin(),v.end());
i am getting error when i do this
which header file should be included??
@khushipriya681 hey khushi priya #include<bits/stdc++.h> is the superset of the all the header file you can use this. or otherwise you have to use to individual to header file #include< vector > and #include< algorithm > which contain sort function
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.
but when i use #include<stdc++.h> it shows compiler error
says no such file exists why so??