Python Programming Practice: LeetCode #6 -- ZigZag Conversion

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

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

  • @johnbanyan11
    @johnbanyan11 3 года назад +9

    man.. ur making sense even to me ...i'm the guy who started coding from last two months...thanks for the content

  • @neotank874
    @neotank874 3 года назад +6

    You are an undiscovered treasure of youtube.

  • @karamanabdullah
    @karamanabdullah 3 года назад +5

    I know your views are very low but you are very precious for data science.

  • @fnfal113
    @fnfal113 3 месяца назад

    Thanks man, your initial assesment made me create a solution before watching the real code in your video.

  • @sady02_
    @sady02_ 3 года назад +5

    Man I thought it is 1B but it was 18 views
    Wish you the best

  • @devashreesharma3865
    @devashreesharma3865 3 года назад +5

    I loved how you explained it so easily. Thank you so much :)

  • @manh9105
    @manh9105 8 месяцев назад

    finally understood this zigzag problem's solution

  • @tubex1300
    @tubex1300 3 года назад +2

    i loved the way you approach to the problems solving in recursion - can you make a videos that will explain deeply in recursion pls

  • @mryup6100
    @mryup6100 10 месяцев назад

    What an elegant solution!

  • @thonmaker7880
    @thonmaker7880 3 года назад +4

    Solid video

  • @abaundwal
    @abaundwal Год назад

    Very nice explanation

  • @yashm05
    @yashm05 2 года назад +1

    Best Technique !!! thanks for the video :)

  • @vishalsinghsengar7951
    @vishalsinghsengar7951 2 года назад

    The content is awesome and deserving of more love

  • @sidehat1655
    @sidehat1655 Год назад

    I wouldn't have bothered with the intermediate form. Easier just to change one string into the other. Less lines of code.
    '''
    def zigzag(in_s, row_count, col_count):
    in_s_len, out_s, i = len(in_s), "", 0
    for col in range(col_count):
    for row in range(row_coun)t:
    if col % 2 or not row % 2:
    out_s += in_s[i]
    i += 1
    return out_s
    '''
    God coding on your phone is painful... Zero chance there isn't a bug there but hopefully you get the idea.
    I just loop the rows and treat the even and odd ones differently.

  • @MJ-qr5xw
    @MJ-qr5xw Год назад

    Was stuck at this problem for 3 hrs , now i feel foolish😅. Thanks for such a good explination

  • @wildworldexplorerstv
    @wildworldexplorerstv 4 месяца назад

    You're a legend!

  • @snehanath277
    @snehanath277 9 месяцев назад

    Thank you very much.

  • @Lumary
    @Lumary 2 года назад

    brilliant solution, thanks for sharing! :)