hackerrank v0.1.0 FP.Intro

Elixir solutions for HackerRank functional programming challenges.

Link to this section Summary

Functions

Area of a curve by definite integrals

Compute the area of a Polygon

Function or not - validating values x, y or x and f(x)

Compute the Perimeter of a Polygon

Reverse a list - without using Enum.reverse

Volume of a curve by definite integrals

Link to this section Functions

Link to this function

area(c, p, l, r, dx)
area([integer()], [integer()], integer(), integer(), float()) :: float()

Area of a curve by definite integrals

https://www.hackerrank.com/challenges/area-under-curves-and-volume-of-revolving-a-curv/problem

Link to this function

area_polygon(coordinates)
area_polygon([tuple()]) :: float()

Compute the area of a Polygon.

https://www.hackerrank.com/challenges/lambda-march-compute-the-area-of-a-polygon/problem

Link to this function

exp(x, no_of_terms, results \\ 1)
exp(float(), integer(), list()) :: float()

Evaluating e^x

https://www.hackerrank.com/challenges/eval-ex/problem

Link to this function

function?(xy)
function?([tuple()]) :: boolean()

Function or not - validating values x, y or x and f(x).

Given a list of x, y values, this function determines (true, false) whether the values could be input/output for a valid function. https://www.hackerrank.com/challenges/functions-or-not/problem

Link to this function

perimeter(coordinates)
perimeter([tuple()]) :: float()

Compute the Perimeter of a Polygon.

https://www.hackerrank.com/challenges/lambda-march-compute-the-perimeter-of-a-polygon/problem

Link to this function

reverse(numbers, results)
reverse(list(), list()) :: [integer()]

Reverse a list - without using Enum.reverse

https://www.hackerrank.com/challenges/fp-reverse-a-list/problem

Link to this function

volume(c, p, l, r, dx)
volume([integer()], [integer()], integer(), integer(), float()) :: float()

Volume of a curve by definite integrals

https://www.hackerrank.com/challenges/area-under-curves-and-volume-of-revolving-a-curv/problem