Click here to Skip to main content
15,889,281 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: .GetHashCode doesn't match (x86 vs x64)? Pin
supercat919-Aug-09 14:34
supercat919-Aug-09 14:34 
GeneralRe: .GetHashCode doesn't match (x86 vs x64)? Pin
francoisdotnet19-Aug-09 20:43
francoisdotnet19-Aug-09 20:43 
AnswerRe: MD5CryptoServiceProvider's ComputeHash doesn't match (x86 vs x64)? Pin
Luc Pattyn20-Aug-09 0:49
sitebuilderLuc Pattyn20-Aug-09 0:49 
QuestionVariable Depth For Loop to create a number sequence... Pin
Aaron @ Think Software17-Aug-09 14:46
professionalAaron @ Think Software17-Aug-09 14:46 
Answer[CrossPost] Variable Depth For Loop to create a number sequence... Pin
Scott Dorman17-Aug-09 15:35
professionalScott Dorman17-Aug-09 15:35 
AnswerRe: Variable Depth For Loop to create a number sequence... Pin
Alan Balkany18-Aug-09 9:44
Alan Balkany18-Aug-09 9:44 
Questiontree recursive traversing . Pin
devboycpp15-Aug-09 5:18
devboycpp15-Aug-09 5:18 
AnswerRe: tree recursive traversing . Pin
Moreno Airoldi15-Aug-09 7:28
Moreno Airoldi15-Aug-09 7:28 
I'm not sure if this is exactly what you need, but I was thinking along the lines of a modified breadth-first search[^] algorithm:

1) Enqueue all the children of your parent node, setting their depth to 1 (or 0).
2) Examine the next node in the queue.
3) If it has children, enqueue all children, setting their depth to the depth of their parent + 1, and dequeue the node.
4) If it has no children, leave it in the queue.
5) When you have only childless nodes in the queue (i.e. you don't have a next node to process), proceed to step 6, otherwise go back to step 2.
6) Your queue now contains all childless nodes, and those with higher depth are the ones you are looking for.
7) Examine all nodes with higher depth and determine which is the "last node in terms of its siblings" (I guess you have some specific node property to do this ?)

Hope it can be of some help. Smile | :)

2+2=5 for very large amounts of 2
(always loved that one hehe!)

QuestionRegarding time complexity Pin
kirancgi14-Aug-09 1:04
kirancgi14-Aug-09 1:04 
AnswerRe: Regarding time complexity [modified] Pin
Moreno Airoldi14-Aug-09 7:27
Moreno Airoldi14-Aug-09 7:27 
GeneralRe: Regarding time complexity Pin
kirancgi22-Aug-09 6:43
kirancgi22-Aug-09 6:43 
QuestionHi, I'm a freshman for the Digtal image processing, I wonder if HMM or Markov model is the right choice for target tracking. Pin
superwave6-Aug-09 21:51
superwave6-Aug-09 21:51 
AnswerRe: Hi, I'm a freshman for the Digtal image processing, I wonder if HMM or Markov model is the right choice for target tracking. Pin
fresi8-Aug-09 1:50
fresi8-Aug-09 1:50 
GeneralRe: Hi, I'm a freshman for the Digtal image processing, I wonder if HMM or Markov model is the right choice for target tracking. Pin
superwave8-Aug-09 3:27
superwave8-Aug-09 3:27 
GeneralRe: Hi, I'm a freshman for the Digtal image processing, I wonder if HMM or Markov model is the right choice for target tracking. Pin
Tim Craig9-Aug-09 8:48
Tim Craig9-Aug-09 8:48 
GeneralRe: Hi, I'm a freshman for the Digtal image processing, I wonder if HMM or Markov model is the right choice for target tracking. [modified] Pin
superwave9-Aug-09 18:33
superwave9-Aug-09 18:33 
QuestionHow to extract data from web Pin
Rakesh Ranjan Dey6-Aug-09 2:17
Rakesh Ranjan Dey6-Aug-09 2:17 
AnswerRe: How to extract data from web Pin
Super Lloyd6-Aug-09 3:13
Super Lloyd6-Aug-09 3:13 
QuestionNeed some logic help. Pin
benjamin yap4-Aug-09 15:00
benjamin yap4-Aug-09 15:00 
AnswerRe: Need some logic help. Pin
Luc Pattyn4-Aug-09 15:38
sitebuilderLuc Pattyn4-Aug-09 15:38 
GeneralRe: Need some logic help. [modified] Pin
benjamin yap4-Aug-09 17:18
benjamin yap4-Aug-09 17:18 
GeneralRe: Need some logic help. Pin
Luc Pattyn4-Aug-09 23:25
sitebuilderLuc Pattyn4-Aug-09 23:25 
QuestionLexical Analysis Useful for Other Things as Well? Pin
Richard Andrew x644-Aug-09 5:31
professionalRichard Andrew x644-Aug-09 5:31 
AnswerRe: Lexical Analysis Useful for Other Things as Well? Pin
Luc Pattyn4-Aug-09 6:13
sitebuilderLuc Pattyn4-Aug-09 6:13 
AnswerRe: Lexical Analysis Useful for Other Things as Well? Pin
N a v a n e e t h4-Aug-09 7:57
N a v a n e e t h4-Aug-09 7:57 

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.