Skip to content

Commit

Permalink
Merge pull request #2 from Ansumanbhujabal/Ansumanbhujabal-patch-1
Browse files Browse the repository at this point in the history
hackerrankisaString.py added
  • Loading branch information
Ansumanbhujabal authored Mar 3, 2024
2 parents de8b255 + 8013506 commit 984cf9c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Python_Problems/hackerrankIsaString.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
def hackerrankInString(s):
h='hackerrank'
c=0
for i in s:
if i==h[c]:
c+=1
if c==len(h):# for making sure that when at some point of time c will fulfil condition and also exceed length
return 'YES' # it should not resturn no .


if c==len(h):
return 'YES'
else:
return 'NO'

0 comments on commit 984cf9c

Please sign in to comment.