码迷,mamicode.com
首页 >  
搜索关键字:return    ( 60766个结果
LeetCode - Find Bottom Left Tree Value
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
Hills And Valleys
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函数创建进程
//通过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
LeetCode - Minimum Remove to Make Valid Parentheses
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
验证之 IDataErrorInfo 简单 Demo
要求:年龄不满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
2021.01.30 Rating赛 解题/补题报告
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
jenkins打包镜像对打包失败问题的状态校验
失败主要是有两种 1、yarn或者npm打包失败 这种情况return code不会改变,仍然会返回0,但是日志里会报error,所以可以通过解析日志里是否有error字段来判断。 一种方法是直接读log文件,如下 error_string=`sudo cat /root/jenkins/jobs/ ...
分类:其他好文   时间:2021-02-08 12:44:35    阅读次数:0
ES6 - anync
1.含义 async函数简洁点说就是Generator函数的语法糖。 示例:一个读取文件的异步操作,逐步执行,使用Generator函数执行 1 const fs = require('fs') 2 3 const readFile = function (fileName) { 4 return ...
分类:其他好文   时间:2021-02-08 12:36:23    阅读次数:0
60766条   上一页 1 ... 70 71 72 73 74 ... 6077 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!