Intro to Sorting Algorithms in Python - Bubble Sort

Поділитися
Вставка
  • Опубліковано 14 гру 2024

КОМЕНТАРІ • 10

  • @DevOpsJourney
    @DevOpsJourney 3 роки тому +7

    Understanding how to program sort algorithms is really good for people learning python or those going for a Developer interview where they ask python questions. Asking to program a sort method is a pretty common interview question.

    • @strategy_gal
      @strategy_gal 3 роки тому

      Haha - true. My hubby just had a FB coding interview where he said he had do this sort of thing but with C ++

  • @henrybernreuter4408
    @henrybernreuter4408 3 роки тому +1

    Best explanation I have ever seen

  • @GeoPoly55
    @GeoPoly55 3 роки тому +1

    We need more videos on algorithm

  • @hamiltonbryan441
    @hamiltonbryan441 3 роки тому +1

    Hey everyone, I tried using the timing decorator and it returns rather than a time. The files timing.py and bubblesort.py are in the same folder. Any ideas as to why the thus would be the case? Thanks!
    Edit: I got it.. mistyped the code in timing.py 😅

  • @strategy_gal
    @strategy_gal 3 роки тому +1

    Hey Dan, I love what you're doing with your community!! Way to go :)

  • @bluesdog88
    @bluesdog88 3 роки тому +1

    So "for i in items" the i refers to indices? Oh my god I finally get it, thank you! They couldn't even explain it in college when I kept asking about it lol

    • @sprajosh
      @sprajosh 3 роки тому +2

      if you do "for i in items", you're essentially iterating over the list "items" and you'll get one value from the list "item" in "i" for each iteration
      to get the indices, you can do "for i in range(len(items))" which - for easier understanding - gets the length of your list "item" and creates a list of values from 0 to length of items-1

    • @bluesdog88
      @bluesdog88 3 роки тому

      @@sprajosh Thanks for the clarification! Appreciate it

  • @Raj-uz9nv
    @Raj-uz9nv 3 роки тому

    Other Data structure algorithm video