Hackerrank – Hello World N Times

Problem Statement A description of the problem can be found on Hackerrank. Solution

Solution also available on my GitHub.

Hackerrank – Hello World

Problem Statement A description of the problem can be found on Hackerrank. Solution

Solution also available on my GitHub.

Hackerrank – Solve me first FP

Problem Statement A description of the problem can be found on Hackerrank. Solution

Solution also available on my GitHub.

Hackerrank – Diagonal Difference

Problem Statement A description of the problem can be found on Hackerrank. Solution Make 2 sums for 2 diagonals – from left to right, from right to left. Substract 2 sums and print its absolute value. I created solution in 4 languages: Scala Java JavaScript Ruby All solutions are also available on my GitHub. Scala […]

Hackerrank – Staircase

Problem Statement A description of the problem can be found on Hackerrank. Solution Create n times a line consting of spaces (‘ ‘) and hashes (‘#’). Each line contains incremented count of hashes and decremented count of spaces form 1 to n, respectively n downto 1. I created solution in 4 languages: Scala Java JavaScript […]

Hackerrank – String Reductions

Problem Statement A description of the problem can be found on Hackerrank. Solution

Solution also available on my GitHub.

Hackerrank – Plus Minus

Problem Statement A description of the problem can be found on Hackerrank. Solution After reading all numbers in array, you have to filter this array according to three conditions – number greater than zero, lower then zero and equals to zero. Count the subarrays and divide by array length. I created solution in 4 languages: […]

Hackerrank – Pascal’s Triangle

Problem Statement A description of the problem can be found on Hackerrank. Solution I created recursive function for factorial     . Then create all combinations of rows and column indexes. For input 4 it looks like:

Apply function for pascal triangle     for each combination. I created solution in Scala: The solution […]

Hackerrank – Solve me first & second

This is a summary post of first Hackerrank intruductory challenges – Solve me first, Solve me second. It is only required to select your favourite programming language. You get a template and just submit this code. Both solutions: Solve me first Solve me second Also available on my GitHub here and here. Solve me first […]

Hackerrank – A Very Big Sum

Problem Statement A description of the problem can be found on Hackerrank. Solution Read from input and sum all numbers. Same as Simple Array Sum, but you have to use bigger integer type as 32-bit integer if language does not support automatic conversion to Big Integers as default I created solution in 4 languages: Scala […]