Skip to content

Instantly share code, notes, and snippets.

@hussamkurd
Created December 3, 2017 22:20
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 hussamkurd/8a55356882a4374d63c0cc1fa9576c56 to your computer and use it in GitHub Desktop.
Save hussamkurd/8a55356882a4374d63c0cc1fa9576c56 to your computer and use it in GitHub Desktop.
firstNonRepeatingLetter
// PHP - Hussam Kurd
function firstNonRepeatingLetter($s)
{
return array_search(1, array_count_values(str_split($s)));
}
// PHP - Hussam Kurd
function firstNonRepeatingLetter($s)
{
return array_search(1, array_count_values(str_split($s)));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment