Merge pull request #2336 from DanielChungYi/patch-1

[typo fix]: Update kama54.替换数字
This commit is contained in:
程序员Carl 2023-11-17 09:17:05 +08:00 committed by GitHub
commit c300b19b4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@
从前向后填充就是O(n^2)的算法了,因为每次添加元素都要将添加元素之后的所有元素整体向后移动。 从前向后填充就是O(n^2)的算法了,因为每次添加元素都要将添加元素之后的所有元素整体向后移动。
**其实很多数组填充类的问题,其做都是先预先给数组扩容带填充后的大小,然后在从后向前进行操作。** **其实很多数组填充类的问题,其做都是先预先给数组扩容带填充后的大小,然后在从后向前进行操作。**
这么做有两个好处: 这么做有两个好处: