Hackerrank – Taum and B’day

Hackerrank – Problem Statement A description of the problem can be found on Hackerrank. Solution The hint is given in problem description. One should compare if it is better to buy presents without changing colors or with changing colors. I created solution in: Scala Java JavaScript All solutions are also available on my GitHub profile. […]

Hackerrank – Sequence Equation

Hackerrank – Problem Statement A description of the problem can be found on Hackerrank. Solution I have given count of numbers n. I will iterate over all numbers from 1 to n I will find index of each iterated number in all elements and then index of index within all elements I created solution in: […]

Hackerrank – Priyanka and Toys

Hackerrank – Problem Statement A description of the problem can be found on Hackerrank. Solution I created solution in: Scala Java JavaScript All solutions are also available on my GitHub profile. Scala

Java

Javascript

Hackerrank – Consecutive Subsequences

Hackerrank – Problem Statement A description of the problem can be found on Hackerrank. Solution http://stackoverflow.com/questions/24518682/count-subsequences-divisible-by-k I created solution in: Java All solutions are also available on my GitHub profile. Java

Hackerrank – Grading Students

Hackerrank – Problem Statement A description of the problem can be found on Hackerrank. Solution We will use professor’s rules and transform all grades: – We find how many times (n) is 5 in given grade – if it is divisible without a remainder, we do nothing – it not we round it to neareast […]

Hackerrank – Between Two Sets

Hackerrank – Problem description The problem description – Hackerrank. Solution I created an array of all positive numbers, which satisfy conditions specified in problem statement. This set should contain elements from to . I filter all numbers from the set that are valid for an equation a . The array of positive numbers can be […]

Hackerrank – The Hurdle Race

Hackerrank – Problem Statement A description of the problem can be found on Hackerrank. Solution We need to find the highest hurdle. If it is greater than k then substract its height with k and we have the result. Otherwise print 0. I created solution in: Scala Java JavaScript Ruby All solutions are also available […]

Hackerrank – Java End-of-file

Hackerrank – Problem Statement A description of the problem can be found on Hackerrank. Solution I created solution in: Java All solutions are also available on my GitHub. Java

Hackerrank – Java Datatypes

Hackerrank – Problem Statement A description of the problem can be found on Hackerrank. Solution I created solution in: Java All solutions are also available on my GitHub. Java

Hackerrank – Java Currency Formatter

Hackerrank – Problem Statement A description of the problem can be found on Hackerrank. Solution I created solution in: Java All solutions are also available on my GitHub. Java