Skip to content

Commit ccbaa2b

Browse files
committed
Typo fix
Attempt 2, fixed one issue left a second first attempt.
1 parent fb5a6c9 commit ccbaa2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

episodes/optimisation-data-structures-algorithms.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ This is achieved by internally storing items in a static array.
5656
This array however can be longer than the list, so the current length of the list is stored alongside the array.
5757
When an item is appended, the list checks whether it has enough spare space to add the item to the end.
5858
If it doesn't, it will re-allocate a larger array, copy across the elements, and deallocate the old array.
59-
The item to be appended is then copied to the end and the counter which tracks the list's length is increemnted.
59+
The item to be appended is then copied to the end and the counter which tracks the list's length is incremented.
6060

6161
The amount the internal array grows by is dependent on the particular list implementation's growth factor.
6262
CPython for example uses [`newsize + (newsize >> 3) + 6`](https://github.com/python/cpython/blob/a571a2fd3fdaeafdfd71f3d80ed5a3b22b63d0f7/Objects/listobject.c#L74), which works out to an over allocation of roughly ~12.5%.

0 commit comments

Comments
 (0)