Contact me:

摘要: #Drunk Post: Things I've learned as a Sr Engineer I'm drunk and I'll probably regret this, but here's a drunken rank of things I've learned as an engi 阅读全文
posted @ 2021-12-02 22:39 impwa 阅读(215) 评论(0) 推荐(0) 编辑
摘要: ##题目 给定一个二叉树,检查它是否是镜像对称的。 例如,二叉树 [1,2,2,3,4,4,3] 是对称的。 1 / \ 2 2 / \ / \ 3 4 4 3 但是下面这个 [1,2,2,null,3,null,3] 则不是镜像对称的: 1 / \ 2 2 \ \ 3 3 进阶: 你可以运用递归和 阅读全文
posted @ 2021-12-02 17:08 impwa 阅读(21) 评论(0) 推荐(0) 编辑
摘要: 种一棵二叉树最好的时间是十年前,其次是现在:smile:。 先讲一下前序、中序、后序遍历, 其实就是(访问当前节点的值的代码cout<<(root->val)<<endl;)与递归代码(递归左右节点)位置关系来区分 ##二叉树遍历类型 ###前序遍历 {//前序遍历 if (root==nullpt 阅读全文
posted @ 2021-12-02 11:55 impwa 阅读(218) 评论(0) 推荐(0) 编辑