BBO Discussion Forums: favourite sorting algorithm - BBO Discussion Forums

Jump to content

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

favourite sorting algorithm

Poll: What is your favourite sorting algorithm? (23 member(s) have cast votes)

What is your favourite sorting algorithm?

  1. Bubble sort (0 votes [0.00%])

    Percentage of vote: 0.00%

  2. Insertion sort (3 votes [13.04%])

    Percentage of vote: 13.04%

  3. Shell sort (0 votes [0.00%])

    Percentage of vote: 0.00%

  4. Merge sort (1 votes [4.35%])

    Percentage of vote: 4.35%

  5. Heapsort (1 votes [4.35%])

    Percentage of vote: 4.35%

  6. Quicksort (6 votes [26.09%])

    Percentage of vote: 26.09%

  7. Counting Sort (0 votes [0.00%])

    Percentage of vote: 0.00%

  8. Bucket sort (1 votes [4.35%])

    Percentage of vote: 4.35%

  9. Radix sort (0 votes [0.00%])

    Percentage of vote: 0.00%

  10. Distribution sort (0 votes [0.00%])

    Percentage of vote: 0.00%

  11. Timsort (0 votes [0.00%])

    Percentage of vote: 0.00%

  12. Cocktail Sort (1 votes [4.35%])

    Percentage of vote: 4.35%

  13. Comb Sort (0 votes [0.00%])

    Percentage of vote: 0.00%

  14. Gnome Sort (1 votes [4.35%])

    Percentage of vote: 4.35%

  15. Binary Tree Sort (5 votes [21.74%])

    Percentage of vote: 21.74%

  16. Library Sort (0 votes [0.00%])

    Percentage of vote: 0.00%

  17. Smoothsort (0 votes [0.00%])

    Percentage of vote: 0.00%

  18. Introsort (0 votes [0.00%])

    Percentage of vote: 0.00%

  19. Patience Sorting (1 votes [4.35%])

    Percentage of vote: 4.35%

  20. Strand Sort (1 votes [4.35%])

    Percentage of vote: 4.35%

  21. Tournament (2 votes [8.70%])

    Percentage of vote: 8.70%

Vote Guests cannot vote

#1 User is offline   jjbrr 

  • PipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 3,525
  • Joined: 2009-March-30
  • Gender:Male

Posted 2010-June-16, 10:22

Mine is cocktail sort ldo.

Bubble sort is also quite attractive.

This is a serious thread, by the way, and a popular meme.
OK
bed
0

#2 User is offline   jjbrr 

  • PipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 3,525
  • Joined: 2009-March-30
  • Gender:Male

Posted 2010-June-16, 10:24

Also wtf gwnn is an option.
OK
bed
0

#3 User is offline   gwnn 

  • Csaba the Hutt
  • PipPipPipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 13,027
  • Joined: 2006-June-16
  • Gender:Male
  • Interests:bye

Posted 2010-June-16, 10:30

Posted Image
... and I can prove it with my usual, flawless logic.
      George Carlin
0

#4 User is offline   jjbrr 

  • PipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 3,525
  • Joined: 2009-March-30
  • Gender:Male

Posted 2010-June-16, 10:38

those cats are protecting the sorceror's stone imo. check out the mysterious trap door they're guarding.
OK
bed
0

#5 User is offline   pooltuna 

  • PipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 3,814
  • Joined: 2009-July-23
  • Gender:Male
  • Location:New Orleans

Posted 2010-June-16, 11:22

I prefer unsorted; that way when an opponent looks into my hand...
"Tell me of your home world, Usul"
the Freman, Chani from the move "Dune"

"I learned long ago, never to wrestle with a pig. You get dirty, and besides, the pig likes it."

George Bernard Shaw
0

#6 User is offline   karlson 

  • PipPipPipPipPip
  • Group: Full Members
  • Posts: 974
  • Joined: 2005-April-06

Posted 2010-June-16, 11:24

If i had to quickly write up a sort routine from scratch, I'd probably do insertion.

I notice that bridge players that use insertion sort to sort their hand do so incredibly slowly (usually this involves leaving all the cards face down and then picking them up one at a time). Then again, I don't know anyone that actually uses bubble sort or the like.

For sorting my bridge hand, I use some kind of greedy heuristic thing. I just make random moves that look like they'll result in a more sorted hand until it looks "good enough".
0

#7 User is offline   gwnn 

  • Csaba the Hutt
  • PipPipPipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 13,027
  • Joined: 2006-June-16
  • Gender:Male
  • Interests:bye

Posted 2010-June-16, 11:31

When there are relatively limited possibilities you can always just go through all of them and count them. This is what I do with my bridge hands (the "count" being 0 or 1), go from Ace of Spades and down from there. I know this has a nice name in informatics but I don't know it.

