Interview Question : Subsequence of String | Python Code

Поделиться
HTML-код
  • Опубликовано: 22 янв 2025

Комментарии • 11

  • @nETSETOStECH
    @nETSETOStECH  4 года назад +7

    at 1:26 , "ac" should be used instead "ca" for maintaining relative position order

  • @npsvenkatesh
    @npsvenkatesh 4 года назад +5

    Great explanation. My slightly improved (IMHO) version :
    def subsequence(string):
    result = []
    l = len(string)
    if l == 0:
    result.append(" ")
    return(result)
    else:
    for i in subsequence(string[1:l]):
    result.append(i)
    result.append(string[0]+i)
    return(result)

  • @amanagrawal6088
    @amanagrawal6088 4 года назад +1

    Great explanation.......please keep posting such videos

  • @olawalesalami3025
    @olawalesalami3025 4 года назад +1

    You are the best. Thank you

  • @SRUJANI-z1o
    @SRUJANI-z1o 6 месяцев назад

    Please explain about the problem statement first and them go to soln. The explanation was great but I didn't understand what we wanted to solve in first place

  • @SCRIPTSAG
    @SCRIPTSAG 4 года назад

    Uler tree se kiya hai apne basicly esko print bhi ker sakte hai and also get bhi ker sakte hai

  • @homeOfTrivia
    @homeOfTrivia 4 года назад

    Thank you for this

  • @pavankumarreddy9586
    @pavankumarreddy9586 5 месяцев назад

    a="TANUJ"
    li=[]
    for i in range(0,len(a)):
    for j in range(i+1,len(a)+1):
    li.append(a[i:j])
    print(li)

  • @pavankumarreddy9586
    @pavankumarreddy9586 5 месяцев назад

    a="TANUJ"
    li=[]
    for i in range(0,len(a)):
    for j in range(i+1,len(a)+1):
    li.append(a[i:j])
    print(li)
    answer:-['T', 'TA', 'TAN', 'TANU', 'TANUJ', 'A', 'AN', 'ANU', 'ANUJ', 'N', 'NU', 'NUJ', 'U', 'UJ', 'J']

  • @shubhasheeshkundu9933
    @shubhasheeshkundu9933 3 года назад

    Plzz mam solve the count and say problem in Python.......