Skip to content

Instantly share code, notes, and snippets.

@brendak
Created August 7, 2016 00:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brendak/d424e64a9e64e77c28c27371260788a5 to your computer and use it in GitHub Desktop.
Save brendak/d424e64a9e64e77c28c27371260788a5 to your computer and use it in GitHub Desktop.
function isMerge(s, part1, part2){
var combined = part1.concat(part2);
var alphaed = combined.split('').sort('').join('');
var ss = s.split('').sort('').join('');
if (ss == alphaed){
return true;
}
return false;
}
@azlan
Copy link

azlan commented Aug 7, 2016

what are those test cases?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment