InterviewSolution
Saved Bookmarks
| 1. |
The growth factor of ArrayList in Java is _______(a) 1(b) 1.5(c) 2(d) 0Origin of the question is Dynamic Array topic in division Arrays Types of Data Structures & Algorithms IThe question was posed to me during a job interview. |
|
Answer» RIGHT answer is (B) 1.5 Explanation: The growth FACTOR of dynamic arrays (Array LIST) in Java is 3/2. The new array capacity is calculated as new_array_size = (old_array_size*3)/2+1. |
|