BTW nice British spelling dude.
... and I can prove it with my usual, flawless logic.
      George Carlin
0

#8 User is offline   jjbrr 

  • PipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 3,525
  • Joined: 2009-March-30
  • Gender:Male

Posted 2010-June-16, 11:45

as far as sorting bridge hands, I think I'm most apt to do something like a bucket sort.
OK
bed
0

#9 User is offline   OleBerg 

  • PipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 1,950
  • Joined: 2008-April-05
  • Gender:Male
  • Location:Copenhagen
  • Interests:Model-Railways.

Posted 2010-June-16, 12:17

Rum sort.
_____________________________________

Do not underestimate the power of the dark side. Or the ninth trumph.

Best Regards Ole Berg

_____________________________________

We should always assume 2/1 unless otherwise stated, because:

- If the original poster didn't bother to state his system, that means that he thinks it's obvious what he's playing. The only people who think this are 2/1 players.


Gnasher
0

#10 User is offline   Fluffy 

  • World International Master without a clue
  • PipPipPipPipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 17,404
  • Joined: 2003-November-13
  • Gender:Male
  • Location:madrid

Posted 2010-June-16, 14:09

I don't know the english names, when it comes to sorting I tend to use the simple find the highests, put it first, find the second highest, put it second

wich is the worse sorting method, but simplst to programme normally and I don't care much about performance.
0

#11 User is offline   kenberg 

  • PipPipPipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 11,277
  • Joined: 2004-September-22
  • Location:Northern Maryland

Posted 2010-June-16, 14:16

Socks on the left, underwear on the right.
Ken
0

#12 User is offline   luke warm 

  • PipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 6,951
  • Joined: 2003-September-07
  • Gender:Male
  • Interests:Bridge, poker, politics

Posted 2010-June-16, 15:42

kenberg, on Jun 16 2010, 03:16 PM, said:

Socks on the left, underwear on the right.

socks in the top drawer, underwear in the next lower one... btw i fold my tee shirts like they do in that youtube thingy
"Paul Krugman is a stupid person's idea of what a smart person sounds like." Newt Gingrich (paraphrased)
0

#13 User is offline   Apollo81 

  • PipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 3,162
  • Joined: 2006-July-10
  • Gender:Male
  • Location:Maryland

Posted 2010-June-16, 20:19

how could you leave out bogosort
0

#14 User is offline   MarkDean 

  • PipPipPipPipPip
  • Group: Full Members
  • Posts: 595
  • Joined: 2008-April-30
  • Location:Pleasanton, CA, US

Posted 2010-June-16, 20:43

I am definitely going to have to merge-sort my hand next time I play live bridge.
0

#15 User is offline   y66 

  • PipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 6,497
  • Joined: 2006-February-24

Posted 2010-June-16, 22:22

I use classes that have built-in sort methods and SQL "order by" to sort as much as possible on the database server. I don't care how sorting is implemented.
If you lose all hope, you can always find it again -- Richard Ford in The Sportswriter
0

#16 User is offline   Phil 

  • PipPipPipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 10,093
  • Joined: 2008-December-11
  • Gender:Male
  • Location:North Texas, USA
  • Interests:Mountain Biking

Posted 2010-June-16, 23:20

I definitely have a pattern when I duplicate hands (short suits first).

I've never really noticed anything how I sort my hand, other than I do it differently than most other people. Seems I can do it in 3-5 movements usually.
Hi y'all!

Winner - BBO Challenge bracket #6 - February, 2017.
0

#17 User is offline   hanp 

  • PipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 2,987
  • Joined: 2009-February-15

Posted 2010-June-17, 03:21

Approximate Sort. Fast and usually good enough.
and the result can be plotted on a graph.
0

#18 User is offline   Apollo81 

  • PipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 3,162
  • Joined: 2006-July-10
  • Gender:Male
  • Location:Maryland

Posted 2010-June-19, 22:53

y66, on Jun 17 2010, 12:22 AM, said:

I use classes that have built-in sort methods and SQL "order by" to sort as much as possible on the database server. I don't care how sorting is implemented.

I used to use SortedSet all the time, but stopped when I noticed a significant performance difference between this and non-sorted classes when dealing with large numbers of records. Now I try to avoid sorting when it's not necessary.
0

#19 User is offline   rogerclee 

  • PipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 3,214
  • Joined: 2007-December-16
  • Location:Pasadena, CA

Posted 2010-June-19, 23:10

n! sort
0

#20 User is offline   Apollo81 

  • PipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 3,162
  • Joined: 2006-July-10
  • Gender:Male
  • Location:Maryland

Posted 2010-June-21, 08:10

rogerclee, on Jun 20 2010, 01:10 AM, said:

n! sort

http://en.wikipedia.org/wiki/Bogosort
0

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users