I have to implement a application that performs addition and subtraction of arbitrarily large positive integers. In doing so I am not allowed to use any math packages, only ADT's. I beleive a doubly linked list would be easiest and most efficient but am having trouble coding the idea. Thanks.
IMHO, I think it would be much easier to determine what Data Structure is best, if we had some idea of what the algorithm, that the original poster was thinking of using. You might get a better answer, and maybe some help, if you give us idea of how you are going to accomplish the task.
Without trying to sound snippy: That's for you to figure out. This sounds like a homework assigment, and we don't do peoples homework for them. If, on the other hand, you have an idea of what to do but have trouble implementing it, then come back here, and we'll be happy to help you get going again.
Originally posted by R Wall: Using an array how would the add method be implemented?
I don't think I'm giving too much away if I suggest you use some square boxes drawn on a piece of paper to simulate the arrays. Write the numbers in the square boxes, one digit per box. Put one number above the other. Then, try to recall the way you add two numbers (the way you learned when you were about 8 years old but now do without thinking). Convert that into Java code.