## 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 […]

## Hackerrank - Cats and a Mouse

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/a/b/abebc507-bf25-4cf8-8cfa-a3d31b5acb3d/pidanic.com/web/wp-content/plugins/latex/latex.php on line 47

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/a/b/abebc507-bf25-4cf8-8cfa-a3d31b5acb3d/pidanic.com/web/wp-content/plugins/latex/latex.php on line 49

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/a/b/abebc507-bf25-4cf8-8cfa-a3d31b5acb3d/pidanic.com/web/wp-content/plugins/latex/latex.php on line 47

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/a/b/abebc507-bf25-4cf8-8cfa-a3d31b5acb3d/pidanic.com/web/wp-content/plugins/latex/latex.php on line 49

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/a/b/abebc507-bf25-4cf8-8cfa-a3d31b5acb3d/pidanic.com/web/wp-content/plugins/latex/latex.php on line 47

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/a/b/abebc507-bf25-4cf8-8cfa-a3d31b5acb3d/pidanic.com/web/wp-content/plugins/latex/latex.php on line 49

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/a/b/abebc507-bf25-4cf8-8cfa-a3d31b5acb3d/pidanic.com/web/wp-content/plugins/latex/latex.php on line 47

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/a/b/abebc507-bf25-4cf8-8cfa-a3d31b5acb3d/pidanic.com/web/wp-content/plugins/latex/latex.php on line 49

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/a/b/abebc507-bf25-4cf8-8cfa-a3d31b5acb3d/pidanic.com/web/wp-content/plugins/latex/latex.php on line 47

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/a/b/abebc507-bf25-4cf8-8cfa-a3d31b5acb3d/pidanic.com/web/wp-content/plugins/latex/latex.php on line 49

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/a/b/abebc507-bf25-4cf8-8cfa-a3d31b5acb3d/pidanic.com/web/wp-content/plugins/latex/latex.php on line 47

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/a/b/abebc507-bf25-4cf8-8cfa-a3d31b5acb3d/pidanic.com/web/wp-content/plugins/latex/latex.php on line 49

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/a/b/abebc507-bf25-4cf8-8cfa-a3d31b5acb3d/pidanic.com/web/wp-content/plugins/latex/latex.php on line 47

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/a/b/abebc507-bf25-4cf8-8cfa-a3d31b5acb3d/pidanic.com/web/wp-content/plugins/latex/latex.php on line 49

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/a/b/abebc507-bf25-4cf8-8cfa-a3d31b5acb3d/pidanic.com/web/wp-content/plugins/latex/latex.php on line 47

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/a/b/abebc507-bf25-4cf8-8cfa-a3d31b5acb3d/pidanic.com/web/wp-content/plugins/latex/latex.php on line 49

Hackerrank - Problem Statement A description of the problem can be found on Hackerrank. Solution Cats and the mouse moves with the same speed. Suppose it is by 1 on x-axis. Lets define the difference between their positions: (cat A, mouse), (cat B, mouse). where , , are coordinates on -axis. The results - If […]

## Hackerrank - Breaking the Records

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

Java

Javascript

## Hackerrank - Birthday Chocolate

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

Java

Javascript

## Hackerrank - Picking Numbers

Hackerrank - Problem Statement A description of the problem can be found on Hackerrank. Solution First, I started with sorting the array. I took 0th index as a pointer. I had the second pointer as 1st index. I incremented second pointer and tried to find out if the difference between values at the pointers is […]