[algogeeks] Interesting Liked List problem..Suggest Algo

2011-12-15 Thread Ankur Garg
Twisted linked list problem: Two linked lists merge at some node p,both the head pointers are given find the merging point under the following restrictions. 1. You should not traverse to the end any of the linked list. 2. Merge node p should be detected by the time you reach at most most k nodes

Re: [algogeeks] Interesting Liked List problem..Suggest Algo

2011-12-15 Thread Ravi Ranjan
in the link list take another variable suppose toggle and initialize all with 0,,, at the time of declaring the link list( so no traversal of entire link list).. now starting from both head traverse a single element at a time but in alternating way... for one linklist the toggling value is set to

Re: [algogeeks] Interesting Liked List problem..Suggest Algo

2011-12-15 Thread atul anand
seem like very twisted problem :P :P . lot of restriction. On Thu, Dec 15, 2011 at 7:30 PM, Ankur Garg ankurga...@gmail.com wrote: Twisted linked list problem: Two linked lists merge at some node p,both the head pointers are given find the merging point under the following restrictions. 1.

Re: [algogeeks] Interesting Liked List problem..Suggest Algo

2011-12-15 Thread atul anand
@Ravi : your solution will not work for all the cases because of the restriction * * *1)You should not traverse to the end any of the linked list.* * * now consider one linked list to be very large while other is very small say 1/5 of the large one. now because second linked list is short and it

Re: [algogeeks] Interesting Liked List problem..Suggest Algo

2011-12-15 Thread atul anand
@Ravi : if your solution is acceptable then there is no need ok modifying data structure. we can use hashMap which table address and count as an input. then we can move in same fashion as you have mentioned , if count is of given address is 1 then it means that address is the intersection point.

Re: [algogeeks] Interesting Liked List problem..Suggest Algo

2011-12-15 Thread Ravi Ranjan
i got my mistake.. den how to fulfill all the conditions?? -- 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