Skip to content

Instantly share code, notes, and snippets.

@navidanindya
Last active June 9, 2018 08:55
Show Gist options
  • Save navidanindya/fc1c2c6c25c84392e62b4a9886f16386 to your computer and use it in GitHub Desktop.
Save navidanindya/fc1c2c6c25c84392e62b4a9886f16386 to your computer and use it in GitHub Desktop.
Get unique characters from two strings and return a sorted substring (PHP) [ Link: https://repl.it/@nealtheguitaris/PuzzlingVengefulRobot ]
<?php
function getUniqueSortedChars ($a, $b) {
return count_chars($a.$b,3);
}
echo getUniqueSortedChars('aaaabbbdddccc','aadfafiseitaabbbss')."\n";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment