更新图片链接

This commit is contained in:
kama
2025-05-19 17:11:04 +08:00
parent b489cb69b5
commit ce6e658d14
315 changed files with 2499 additions and 1729 deletions

10
problems/数组总结篇.md Normal file → Executable file
View File

@@ -18,7 +18,7 @@
举一个字符数组的例子,如图所示:
<img src='https://code-thinking.cdn.bcebos.com/pics/%E7%AE%97%E6%B3%95%E9%80%9A%E5%85%B3%E6%95%B0%E7%BB%84.png' width=600> </img></div>
<img src='https://file1.kamacoder.com/i/algo/%E7%AE%97%E6%B3%95%E9%80%9A%E5%85%B3%E6%95%B0%E7%BB%84.png' width=600> </img></div>
需要两点注意的是
@@ -29,7 +29,7 @@
例如删除下标为3的元素需要对下标为3的元素后面的所有元素都要做移动操作如图所示
<img src='https://code-thinking.cdn.bcebos.com/pics/%E7%AE%97%E6%B3%95%E9%80%9A%E5%85%B3%E6%95%B0%E7%BB%841.png' width=600> </img></div>
<img src='https://file1.kamacoder.com/i/algo/%E7%AE%97%E6%B3%95%E9%80%9A%E5%85%B3%E6%95%B0%E7%BB%841.png' width=600> </img></div>
而且大家如果使用C++的话要注意vector 和 array的区别vector的底层实现是array严格来讲vector是容器不是数组。
@@ -37,7 +37,7 @@
那么二维数组直接上图,大家应该就知道怎么回事了
<img src='https://code-thinking.cdn.bcebos.com/pics/%E7%AE%97%E6%B3%95%E9%80%9A%E5%85%B3%E6%95%B0%E7%BB%842.png' width=600> </img></div>
<img src='https://file1.kamacoder.com/i/algo/%E7%AE%97%E6%B3%95%E9%80%9A%E5%85%B3%E6%95%B0%E7%BB%842.png' width=600> </img></div>
**那么二维数组在内存的空间地址是连续的么?**
@@ -45,7 +45,7 @@
看了下图,就应该明白了:
<img src='https://code-thinking.cdn.bcebos.com/pics/%E7%AE%97%E6%B3%95%E9%80%9A%E5%85%B3%E6%95%B0%E7%BB%843.png' width=600> </img></div>
<img src='https://file1.kamacoder.com/i/algo/%E7%AE%97%E6%B3%95%E9%80%9A%E5%85%B3%E6%95%B0%E7%BB%843.png' width=600> </img></div>
所以**Java的二维数组在内存中不是 `3*4` 的连续地址空间,而是四条连续的地址空间组成!**
@@ -125,7 +125,7 @@
## 总结
![](https://file.kamacoder.com/pics/数组总结.png)
![](https://file1.kamacoder.com/i/algo/数组总结.png)
这个图是 [代码随想录知识星球](https://programmercarl.com/other/kstar.html) 成员:[海螺人](https://wx.zsxq.com/dweb2/index/footprint/844412858822412),所画,总结的非常好,分享给大家。