Last active
July 13, 2020 05:41
-
-
Save shaunhyp57/fdc5a241352cd0105e707924942e1b06 to your computer and use it in GitHub Desktop.
Cracking the Coding Interview, 6th Ed., Chapter 1 Question 1: Is Unique - using sets, python solution
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
def set_is_unique(input_string): | |
if len(set(input_string)) == len(input_string): | |
return True | |
return False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment