Given the root of a binary tree, return the leftmost value in the last row of the tree. Example 1: Input: root = [2,1,3] Output: 1 Example 2: Input: r ...
分类:
其他好文 时间:
2021-02-10 12:54:11
阅读次数:
0
http://codeforces.com/contest/1467/problem/B 题意 \(一个数列里有波峰波谷\) \(波谷:a[i]<min(a[i+1],a[i-1]])\) \(波峰:a[i]>max(a[i+1],a[i-1])\) \(sum = 波峰数+波谷数\) \(若可以任 ...
分类:
其他好文 时间:
2021-02-09 12:30:17
阅读次数:
0
//通过fork函数创建进程#include <stdio.h>#include <unistd.h> int gval=10;int main(int argc, char *argv[]){ pid_t pid; int lval=20; gval++,lval+=5; pid=fork(); ...
分类:
系统相关 时间:
2021-02-09 12:27:28
阅读次数:
0
1.1、先序遍历 根结点-左子树-右子树 // 指针 void preorder(node* root) { if(root==NULL) return; //空树,递归边界 printf("%d\n",root->data); preoder(root->lchild); preoder(root ...
分类:
其他好文 时间:
2021-02-09 12:23:21
阅读次数:
0
Given a string s of '(' , ')' and lowercase English characters. Your task is to remove the minimum number of parentheses ( '(' or ')', in any position ...
分类:
其他好文 时间:
2021-02-09 12:12:28
阅读次数:
0
要求:年龄不满18 就边框飘红 后台代码: public class AgeInfoWithValidation : IDataErrorInfo { private int age =0; public int Age { get { return age; } set { age = value ...
分类:
其他好文 时间:
2021-02-09 12:02:45
阅读次数:
0
package main import ( "fmt" "strings" ) func quickSort(l, r int, arry []int) { if l>=r { return } i,j := l-1,r+1 val := arry[(l+r)/2] for i<j{ for i++ ...
分类:
编程语言 时间:
2021-02-09 11:47:23
阅读次数:
0
A 一共n个人,去a餐厅的有a人,去b餐厅有b人,两个都去的有c人,求没有去的有多少,如果数据不合理或没去的人数少于1,输出-1 #include<bits/stdc++.h> using namespace std; #define ll long long int main() { int n, ...
分类:
其他好文 时间:
2021-02-09 11:44:03
阅读次数:
0
失败主要是有两种 1、yarn或者npm打包失败 这种情况return code不会改变,仍然会返回0,但是日志里会报error,所以可以通过解析日志里是否有error字段来判断。 一种方法是直接读log文件,如下 error_string=`sudo cat /root/jenkins/jobs/ ...
分类:
其他好文 时间:
2021-02-08 12:44:35
阅读次数:
0
1.含义 async函数简洁点说就是Generator函数的语法糖。 示例:一个读取文件的异步操作,逐步执行,使用Generator函数执行 1 const fs = require('fs') 2 3 const readFile = function (fileName) { 4 return ...
分类:
其他好文 时间:
2021-02-08 12:36:23
阅读次数:
0