Hackerrank – Extra Long Factorials

Problem Statement A description of the problem can be found on Hackerrank. Solution Read input and implement factorial function (recursive or imperative) using Big Integer if desired language does not support automatic conversion to Big Integers by default. I created solution in 3 languages: Scala Java Ruby Normally, I implement a solution also in JavaScript. […]

Hackerrank – Library Fine

Problem Statement A description of the problem can be found on Hackerrank. Solution Read 2 lines and parse dates. Substract actual year, month, day and expected year, month and day. Compare values and calculate fee: – if year difference is greater than 0 theb return 10000 – if year difference is equal to 0 and […]

Hackerrank – Time Conversion

Problem Statement A description of the problem can be found on Hackerrank. Solution My solution is folllowing: After reading an input line I parsed are necessary values. hours part of the input time from 0th to index of first ‘:’ minutes part of the input time from index of first ‘:’ + 1 to index […]

Hackerrank – Simple Array Sum

Problem Statement A description of the problem can be found on Hackerrank. Solution As this challenge is in Warmup subdomain, solution is pretty easy. The only thing to do is to be able to read from input given n times and make sum of all numbers. I created solution in 4 languages: Scala Java JavaScript […]

Exploring Possibilities for Symmetric Implementation of Aspect-Oriented Design Patterns in Scala

Originally published in Proceedings In Informatics and Information Technologies Student Research Conference 2015. PDF available here, source code on GitHub. Abstract In aspect-oriented programming, it may be distinguished between asymmetric and symmetric implementation. Aspect-oriented design patterns are known in their AspectJ-like, asymmetric implementation. One of their categorization is by dominating element of aspect-oriented programming—pointcut patterns, […]