摘要: 学习资料:https://programmercarl.com/0235.二叉搜索树的最近公共祖先.html**** 学习记录: 235.二叉搜索树的最近公共祖先(加一个函数traversal) 点击查看代码 # Definition for a binary tree node. # class 阅读全文
posted @ 2024-10-18 22:18 Tristan241001 阅读(20) 评论(0) 推荐(0)
摘要: 学习资料:https://programmercarl.com/0530.二叉搜索树的最小绝对差.html 530.二叉搜索树的最小绝对差(双指针法,pre&cur,设置最小差值初始为无穷大,当差值<最小差值就更新最小差值) 点击查看代码 # Definition for a binary tree 阅读全文
posted @ 2024-10-18 22:10 Tristan241001 阅读(12) 评论(0) 推荐(0)