linked lists help

Having problems implementing circular linked lists.
Let X=(x1,x2,...xn) and  Y=(y1,y2..ym) be two circular linked lists. Need to write a algorithm to merge the two lists together to get linked list
T=(x1,y1,x2,y2...xm,ym,x,{m+1},...xn)if m<n and T=(x1,y1,x2,y2,...,xm,yn,y{n+1},...ym)cannot use any additional nodes.
Explain why this is a good or bad data structure.
ChloemorganAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ChloemorganAuthor Commented:
Edited text of question.
0
FuzzyLogicCommented:
Hi.

I'll not solve your problem, but I'll give you the direction.
You have two circular linked list, and pointers to the first element.
What you have to do is to save the pointer to the first node of each list, and start passing through the two lists togather. Link them togather by changing the pointers, but always check that you haven't returned to the first node of list. If list Y finished before list X, you don't have even to close the list, as the last element would be xn, and it points to x1.
If the X list ends before the Y list, you have to pass through the Y list in order to close the last node (ym) to x1.

Start implementing this small algorithm, and I'll help you if you got any problems in the code YOU will write.

As for the question (good or bad) you have to answer it yourself, as I've already finished my DataStructures course.

Fuzzy.
0
My name is MudSystems EngineerCommented:
Merge Simpson???

The merge, could be simple...
You have L1 and L2... and want to merge them in to another, i assume you have the Insert procedure, so why don't you "create" the new merged link on the fly using the links allready done...

i mean i don't get it what's the problem, how do you input the data??? with a Insert procedure, right??? well create the Merged link with the same procedure, but insted of inputting by the KB, use the data in the allready links, and swaping each item on each link.
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

My name is MudSystems EngineerCommented:
Fuzzy fuzzy fuzzy...
0
My name is MudSystems EngineerCommented:
:) opppsss i mean Littlecat littlecat littlecat <so it doesn't sound like a porn threat>... :)
0
ChloemorganAuthor Commented:
This question has a deletion request Pending
0
ChloemorganAuthor Commented:
I have solved my problem, the rude comments i recieved did not help
thanks
0
My name is MudSystems EngineerCommented:
This question no longer is pending deletion
0
My name is MudSystems EngineerCommented:
>>the rude comments i recieved did not help


The RUDE??? ??? ???

Now i got it, you don't wanna pay, fine, but next time, think about it, you're in my list pal...
0
My name is MudSystems EngineerCommented:
Opppsssss, i meant that as a comment, i mean answer...
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ChloemorganAuthor Commented:
Whatboy, that comment i made was npot referred to you. Sorry if you took it that way. Yes you did help me thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Pascal

From novice to tech pro — start learning today.