You are viewing a single comment's thread. Return to all comments →
I am also getting same error. Did you find a solution?
use in built reverse method of c++ to reverse.
and which one is that?
void std::reverse<class Iterator>(Iterator begin, Iterator end) is an in-place iterator-based swap and overkill because it makes sense only in one of the two contexts:
void std::reverse<class Iterator>(Iterator begin, Iterator end)
string s1 = to_string(x); string s2 = s1 /* copy */; reverse(s2.begin(), s2.end()); if (s1 == s2) ...
as above but you use a function that converts an int to a vector<int> where each element is a digit then do the same process as with the strings
Both are horrendous overkill compared to the multiply-modulo-add-divide loops in other answers.
well explained. thanks dude.
can you please explain it more further