Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Brilliant! I have no idea how these people come up with this kind of solution.
High quality solution, in my opinion.
correct me, if i am wrong. This solution takes n^2 running time due to for each customer, this program is finding the register by checking each register's least. Space-wise, it is O(n) where the n is the number of registers.
Sometimes when you are checking your solution by printing out each one of the instrutions make the buffer to get full. That is why the system tells it is timed out. Same thing happened to me, so I deleted the cout. All the problem got fixed.
I am stuck on why it is impossible to decode? I thought if the encoded text is 66% similar to the decoded, it is impossible to decode? But that seems like not the case. What am I missing?
Cool way to use data structure, but it is worse than just other O(N) in time solutions, is it not? Because this solution also take O(N) in space and O(N) in time.
This solution is not efficient at all. The runtime of sort is O(log(N)), therefore, there is a numerous times of function calls in return statement. Could be much more efficient? There are many O(N) time solutions.
Correct me if I am wrong, this algorithm's runtime is O(n)? Is that right?
Since max_element, min_element, and max functions are in linear time?
It would be nice to have an explanation. I do understand the detailed answers, but understanding library functions is kinda difficult for me.