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 is sum of these 2 substractions.

I created solution in:

All solutions are also available on my GitHub profile.

Scala

Java

Javascript

Leave a Reply

Your email address will not be published. Required fields are marked *