Click here to Skip to main content
15,888,286 members
Home / Discussions / Algorithms
   

Algorithms

 
AnswerRe: Rotation of Bitmap [modified] Pin
Luc Pattyn5-Apr-09 16:30
sitebuilderLuc Pattyn5-Apr-09 16:30 
GeneralRe: Rotation of Bitmap Pin
CodeOfLife6-Apr-09 6:37
CodeOfLife6-Apr-09 6:37 
GeneralRe: Rotation of Bitmap Pin
Luc Pattyn6-Apr-09 6:59
sitebuilderLuc Pattyn6-Apr-09 6:59 
QuestionCreating RSOM from SOM Pin
Jasmine Pomelo4-Apr-09 14:04
Jasmine Pomelo4-Apr-09 14:04 
QuestionRe: Creating RSOM from SOM Pin
CPallini6-Apr-09 21:39
mveCPallini6-Apr-09 21:39 
AnswerRe: Creating RSOM from SOM Pin
Jasmine Pomelo9-Apr-09 9:38
Jasmine Pomelo9-Apr-09 9:38 
QuestionSingle Elimination - Tournament Brackets Pin
aslamc2-Apr-09 9:32
aslamc2-Apr-09 9:32 
AnswerRe: Single Elimination - Tournament Brackets Pin
Alan Balkany3-Apr-09 4:00
Alan Balkany3-Apr-09 4:00 
You create a binary tree where the leaves represent the tournament's contestants. Each pair of contestants under an interior node play a match, and the winner then occupies that interior node.

Likewise, an interior node that has two other interior nodes under it represents the winner of the match between the winners corresponding to those two interior nodes.

The root of the binary tree represents the winner of the tournament.

Tree construction: One approach uses the Composite design pattern, an abstract Node class with two derived classes: Contestant and InteriorNode. Start with a list of Contestants. While that list has more than one element, combine two elements under a new InteriorNode, remove those elements from the list, and insert the new InteriorNode in the list. The list should be ordered by increasing depth, so that, for example, all Contestants are paired before any InteriorNodes are paired.

When the list is down to one element, that's the root of the tree.

modified on Friday, April 3, 2009 10:21 AM

QuestionTree algo Pin
dfreeser2-Apr-09 5:58
dfreeser2-Apr-09 5:58 
AnswerRe: Tree algo Pin
Alan Balkany3-Apr-09 3:43
Alan Balkany3-Apr-09 3:43 
GeneralRe: Tree algo Pin
dfreeser3-Apr-09 5:15
dfreeser3-Apr-09 5:15 
GeneralRe: Tree algo Pin
Alan Balkany3-Apr-09 5:42
Alan Balkany3-Apr-09 5:42 
GeneralRe: Tree algo Pin
dfreeser3-Apr-09 6:02
dfreeser3-Apr-09 6:02 
GeneralRe: Tree algo Pin
Alan Balkany3-Apr-09 6:16
Alan Balkany3-Apr-09 6:16 
GeneralRe: Tree algo Pin
dfreeser3-Apr-09 6:33
dfreeser3-Apr-09 6:33 
Questioncalculate polygon area and its centre in 3d Pin
beko31-Mar-09 22:57
beko31-Mar-09 22:57 
AnswerRe: calculate polygon area and its centre in 3d Pin
Alan Balkany1-Apr-09 3:46
Alan Balkany1-Apr-09 3:46 
GeneralRe: calculate polygon area and its centre in 3d Pin
beko1-Apr-09 19:26
beko1-Apr-09 19:26 
AnswerRe: calculate polygon area and its centre in 3d Pin
cp98761-Apr-09 20:10
cp98761-Apr-09 20:10 
QuestionStable Quicksort algorithm Pin
Member 419459331-Mar-09 6:04
Member 419459331-Mar-09 6:04 
AnswerRe: Stable Quicksort algorithm Pin
Lutosław31-Mar-09 12:39
Lutosław31-Mar-09 12:39 
GeneralRe: Stable Quicksort algorithm Pin
Member 419459331-Mar-09 16:06
Member 419459331-Mar-09 16:06 
AnswerRe: Stable Quicksort algorithm Pin
Stephen Hewitt31-Mar-09 17:11
Stephen Hewitt31-Mar-09 17:11 
GeneralRe: Stable Quicksort algorithm Pin
Member 41945931-Apr-09 17:16
Member 41945931-Apr-09 17:16 
GeneralRe: Stable Quicksort algorithm Pin
supercat93-Apr-09 6:22
supercat93-Apr-09 6:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.