You are viewing a single comment's thread. Return to all comments →
This is the best solution i've seen so far. May I suggest shortening it even more by replacing
int result = 0; for(int i : lettercounts){ result += Math.abs(i); } return result;
with
return Arrays.stream(missingtracker).map(x->Math.abs(x)).sum();
Thanks for the awesome solution
Seems like cookies are disabled on this browser, please enable them to open this website
Strings: Making Anagrams
You are viewing a single comment's thread. Return to all comments →
This is the best solution i've seen so far. May I suggest shortening it even more by replacing
with
Thanks for the awesome solution