Narcissistic decimal number: Difference between revisions

m
(→‎{{header|Haskell}}: Faster version (search space reduced from integer series to unordered digit combinations))
Line 1,078:
 
===Reduced search (unordered digit combinations)===
As summing the nth power of the digits is unaffected by digit order, we can reduce the search space by filtering unordered digit combinations of given length and arbitrary order, rather than filtering ana exhaustivefull integer sequence.
 
<lang haskell>import Data.List (sort)
9,659

edits