Created
December 3, 2017 22:20
-
-
Save hussamkurd/8a55356882a4374d63c0cc1fa9576c56 to your computer and use it in GitHub Desktop.
firstNonRepeatingLetter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// PHP - Hussam Kurd | |
function firstNonRepeatingLetter($s) | |
{ | |
return array_search(1, array_count_values(str_split($s))); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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