Added: 1 year ago
From: csed4sfu
Views: 31,602
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (20)

Sign In or Sign Up now to post a comment!
  • its quick, but the hungarian dance one is much funnier.)

  • Comment removed

  • i have no idea waht i just saw.

    something todo with a sorting algorithim but i dont know what that is either.

  • amazing representation, nice to get a view

  • defragmentation complete...

  • Look carefully, and you'll see the pivots being randomly chosen, as the sorting progresses. Beautiful!

  • @KirKanu

    The pivots aren't random though.

    It picks the middle value of each sublist, left to right.

  • @bhexric the pivots are most definitely random, look at where the first pivot is... its like 80% of the way to the right hand side. You CAN write quicksort to chose the median for the pivot, but this one doesn't.

  • @rolfsaurusa Sounds like I need to do some more research.

    Thanks.

  • @rolfsaurusa You're not correct neither. It can very well just select x[(l + r)/2] as a pivot, as the initial array is permuted randomly, this is essentially a random pivot. bhexric was not saying about median, but about x[(l+r)/2] rather, where l and r are left and right boundaries of subarray.

  • @dachevashe true. Although I still think I responded to what he meant, you are technically correct.

  • random pivot has the best run time.

    now, do this threaded! ;)

  • @teeds88 threre is no random pivot, the choice is always deterministic.

  • @spechtbert what? a random number generator is not deterministic. the degree of randomness of those can be subject of discussion, true, but they are sufficient for the best performance pivot. and if you believe truly random events don't exist, you're wrong.

  • @teeds88 fuck you

  • @rolfsaurusa What? How do you find the median of an unsorted list of numbers without sorting it?

  • @Z4KJ0N3S haha i was playing a game and some one sent me the link i know random but just wanted to know what im looking at im sure if i know what it is i would be impressed

  • what am i looking at? not sure what this is please tell me

  • @boyt42 If you don't already know what it is, I don't understand why you found yourself watching it. :p

  • @Z4KJ0N3S little schoolboys and girl just exchange links these days, not minding the content.

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more