Search code examples
hadoopmapreduce

Can we solve factorial of a number using map reduce program?


Can we solve the factorial of a number using map-reduce program? If yes then how mapper and reducer will interact?


Solution

  • I wouldn't use mapreduce for just one number, but rather billions of numbers

    The factorial of any number can be found by a simple for loop

    MapReduce doesn't change that fact

    And this would be a map-only task since no reduction is needed