Why am I Getting TLE in Below Question in May Cook-Off?
Question Link (CHEFSHIP) :
My Solution :
Why am I Getting TLE in Below Question in May Cook-Off?
Question Link (CHEFSHIP) :
My Solution :
std::string::compare() does, a linear scan to check if two strings match. So the time complexity of this submission is O(N^2).
Okay! Thanks for Suggesting!