更新图片链接

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

6
problems/0226.翻转二叉树.md Normal file → Executable file
View File

@@ -10,7 +10,7 @@
翻转一棵二叉树。
![226.翻转二叉树](https://file.kamacoder.com/pics/20210203192644329.png)
![226.翻转二叉树](https://file1.kamacoder.com/i/algo/20210203192644329.png)
这道题目背后有一个让程序员心酸的故事,听说 Homebrew的作者Max Howell就是因为没在白板上写出翻转二叉树最后被Google拒绝了。真假不做判断全当一个乐子哈
@@ -35,7 +35,7 @@
如果要从整个树来看,翻转还真的挺复杂,整个树以中间分割线进行翻转,如图:
![226.翻转二叉树1](https://file.kamacoder.com/pics/20210203192724351.png)
![226.翻转二叉树1](https://file1.kamacoder.com/i/algo/20210203192724351.png)
可以发现想要翻转它,其实就把每一个节点的左右孩子交换一下就可以了。
@@ -55,7 +55,7 @@
我们下文以前序遍历为例,通过动画来看一下翻转的过程:
![翻转二叉树](https://code-thinking.cdn.bcebos.com/gifs/%E7%BF%BB%E8%BD%AC%E4%BA%8C%E5%8F%89%E6%A0%91.gif)
![翻转二叉树](https://file1.kamacoder.com/i/algo/%E7%BF%BB%E8%BD%AC%E4%BA%8C%E5%8F%89%E6%A0%91.gif)
我们来看一下递归三部曲: