Knuth Shuffle made simple in 5 mins

Поделиться
HTML-код
  • Опубликовано: 29 сен 2024
  • Knuth Shuffle, aka Fisher-Yates shuffle or simply list shuffle is a way to randomly order things in an array or list. In this video we explain how it works and implement it.
    Please support me through my Udemy courses:
    Pass your coding interview in,
    Java : www.udemy.com/...
    Python: www.udemy.com/...
    Ruby: www.udemy.com/...
    JavaScript: www.udemy.com/...
    Multithreading in,
    Go Lang: www.udemy.com/...
    Python: www.udemy.com/...
    Java: www.udemy.com/...
    Learn Dynamic Programming in,
    Java: www.udemy.com/...
    Python: www.udemy.com/...
    Ruby: www.udemy.com/...

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

  • @alokik100
    @alokik100 2 года назад +5

    You know the awesome way to teach complex topics. More videos please. 👍🏼

  • @wubster666
    @wubster666 2 года назад +2

    Is this Khan Academy in disguise??
    On a serious note
    I was kinda lost when I read just the algorithm online but this video just made everything so much clearer. Great job!

  • @aabb12346
    @aabb12346 Год назад +3

    You taught me Knuth Shuffle within five minutes! I have been scratching my head since yesterday looking at the explanations on the web.

  • @nanaamoako4175
    @nanaamoako4175 2 месяца назад

    Thank you! Great presentation and delivery. Very easy to understand. Subscribed!

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

    Nicely explained. The complicated part is it’s name. 👍

  • @mberle1
    @mberle1 7 месяцев назад

    Could there be figures that do not change locations? For example, "A,B,C,D,E" could A ever be the first post-randomiztion?

    • @fullmuppet
      @fullmuppet 7 месяцев назад +1

      Yes. But the same is true with a "real life" shuffle. If you shuffle a deck of cards, any cards could be in the same position after the shuffle. Indeed, to be a true random shuffle, this needs to be the case. If items were guaranteed *not* to be in the same position, that provides information about the previous state, which means it can't be truly random.

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

    well explained as always :) thank you

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

    Great video!

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

    great work

  • @desmondwilson3416
    @desmondwilson3416 11 месяцев назад

    this is a great explanation! Thank you very much,.

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

    There are multiple errors in this presentation. Downvoted.

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

    Finally a clear explanation. Thank you James!

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

    Great explanation in 5 minutes.