Just ditch the Linq, at least in this case. Slow as molasses. My code is readable, maintainable, and executes 2.5 to 3 times faster. Linq is too often a crutch for lazy coding.
@gaelanmcmillan: "People love a compact Linq solution" to the detriment of all. Most of those compact solutions are significantly slower to execute. Simple loops, while more verbose, will usually be better in execution speed, and much, much easier to read and maintain.
That code takes 2.5 to 3 times as long to execute compared with mine. That is significant.
Just ditch the Linq, at least in this case. Slow as molasses. My code is readable, maintainable, and executes 2.5 to 3 times faster. Linq is too often a crutch for lazy coding.
@gaelanmcmillan: "People love a compact Linq solution" to the detriment of all. Most of those compact solutions are significantly slower to execute. Simple loops, while more verbose, will usually be better in execution speed, and much, much easier to read and maintain.
That code takes 2.5 to 3 times as long to execute compared with mine. That is significant.
woah
out of the box type of thinking, my admiration!
From the description, it is not expected to. but yeah it doesn't.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
really nice!
Even if it solves this kata and is upvoted as hell, is does not work with two digit numbers ;)
This comment is hidden because it contains spoiler information about the solution
@chrono79 Can you explain this a bit better to beginners like me? Thank you.
clever!!!
Loading more items...