1)for the fst one you dont have to reverse the linked list just traverse the linked list recursively and read it from back . correct me if m wrong !
On Thu, Aug 11, 2011 at 12:41 AM, Piyush Kapoor <pkjee2...@gmail.com> wrote: > thanks all > > > On Thu, Aug 11, 2011 at 12:21 AM, siddharam suresh < > siddharam....@gmail.com> wrote: > >> 1)similar to list palindrome problem(soln already there in net) >> 2)it has discussed 2 day before on same group. please search once >> >> Thank you, >> Siddharam >> >> >> On Thu, Aug 11, 2011 at 12:01 AM, Piyush Kapoor <pkjee2...@gmail.com>wrote: >> >>> @naveen >>> for the first one,how will u traverse the list backwards.. >>> I didnt understand your second solution,since the head is not given so >>> how can u go from a node to the node to be deleted.. >>> >>> >>> I forgot that in the first one,we are not allowed to use extra memory. >>> Also do please mention the time complexity of your solutions.. >>> >>> On Wed, Aug 10, 2011 at 11:54 PM, Naveen Kumar < >>> naveenkumarve...@gmail.com> wrote: >>> >>>> for first reverse one of the link list by changing the pointer and >>>> than traverse one from backward and compare it the the other. >>>> >>>> for second. keep copying data from the next node to the node to be >>>> delete and remove the tail. This will not work if node to be deleted >>>> is the last node. >>>> >>>> On Wed, Aug 10, 2011 at 11:44 PM, Piyush Kapoor <pkjee2...@gmail.com> >>>> wrote: >>>> > Q1)Two linked Lists are given,i.e,their head pointers are given,and >>>> the >>>> > problem is to check if the second one is reverse of the first one.Give >>>> the >>>> > most efficient algo for it. >>>> > Q2)A linked list is given,and one of its nodes is given.The problem is >>>> to >>>> > delete the given node from the linked list.(The head node is not >>>> given). >>>> > (In both of the above cases,the linked lists are singly linked lists.) >>>> > -- >>>> > Regards, >>>> > Piyush Kapoor, >>>> > 2nd year,CSE >>>> > IT-BHU >>>> > >>>> > -- >>>> > You received this message because you are subscribed to the Google >>>> Groups >>>> > "Algorithm Geeks" group. >>>> > To post to this group, send email to algogeeks@googlegroups.com. >>>> > To unsubscribe from this group, send email to >>>> > algogeeks+unsubscr...@googlegroups.com. >>>> > For more options, visit this group at >>>> > http://groups.google.com/group/algogeeks?hl=en. >>>> > >>>> >>>> >>>> >>>> -- >>>> Cheers >>>> Naveen Kumar >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Algorithm Geeks" group. >>>> To post to this group, send email to algogeeks@googlegroups.com. >>>> To unsubscribe from this group, send email to >>>> algogeeks+unsubscr...@googlegroups.com. >>>> For more options, visit this group at >>>> http://groups.google.com/group/algogeeks?hl=en. >>>> >>>> >>> >>> >>> -- >>> *Regards,* >>> *Piyush Kapoor,* >>> *2nd year,CSE >>> IT-BHU* >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Algorithm Geeks" group. >>> To post to this group, send email to algogeeks@googlegroups.com. >>> To unsubscribe from this group, send email to >>> algogeeks+unsubscr...@googlegroups.com. >>> For more options, visit this group at >>> http://groups.google.com/group/algogeeks?hl=en. >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post to this group, send email to algogeeks@googlegroups.com. >> To unsubscribe from this group, send email to >> algogeeks+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> > > > > -- > *Regards,* > *Piyush Kapoor,* > *2nd year,CSE > IT-BHU* > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algogeeks@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.