FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
allalgorithms-python/allalgorithms/string/is_unique.py at patch-6 · NatanLucena/allalgorithms-python · GitHub
NatanLucena
/
allalgorithms-python
Public
forked from
abranhe/allalgorithms-python
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
allalgorithms-python
/
allalgorithms
/
string
/
is_unique.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
16 lines (15 loc) · 397 Bytes
Breadcrumbs
allalgorithms-python
/
allalgorithms
/
string
/
is_unique.py
Copy path
File metadata and controls
16 lines (15 loc) · 397 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# -*- coding: UTF-8 -*-
#
# Check if a string has all unique characters.
# The All ▲lgorithms library for python
#
# Contributed by: José E. Andrade Jr.
# Github: @andradejunior
#
def
is_unique
(
string_to_check
):
character_set
=
set
()
for
character
in
string_to_check
:
if
character
in
character_set
:
return
False
character_set
.
add
(
character
)
return
True
Back
|
FazBrowse Home
|
New Git URL