Sorry, I don't know what happened. I tried to repeat the problem, but this time, it didn't give me any error. When I was solving it, the compiler was sending that message everytime on 'Test' mode.
My code passed, but in tests, it keeps generating this error:
In file included from main.cpp:5:
./preloaded.h:6:82: error: no member named 'str' in 'std::basic_ostream'
return (std::ostringstream() << '{' << x.first << ", " << x.second << '}').str();
The 10 in digits is for storing all possible digits (0..9), and each key stores the number of ocurrences of that digit in n
Nice recursion!
This comment is hidden because it contains spoiler information about the solution
In my humble knowledge, I don't think there is O(26n) in Big-O notation. O(k*n) = O(n)
Okay then, thanks for explaining it.
Why would anyone read these comments before trying to solve it???
This comment is hidden because it contains spoiler information about the solution
Didn't know how to rename groups and I didn't even think of www3., nice.
Sorry, I don't know what happened. I tried to repeat the problem, but this time, it didn't give me any error. When I was solving it, the compiler was sending that message everytime on 'Test' mode.
My code passed, but in tests, it keeps generating this error:
In file included from main.cpp:5:
./preloaded.h:6:82: error: no member named 'str' in 'std::basic_ostream'
return (std::ostringstream() << '{' << x.first << ", " << x.second << '}').str();
Why?
This comment is hidden because it contains spoiler information about the solution
Still not resolved
This comment is hidden because it contains spoiler information about the solution
Didn't know this model of function definition. Thanks!
I didn't even think of using recursion, it's beautiful.