Hi , Can you explain it little bit more. Do you mean there will be 10 nubmers contineously decreasing/increasing order?
If this is the case then it is wrong. I can have all the hundred number 1,2,3,4,5...
and i will just flip 2,1,4,3,6,5 and so on.
The question is not clear but It is possible that
A->next = B, B->next=C; C->next=D and so on.
Later you have another node say,
T->next= C. What would you say to this. It means the second linked list somewhere is going to join another list.
I assume that it is a single linked list. Now If the two list is intersecting then they will have the single tail. so just go to boths tail and compare it.
How to find the point of interesection.
1) Find the length of both the list. let us say M and N.
2) now let us say M is bigger one. then find out the difference. d=M-N.
3) mow move d pointer on the bigger list.
now onward both this list has same length and they are going to merge also. So just move one node on both the list and compare nodes value. It will give u the node u are looking for.
francesdpayne, AT&T Customer service email at Cavium Networks
I am Frances Payne from Jacksonville, United States. I am working as a Rental manager in Magna Gases company. I ...
I am Ricky from the USA. I am 29 year old. I am doing a job. I am doing a ...
verarfurman, Problem Setter at Cerberus Capital
I am Vera from Bullard USA, I am working as a Violin repairer in a Handyman company. My interest in ...
josebowlin78, Aircraft engineer at CSK Auto
I am an Aircraft engineer . My role as an aircraft engineer involves the application of scientific and technological principles to ...
Can you explain the problem little bit more. It seems that services are like a circular queue, and the order are put in one by one. now when m>n then you dont have services left to process the order. It can be solved if you dynamically add few more services.- dhirejha June 28, 2010