This is only for cpp users.
You must have seen that using
ios_base::sync_with_stdio(false); and cin.tie(NULL); decreases the code runtime.
What you may not know is that using “\n” instead of endl also decreases the the runtime.
You can also use printf and scanf instead of using cin cout as they are faster as compared to cin cout to reduce the runtime of the code.
Hope this helps!!
but in cpp, I think it did the same thing:
using namespace std;
So, what is the necessity of using “/n” instead of endl. @abhaychandna Please explain it bit clearly, I am so noob in C++.
Endl flushes output buffer whereas /n don’t do this.This increase time using endl.
For more detail google it.