Forgot to make some comments in the code. I'm trying to avoid the more expensive string building work by comparing just length aggregates first. I was condering just holding the i index and performing the string work only at the very end. Perhaps I should have done that, now I'm thinking about it.
There are a ton of solutions on here that are exposed to divide by zero errors. Code stability must be a measurable variable in terms of correct results.
Why insist on all the input validation? Subtracts from the enjoyment of the actual challenged.
I didn't know about cycle detection. But I do now!!! So clever
This comment is hidden because it contains spoiler information about the solution
opps == should have been &&
This comment is hidden because it contains spoiler information about the solution
In the expression
n.ToString().Aggregate(1,(a,b) => a * (b - '0'));
What is happening when b - '0' invokes?
Forgot to make some comments in the code. I'm trying to avoid the more expensive string building work by comparing just length aggregates first. I was condering just holding the i index and performing the string work only at the very end. Perhaps I should have done that, now I'm thinking about it.
This is a joke, right?
There are a ton of solutions on here that are exposed to divide by zero errors. Code stability must be a measurable variable in terms of correct results.