Pop removes the last element and returns it. So it is creating the return from the elements of chain backwards.
That's a very cool answer, I have never used Math.sign before.
Very clever!
This comment is hidden because it contains spoiler information about the solution
bruh
This is a good solution, but not universal :( To fix it, you need to use System.lineSeparator() or System.getProperty("line.separator")
Good luck in your studies! =)
It actually does not matter what you assign there. It is overriden in the tests anyway
This algorithm is not best practices - albeit short, having to run the counter once every duplicate value results in the algorithm being O(n^2). Using counters would have been a much better solution, which only has a complexity of O(n).
short but for optimized - u have way too many iterations calling count and set/sum
Clever one.. Awesome!!
how did you came for this?!?
same here
In python any number that is different from 0 is considered True (inclusive negatives)
Loading collection data...
Pop removes the last element and returns it. So it is creating the return from the elements of chain backwards.
That's a very cool answer, I have never used Math.sign before.
Very clever!
This comment is hidden because it contains spoiler information about the solution
bruh
This is a good solution, but not universal :( To fix it, you need to use System.lineSeparator() or System.getProperty("line.separator")
Good luck in your studies! =)
It actually does not matter what you assign there. It is overriden in the tests anyway
This algorithm is not best practices - albeit short, having to run the counter once every duplicate value results in the algorithm being O(n^2). Using counters would have been a much better solution, which only has a complexity of O(n).
short but for optimized - u have way too many iterations calling count and set/sum
Clever one.. Awesome!!
This comment is hidden because it contains spoiler information about the solution
how did you came for this?!?
same here
This comment is hidden because it contains spoiler information about the solution
In python any number that is different from 0 is considered True (inclusive negatives)
Loading more items...