Why does Java grow with ArrayList at 3/2?

Why does Java produce a full array in 3/2 instead of 2?

"The choice of a depends on the library or application: some tutorials use a = 2, but the Java implementation of ArrayList uses a = 3/2 and the C implementation of the Python list data structure uses a = 9/8."

wikipedia source

+4
source share
2 answers

, . ( ) ( ). , , . , 3/2 Java, , - , .

+4

, : # . " " , .

, 1.5 , " ".

0

Source: https://habr.com/ru/post/1525769/


All Articles