@Harshal Your Solution is optimal but i think in this question whenever there is some space available in array we should be able to use that space for either of the stack. in your solution this thing is missing. I don't know the solution but i think it can be improved in a way to get the required
On Fri, Jun 3, 2011 at 12:31 PM, Harshal <[email protected]> wrote: > Divide the array into 3 equal parts and allow each stack to grow in its > space (1/3 of total.) > > > On Fri, Jun 3, 2011 at 11:54 AM, kumar vr <[email protected]> wrote: > >> >> Can you give an efficient way of implementing 3 stacks using a single >> array? >> >> -- >> 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?hl=en. >> > > > > -- > Harshal Choudhary, > III Year B.Tech CSE, > NIT Surathkal, Karnataka, India. > > > > -- > 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?hl=en. > -- Sunny Aggrawal B-Tech IV year,CSI Indian Institute Of Technology,Roorkee -- 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?hl=en.
