Hello all,

I am currently studying for my DataStructures final examination and there is one thing that i just can never grasb. I cant seem to be able to recursivly define abstract data structures such as linked bags, lists, sets, stacks, queues, deques, ect... I can never seem to figure out how to create the recursive definitions.

We always have a cons method (which will construct a new structure of the type, from like a head and tail), and equals, and getHead (or get first), getNext ect...

So this question may seem very vauge, but ive done a lot of reading for my exam, and i just can never seem to get the recursive definitions correct. Is there some kind of trick to it. I am doing this in Java if it helps :-)

Thanks for any tips, i know that this post may seem very unclear :-)

-William Battison
Laurentian University
Sudbury ON
Canada

It does seem very unclear. What do you mean by the recursive definitions? What does recursion have to do with a linked list, other than possibly traversing it (and still, why would you use recursion to do that?)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.