This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
In an interview I was asked to write a code for dynamic array. Though I managed something I was not sure it was optimal. The following is somewhat similar to what I had attempted. Can someone help me iron out problems, if any, in the following code.
Welcome to the Ranch
In addition ot what Winston told you, I trust you pointed out there is no such thing as a dynamic array and that you need to replace the array with a new one rather than changing its size.
Sumit Suresh Rao
Joined: Feb 16, 2009
Thank you Winston Gutkowski.
there is no such thing as a dynamic array
@Campbell, just wanted an array to exhibit dynamic behaviour.
Joined: Oct 13, 2005
You should not let people get away with sloppy nomenclature. Remember if that is an interview question, they would expect you to say there is no such thing as a dynamic array. Such questions are worded to trap you.