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
#python | |
def wordLadder (beginWord, endWord, wordList): | |
List2=[] | |
while beginWord != endWord: | |
count1=0 | |
count2=0 | |
List1=[] | |
for element in wordList: |
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
#Python | |
#string='Cadena con subcadenas' | |
substring='' | |
for i in string: | |
if i in substring: | |
break | |
substring=substring + i |
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
#Python | |
#string='Cadena que quiero voltear' | |
rev_string='' | |
for i in reversed(string): | |
rev_string=rev_string + i |