Hackerrank – The Maximum Subarray

Hackerrank – Problem Statement A description of the problem can be found on Hackerrank. Solution Contiguous sum – using Kadane’s algorithm Non-contiguous sum – filter all positive elements from given array and sum them. If this array is empty. Take the greatest element. I created solution in: Scala Java JavaScript Ruby All solutions are also […]

Hackerrank – Functions Or Not?

Hackerrank – Problem Statement A description of the problem can be found on Hackerrank. Solution Check if for a given value x is always only one function output value y. See function definition. I created solution in: Scala All solutions are also available on my GitHub. Scala

Hackerrank – String-o-Permute

Hackerrank – Problem Statement A description of the problem can be found on Hackerrank. Solution For every input line: divide into character pairs reverse order of characters concat the pairs it into the one string I created solution in: Scala All solutions are also available on my GitHub. Scala