自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(19)
  • 收藏
  • 关注

原创 leetcode590. N 叉树的后序遍历

题目链接https://leetcode-cn.com/problems/n-ary-tree-postorder-traversal/解题代码/*// Definition for a Node.class Node {public: int val; vector<Node*> children; Node() {} Node(int _val) { val = _val; } Node(int _val,

2021-03-26 16:02:44 149

原创 leetcode589. N 叉树的前序遍历

题目链接https://leetcode-cn.com/problems/n-ary-tree-preorder-traversal/解题代码/*// Definition for a Node.class Node {public: int val; vector<Node*> children; Node() {} Node(int _val) { val = _val; } Node(int _val, v

2021-03-26 15:56:18 157

原创 leetcode938. 二叉搜索树的范围和

题目链接https://leetcode-cn.com/problems/range-sum-of-bst/解题代码/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * T

2021-03-26 13:59:58 176

原创 leetcode897. 递增顺序查找树

题目链接https://leetcode-cn.com/problems/increasing-order-search-tree/解题代码/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr)

2021-03-26 13:13:13 110

原创 leetcode872. 叶子相似的树

题目链接https://leetcode-cn.com/problems/leaf-similar-trees/解题代码/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} *

2021-03-26 12:11:43 114

原创 leetcode671. 二叉树中第二小的节点

题目链接https://leetcode-cn.com/problems/second-minimum-node-in-a-binary-tree/解题代码/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right

2021-03-26 11:55:53 116

原创 leetcode572. 另一个树的子树

题目链接https://leetcode-cn.com/problems/subtree-of-another-tree/解题代码/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {}

2021-03-26 11:07:31 60

原创 剑指 Offer 55 - I. 二叉树的深度

题目链接https://leetcode-cn.com/problems/er-cha-shu-de-shen-du-lcof/解题代码/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {}

2021-03-25 19:14:48 101

原创 leetcode700. 二叉搜索树中的搜索

题目链接https://leetcode-cn.com/problems/search-in-a-binary-search-tree/解题代码/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullpt

2021-03-25 19:01:07 70

原创 leetcode965. 单值二叉树

题目链接https://leetcode-cn.com/problems/univalued-binary-tree/解题代码/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }

2021-03-25 17:06:37 67

原创 leetcode559. N 叉树的最大深度

链接https://leetcode-cn.com/problems/maximum-depth-of-n-ary-tree/解题代码/*// Definition for a Node.class Node {public: int val; vector<Node*> children; Node() {} Node(int _val) { val = _val; } Node(int _val, vector

2021-03-25 16:34:27 66

原创 leetcode617. 合并二叉树

链接https://leetcode-cn.com/problems/merge-two-binary-trees/解题代码/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} *

2021-03-25 15:51:22 78

原创 leetcode501. 二叉搜索树中的众数

题目描述,链接https://leetcode-cn.com/problems/find-mode-in-binary-search-tree/解题代码/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nu

2021-03-25 13:56:33 79

原创 leetcode404. 左叶子之和

题目描述,链接https://leetcode-cn.com/problems/sum-of-left-leaves/解题代码/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }

2021-03-25 13:20:06 78

原创 leetcode257. 二叉树的所有路径

题目描述,链接https://leetcode-cn.com/problems/binary-tree-paths/解题代码/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} *

2021-03-25 12:31:20 74

原创 leetcode235. 二叉搜索树的最近公共祖先(剑指 Offer 68 - I. 二叉搜索树的最近公共祖先)

题目详情,链接https://leetcode-cn.com/problems/lowest-common-ancestor-of-a-binary-search-tree/解题代码/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), lef

2021-03-25 11:35:08 79

原创 leetcode 226. 翻转二叉树(剑指 Offer 27. 二叉树的镜像)

226. 翻转二叉树以下是实现代码,运用了递归函数,将问题拆分成一个个可以解决的小问题。/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x)

2021-03-25 11:02:50 107

原创 批量转换3D数据文件格式【附代码】

本篇博文介绍使用MeshLab批量转换三维数据格式的方法,以stl文件转换成xyz格式为例。  MeshLab支持的输入输出格式:.ply, .stl, .obj, .qobj, off, .ptx, .vmi, .bre, .dae, .ctm, .pts, .apts, .xyz, .gts, .pdb, .tri, .asc, .txt, .x3d, .x3dv, .wrl。  stl文件格式:用三角网格来表现3D模型,只能描述几何信息,不包含颜色、纹理贴图等信息。  xyz文件格式:可以用来

2020-06-01 15:56:40 3106 1

原创 Win10+anaconda3配置pytorch环境

Win10+anaconda3配置pytorch环境博主需要做一个深度学习方面的项目,要用到pytorch。下面记录了win10系统配置pytorch的过程。本机环境下面罗列一下我的系统环境:Windows10python3.6.10cuda10.2一、使用anaconda创建新虚拟环境1、打开Anaconda Navigator,在左边栏选择Environments。2、选择中间栏的“+”(create)按钮,创建新的虚拟环境,命名为pyenv,选择python版本为3.6。二

2020-05-15 16:50:14 791 2

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除