https://www.hackerrank.com/challenges/two-strings/problem?isFullScreen=true
Two Strings | HackerRank
Given two strings, you find a common substring of non-zero length.
www.hackerrank.com
s1과 s2가 겹치는 단어가 있으면 Yes
없으면 No
def twoStrings(s1, s2):
# Write your code here
for s in s1:
if s in s2:
return "YES"
return "NO"'파이썬 코딩테스트 > 해커랭크' 카테고리의 다른 글
| HackerRank / Strange Counter / Python (0) | 2022.01.03 |
|---|---|
| HackerRank / Games of Thrones - 1 / Python (0) | 2022.01.02 |
| HackerRank / Anagram / Python (0) | 2021.12.31 |
| HackerRank / Making Anagrams / Python (0) | 2021.12.31 |
| HackerRank / Beautiful Binary String / Python (0) | 2021.12.31 |