Click here to Skip to main content
15,897,518 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: how to convert an array of records into a hierarchical structure Pin
harold aptroot29-Jul-10 3:04
harold aptroot29-Jul-10 3:04 
GeneralRe: how to convert an array of records into a hierarchical structure Pin
makumazan8429-Jul-10 6:01
makumazan8429-Jul-10 6:01 
GeneralRe: how to convert an array of records into a hierarchical structure Pin
harold aptroot29-Jul-10 6:07
harold aptroot29-Jul-10 6:07 
GeneralRe: how to convert an array of records into a hierarchical structure Pin
harold aptroot2-Aug-10 4:51
harold aptroot2-Aug-10 4:51 
AnswerRe: how to convert an array of records into a hierarchical structure Pin
T M Gray2-Aug-10 8:41
T M Gray2-Aug-10 8:41 
GeneralRe: how to convert an array of records into a hierarchical structure Pin
harold aptroot2-Aug-10 8:56
harold aptroot2-Aug-10 8:56 
GeneralRe: how to convert an array of records into a hierarchical structure Pin
getroshan6-Sep-10 21:47
getroshan6-Sep-10 21:47 
AnswerRe: how to convert an array of records into a hierarchical structure Pin
Andrew Rissing11-Oct-10 4:12
Andrew Rissing11-Oct-10 4:12 
Borrowing from SQL, you might want to look at this: Modified Preorder Tree Traversal Algorithm[^]

It's intended for non-cyclic trees and is optimized for reading. It's a little complicated to setup, but is quite efficient (O(n)) for recursive lookups.

I don't have a C# implementation, but it could easily be done in a DataTable and retrieved from there. You could also add a depth to the table allowing for recursive pulls that would stop after X levels down.

Anyways, see if that helps.
GeneralAutomatic Assignment Pin
alkowarizmi27-Jul-10 14:38
alkowarizmi27-Jul-10 14:38 
AnswerRe: Automatic Assignment Pin
Luc Pattyn27-Jul-10 14:58
sitebuilderLuc Pattyn27-Jul-10 14:58 
GeneralRe: Automatic Assignment Pin
alkowarizmi28-Jul-10 3:47
alkowarizmi28-Jul-10 3:47 
GeneralRe: Automatic Assignment Pin
Luc Pattyn28-Jul-10 4:04
sitebuilderLuc Pattyn28-Jul-10 4:04 
GeneralRe: Automatic Assignment Pin
Yusuf28-Jul-10 4:07
Yusuf28-Jul-10 4:07 
GeneralRe: Automatic Assignment Pin
getroshan7-Sep-10 0:44
getroshan7-Sep-10 0:44 
QuestionWANTED: Programmer looking for an algorithmic challenge PinPopular
Xpnctoc23-Jul-10 5:58
Xpnctoc23-Jul-10 5:58 
AnswerRe: WANTED: Programmer looking for an algorithmic challenge Pin
PIEBALDconsult23-Jul-10 17:01
mvePIEBALDconsult23-Jul-10 17:01 
AnswerRe: WANTED: Programmer looking for an algorithmic challenge Pin
ProtoBytes24-Jul-10 11:57
ProtoBytes24-Jul-10 11:57 
GeneralRe: WANTED: Programmer looking for an algorithmic challenge Pin
Xpnctoc24-Jul-10 12:09
Xpnctoc24-Jul-10 12:09 
AnswerRe: WANTED: Programmer looking for an algorithmic challenge Pin
ProtoBytes24-Jul-10 12:56
ProtoBytes24-Jul-10 12:56 
GeneralRe: WANTED: Programmer looking for an algorithmic challenge Pin
Xpnctoc25-Jul-10 8:29
Xpnctoc25-Jul-10 8:29 
GeneralRe: WANTED: Programmer looking for an algorithmic challenge Pin
ProtoBytes25-Jul-10 8:59
ProtoBytes25-Jul-10 8:59 
GeneralRe: WANTED: Programmer looking for an algorithmic challenge Pin
Xpnctoc25-Jul-10 10:45
Xpnctoc25-Jul-10 10:45 
AnswerRe: WANTED: Programmer looking for an algorithmic challenge [modified] Pin
Luc Pattyn25-Jul-10 12:12
sitebuilderLuc Pattyn25-Jul-10 12:12 
AnswerRe: WANTED: Programmer looking for an algorithmic challenge Pin
Member 419459325-Jul-10 12:52
Member 419459325-Jul-10 12:52 
QuestionGet the angle in radians of a shape made up with 2D points? Pin
venomation20-Jul-10 9:01
venomation20-Jul-10 9:01 

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.