Thanks that seems to work. Now I just need to figure out the best way to resolution cycles if any.
On May 27, 1:58 am, Geoffrey Summerhayes <[EMAIL PROTECTED]> wrote: > On May 26, 11:49 am, Geoffrey Summerhayes <[EMAIL PROTECTED]> wrote: > > > > > For every element n > > If Xn=Yn And Xn>0 > > push(n,Temp) > > End If > > End For > > > While not empty(Temp) > > Missing a line, hopefully it was obvious. > > n <- pop(Temp) > > > push(n,Result) > > For each stack Sm > > If top(Sm)=n > > pop(Sm) > > increment(Y[top(Sm)]) > > If Y[top(Sm)] = X[top(Sm)] > > push(top(Sm),Temp) > > End If > > End If > > End For > > from an earlier version setting > the counts to zero shouldn't matter. > > > Xn<-Yn<-0 > > End While > > > ---- > > Geoff- Hide quoted text - > > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/algogeeks -~----------~----~----~----~------~----~------~--~---
