Dominator my approach solution

Posted by & filed under java.

All methods are static but it obvious why, just for example. There is also one method called getHashMap which takes a piece of work and on given array returns hashmap with elemnts and its count number.