Re: Array Shifting

[ Follow Ups ] [ Post Followup ] [ CS2704 Web Discussion Board ] [ FAQ ]

Posted by Aaron Dalton on March 20, 2001 at 15:49:45:

In Reply to: Array Shifting posted by Juan Romero Jr. on March 20, 2001 at 15:29:13:

: If I understand right, after the arrays are created, thier size will be fixed, for example, if we have 25 elements in an array, it will never be larger than 25 elements?? So in deleting an element that occurs at index 14, do we shift all the other array elements down to fill in the 14th location, or do we delete the data in that element, and leave it empty?

: Thanks,
: Juan

That's a personal choice. You can eitherkeep track of the size of the array or keep track of which spaces in the array are empty. Your implimentation could (concievibly) work either way. I don't think the physical representation of the array matters (as far as the spec is concerned). You just have to make sure that insert and delete work however you code your array

Follow Ups:

Post a Followup




Optional Link URL:
Link Title:
Optional Image URL:

[ Follow Ups ] [ Post Followup ] [ CS2704 Web Discussion Board ] [ FAQ ]