hackerrank v0.1.0 FP.Recursion

Elixir solutions for HackerRank functional programming challenges: recursions.

Link to this section Summary

Functions

String compression

Fibonocci numbers

Filter elements

Computing the greatest common divisor (GCD) with Euclidean Algorithm

String mingling

String-o-Permute

Prefix compression

String reductions

The Sum of powers

Link to this section Functions

Link to this function

compress_string(str)

String compression

https://www.hackerrank.com/challenges/string-compression/problem

Link to this function

fibonacci(n)
fibonacci(integer()) :: integer()

Fibonocci numbers

https://www.hackerrank.com/challenges/functional-programming-warmups-in-recursion---fibonacci-numbers/problem

Link to this function

filter_elements(k, nums)

Filter elements

https://www.hackerrank.com/challenges/filter-elements/problem

Link to this function

gcd(list)
gcd([integer()]) :: integer()

Computing the greatest common divisor (GCD) with Euclidean Algorithm

https://www.hackerrank.com/challenges/functional-programming-warmups-in-recursion---gcd/problem

Link to this function

mingle_string(list)

String mingling

https://www.hackerrank.com/challenges/string-mingling/problem

Link to this function

pascal_tri(k, m \\ 1, tri_data \\ [])

Pascal's triangle

https://www.hackerrank.com/challenges/pascals-triangle/problem

Link to this function

permute_string(string)

String-o-Permute

https://www.hackerrank.com/challenges/string-o-permute/problem

Link to this function

prefix_compress(data)
prefix_compress([binary()]) :: [tuple()]

Prefix compression

https://www.hackerrank.com/challenges/prefix-compression/problem

Link to this function

string_reduce(str)

String reductions

https://www.hackerrank.com/challenges/string-reductions/problem

Link to this function

sum_of_powers(list)

The Sum of powers

https://www.hackerrank.com/challenges/functional-programming-the-sums-of-powers/problem