#include<bits/stdc++.h> should not be used. Not because it is OS specific, it might be, I'm not sure. But it is basically a header that includes all the headers of the standard library.
Given that #inlucde in C++ means basically a textual copy-paste, it's not just unnecessary to include the above header, but it will bloat your binary size without any reason.
Include what you need and that is <algorithm> as Swastik Baranwal pointed out.
As the most important reason to use C++ is still performance, I'd be happy to see a comparison among the different ways to reverse a string.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks for the article.
#include<bits/stdc++.h>
should not be used. Not because it is OS specific, it might be, I'm not sure. But it is basically a header that includes all the headers of the standard library.Given that
#inlucde
in C++ means basically a textual copy-paste, it's not just unnecessary to include the above header, but it will bloat your binary size without any reason.Include what you need and that is
<algorithm>
as Swastik Baranwal pointed out.As the most important reason to use C++ is still performance, I'd be happy to see a comparison among the different ways to reverse a string.