Description: Given the root of a binary tree, return the bottom-up level order traversal of its nodes' values. (i.e., from left to right, level by lev ...
分类:
其他好文 时间:
2021-03-15 11:13:18
阅读次数:
0
二叉树的前序、中序、后序遍历 每个节点会被经过3次,前序、中序、后序的区别在于:在哪一次经过该节点时对其进行访问。 2. 递归实现 traverseRecursive(BiTrNode<T>* node): basecase: if(node == nullptr) return; general: ...
分类:
编程语言 时间:
2021-03-15 11:08:04
阅读次数:
0
Check If a String Contains All Binary Codes of Size K (M) 题目 Given a binary string s and an integer k. Return True if every binary code of length k is ...
分类:
其他好文 时间:
2021-03-15 10:41:54
阅读次数:
0
1.防抖 防抖:在高频触发下,在n秒内只触发一次(非严格)。如果n秒内再次触发,则重新计时 //实现debounce function debounce(fn){ let timer = null //创建一个命名存放定时器返回值 return function (){ clearTimeout(t ...
分类:
编程语言 时间:
2021-03-15 10:29:33
阅读次数:
0
# author: zhaoboomboom# time: 2021/3/12# 三元运算符存在的意义在于让代码变得更加简洁,易懂(个人理解)# 实现表达式: res = if判断成立的结果 if 变量判断语句 else else成立的结果# 例子: r = '不及格' if s <60 else ...
分类:
编程语言 时间:
2021-03-12 14:41:45
阅读次数:
0
1、DataGrid注册左键事件,点击有效区域Check //在窗体Load中增加 this.dataGrid.AddHandler(DataGrid.MouseLeftButtonDownEvent, new MouseButtonEventHandler(this.DataGrid_MouseL ...
问题 请完成一个函数,输入一个二叉树,该函数输出它的镜像。 示例 解答1:递归 class Solution { public: TreeNode* mirrorTree(TreeNode* root) { if (!root) return nullptr; // 前序操作 swap(root-> ...
分类:
其他好文 时间:
2021-03-11 17:54:57
阅读次数:
0
函数是一段可以重复使用的代码,用来独立地完成某个功能,它可以接收用户传递的数据,也可以不接收。接收用户数据的函数在定义时要指明参数,不接收用户数据的不需要指明,根据这一点可以将函数分为有参函数和无参函数。将代码段封装成函数的过程叫做函数定义。 C语言无参函数的定义 如果函数不接收用户传递的数据,那么 ...
分类:
其他好文 时间:
2021-03-11 16:09:36
阅读次数:
0
null合并运算符$username = isset($_GET['user']) ? $_GET['user'] : 'nobody';$username = $_GET['user'] ?? 'nobody'; // 等同于上句操作// 合并操作$username = $_GET['user'] ...
分类:
Web程序 时间:
2021-03-11 14:18:21
阅读次数:
0
<van-field readonly clickable name="calendar" :value="area" label="户籍区划" required placeholder="" @click="cityShow = true"> </van-field> <van-popup v-m ...
分类:
其他好文 时间:
2021-03-11 14:17:47
阅读次数:
0