What is Java to JavaScript?

In the world of programming, the distinction between Java and JavaScript often stirs confusion. Despite their similar names, these two languages are as different as chalk and cheese. To illustrate this point, let’s delve into a whimsical analogy: Java is to JavaScript as van is to vanillin. This comparison might seem odd at first, but […]

7 NPM packages you may (never) use

How do you find a good npm package? This article is based on my Openslava 2018 talk. While there are so many npm packages available to download. Which criteria do you use to find a good npm package? Is it downloads, GitHub stars, recommendation, documentation, …? NPM NPM – abbreviated from Node package manager, is […]

Recursion in Šaral programming language

Recursion In computer science recursion is a function, which calls itself in the functio body. The function call is always conditional to ensure that calculation ends. Šaral as a problem-oriented programming langugage supports writing recursive procedures and functions. Specifics of a recursive function in Šaral The function recursion is different than in other programming languages. […]

Hackerrank – Making Anagrams

Hackerrank – Problem Statement A description of the problem can be found on Hackerrank. Solution First, I have found common characters in both strings (intersection of characters) and calculate the count. Then I haves substracted string one length and intersection chars count. Similar way substraction of string 2 length and intersection chars count. The result […]

Hackerrank – Insertion Sort – Part 2

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

Hackerrank – Counting Sort 1

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

Java

Javascript

Hackerrank – Separate the Numbers

Hackerrank – Problem Statement A description of the problem can be found on Hackerrank. Solution I explain my solution with following examples: Example 1234 I start with a beginning of a string, which would be one digit number – 1 and try to examine a rest of the given string 234. Next, I check the […]

Hackerrank – Two Characters

Hackerrank – Problem Statement A description of the problem can be found on Hackerrank. Solution I started with finding all unique characters. Then I created all possible combinations of pairs. I deleted other characters except the pair. I found if the examined pair contains alternating characters in deleted strings If yes I count the length […]

Hackerrank – Counting Valleys

Hackerrank – Problem Statement A description of the problem can be found on Hackerrank. Solution I loop throught all steps and remeber the level from the sea (level). If it is D, I decrement by 1, if U increment by 1. When such situation happen that actual sea level is 0 and current step is […]