Hackerrank - Area Under Curves and Volume of Revolving a Curve


Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /nfsmnt/hosting2_2/a/b/abebc507-bf25-4cf8-8cfa-a3d31b5acb3d/pidanic.com/web/wp-content/plugins/latex/latex.php on line 47

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /nfsmnt/hosting2_2/a/b/abebc507-bf25-4cf8-8cfa-a3d31b5acb3d/pidanic.com/web/wp-content/plugins/latex/latex.php on line 49

Hackerrank - Problem Statement

A description of the problem can be found on Hackerrank.

Solution

  • function f is an applied algebraic expression to x as in problem description
  • function area is area of the cycle () with center 0 and radius value of function(x)
  • function summation is applied once for function f and one for function area

I created solution in:

All solutions are also available on my GitHub.

Scala

Leave a Reply