Hackerrank - Divisible Sum Pairs

Hackerrank - Problem Statement A description of the problem can be found on Hackerrank. Solution Create index pairs variations for all indexes that pair is unique - it means when (i, j) exists (j, i) is the same. For each pair calculate the sum of values at corresponding index. If is divisible, count them and […]

Hackerrank - CamelCase

Hackerrank - Problem Statement A description of the problem can be found on Hackerrank. Solution There are 2 options To split the string by regular expression"[A-Z]" and then print the length of an array returned from splitting. To iterate over all characters, count the uppercase and print their count + 1 I created solution in: […]

Hackerrank - Week of Code 22

I participated in an another programming contest organized by Hackerrank. It was Week of Code 22 from 8.8.2016, 09:00 AM CEST to 15.8.2016 AM CEST It was my 14th contest at Hackerrank and I think I was quite successfull because I earned my second bronze medal. I was able to solve 3 challenges: Cookie Party […]

Hackerrank - Compare The Triplets

Hackerrank - Problem Statement A description of the problem can be found on Hackerrank. Solution Read all ratings and compare it according to the defined conditions: If ai > bi, then Alice is awarded 1 point If ai < bi, then Bob is awarded 1 point If ai = bi, then neither person receives a […]