Click here to Skip to main content
15,892,161 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Vehicle routing problem for large graph Pin
harold aptroot8-Mar-20 4:28
harold aptroot8-Mar-20 4:28 
GeneralRe: Vehicle routing problem for large graph Pin
Member 147325528-Mar-20 6:41
Member 147325528-Mar-20 6:41 
GeneralRe: Vehicle routing problem for large graph Pin
harold aptroot8-Mar-20 7:48
harold aptroot8-Mar-20 7:48 
GeneralRe: Vehicle routing problem for large graph Pin
Member 147325528-Mar-20 8:07
Member 147325528-Mar-20 8:07 
AnswerRe: Vehicle routing problem for large graph Pin
Hailu Worku Obsse17-Mar-20 20:15
professionalHailu Worku Obsse17-Mar-20 20:15 
QuestionRecursion Pin
Member 1475643326-Feb-20 10:10
Member 1475643326-Feb-20 10:10 
AnswerRe: Recursion Pin
Daniel Pfeffer26-Feb-20 21:22
professionalDaniel Pfeffer26-Feb-20 21:22 
GeneralRe: Recursion Pin
Member 1475643326-Feb-20 22:39
Member 1475643326-Feb-20 22:39 
Hi Daniel,

I don't understand your third call of mergesort. The first time it calls (0,3) which is the first and last index of the array.
The second time it calls (0,1), which is the first half, or first two indexes in the list.
But then why is it going to (2,3) ?
Surely as 0<1, the function would give (0,0) at which point it would exit finding the left half as the base condition has been met ?
I've read it then retains the value of (0,1), which is then passed into the second instance of mergesort (mid +1,high), to give (1,1), which means the left and right sides are both ready to be merged ?
I'll try to think of it more in terms of a stack, thanks for the pointer on that. I know how to program stacks, so I might try something this afternoon to see if I can get a full picture of whats going on underneath the recursive process,
Thanks for your help Smile | :)
GeneralRe: Recursion Pin
Daniel Pfeffer26-Feb-20 23:25
professionalDaniel Pfeffer26-Feb-20 23:25 
GeneralRe: Recursion Pin
Member 1475643326-Feb-20 23:33
Member 1475643326-Feb-20 23:33 
QuestionNegating a number Pin
Nand3219-Feb-20 2:53
Nand3219-Feb-20 2:53 
AnswerRe: Negating a number PinPopular
Richard MacCutchan19-Feb-20 3:04
mveRichard MacCutchan19-Feb-20 3:04 
GeneralRe: Negating a number Pin
Nand3219-Feb-20 3:08
Nand3219-Feb-20 3:08 
GeneralRe: Negating a number Pin
Richard MacCutchan19-Feb-20 3:47
mveRichard MacCutchan19-Feb-20 3:47 
AnswerRe: Negating a number PinPopular
Richard Deeming19-Feb-20 3:23
mveRichard Deeming19-Feb-20 3:23 
GeneralRe: Negating a number Pin
Nand3219-Feb-20 3:32
Nand3219-Feb-20 3:32 
QuestionLALR vs LR parsing Pin
honey the codewitch13-Feb-20 3:53
mvahoney the codewitch13-Feb-20 3:53 
AnswerRe: LALR vs LR parsing Pin
Member 1298255823-Feb-20 6:45
Member 1298255823-Feb-20 6:45 
GeneralRe: LALR vs LR parsing Pin
honey the codewitch23-Feb-20 7:29
mvahoney the codewitch23-Feb-20 7:29 
QuestionRouting algorithm Pin
Rocks10028-Jan-20 8:23
Rocks10028-Jan-20 8:23 
AnswerRe: Routing algorithm Pin
Richard Deeming28-Jan-20 9:43
mveRichard Deeming28-Jan-20 9:43 
GeneralRe: Routing algorithm Pin
Rocks10028-Jan-20 10:11
Rocks10028-Jan-20 10:11 
GeneralRe: Routing algorithm Pin
Rocks10028-Jan-20 11:36
Rocks10028-Jan-20 11:36 
AnswerRe: Routing algorithm Pin
Gerry Schmitz29-Jan-20 3:34
mveGerry Schmitz29-Jan-20 3:34 
QuestionAnalysis of Algorithm Pin
Zain Shoukat Sadozai22-Jan-20 19:46
Zain Shoukat Sadozai22-Jan-20 19:46 

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.