I'm not an expert but, IIUC, there are more efficient solutions here. This one is O(n log n) due to sorting. But there are some that use either std::map or vectors to keep counts of each letter in each string. Those should be O(n).
How does this actually work? I understand that an unnamed parameter is used here. But how is it passed to the abs function? I cannot find anything about it in the documentation.
The instruction should be made more clear
I'm not an expert but, IIUC, there are more efficient solutions here. This one is O(n log n) due to sorting. But there are some that use either
std::map
or vectors to keep counts of each letter in each string. Those should be O(n).PEP 8 (the official style guide) literally advises against using lambda expressions.
Two questions:
(int)
beforevector.size()
?std::pow
instead of justpow
? The latter works fine.What's the reason for changing the function signature?
What's the point of changing the signature of the function?
I find it really weird that Haxe doesn't have a function or a method to retrieve a maximum from an array :S
How does this actually work? I understand that an unnamed parameter is used here. But how is it passed to the
abs
function? I cannot find anything about it in the documentation.This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Why is Python 3 not available?
wow, that's a lot of code!
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution