Ask your own question, for FREE!
Mathematics 11 Online
OpenStudy (anonymous):

In real life, what is the fastest way to sort a deck of cards in order?

OpenStudy (anonymous):

deal them in a line ace to king

OpenStudy (anonymous):

but that's insertion sort :(

OpenStudy (anonymous):

can't wait to see the answer to this!

OpenStudy (anonymous):

im a big card player so thats how i would do it

OpenStudy (anonymous):

yeah I hope someone comes here and gives me a real-life implementation mergesort or quicksort or heapsort or some other fancy sorting algorithm

OpenStudy (anonymous):

I will look into this ...

OpenStudy (anonymous):

you could be a magician

OpenStudy (anonymous):

google? i found a couple, but since i don't understand programming it doesn't help me

OpenStudy (anonymous):

insertion sort works something like this: table: empty hand: unsorted cards put the first card of the deck on the table the top card of the deck is now your key put it in it's appropriate position on the table, comparing it to the single card on the table now the next card is the key compare it right-to-left with the cards on the table, placing it in it's appropriate position on the table (i.e. just after a card that's smaller than it) ... in the end you have a line of sorted cards on the table, so all you do is bundle them up :-D Insertion sort is O(n^2) though :(

OpenStudy (anonymous):

bubble sort

OpenStudy (jamesj):

In real life agd, you wouldn't write a computer program to do it anyway, but do it by hand. What notsmart said sounds smart to me.

OpenStudy (anonymous):

Right

OpenStudy (anonymous):

Insertion sort, for small n, is relatively efficient and simple, and therefore effective.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!