leetcode题解——对称二叉树 题目如下 给定一个二叉树,检查它是否是镜像对称的。 解题思路 考察递归 对于一棵树,可以从外围到内围一层层判断是否镜像 外围对应的是左边结点的左孩子和右边结点的右孩子 内围对应的是左边节点的右孩子和右边结点的左孩子 /** * Definition for a b ...
分类:
其他好文 时间:
2021-03-17 14:29:11
阅读次数:
0
使用docker在Linux下部署项目(以nginx + node示例) docker linux 安装: #sudo wget -qO- https://get.docker.com | sh -q标识安装时输出信息要简单,O-标识标准输出,而不是输出到文件 #sudo usermod -aG d ...
分类:
系统相关 时间:
2021-03-17 14:23:09
阅读次数:
0
vue项目的config配置 // 以下的IP和端口均为假设,方便后续举例说明 proxyTable: { "/a": { target: "http://111.11.111.111:1111", changeOrigin: true, ws: true, pathRewrite: { "^/a" ...
分类:
其他好文 时间:
2021-03-17 14:16:30
阅读次数:
0
#include<stdio.h> #include<stdlib.h> typedef char ElemType; //结点定义 typedef struct node{ ElemType data; struct node* lchild,*rchild; }BiTNode,*BiTree; ...
分类:
其他好文 时间:
2021-03-17 14:03:43
阅读次数:
0
1. 拉取elasticsearch7.6.0镜像: sudo docker pull elasticsearch:7.6.0 2. 输入命令,构建容器: sudo docker run --name es1 -e 'discovery.type=single-node' --network=myn ...
分类:
其他好文 时间:
2021-03-17 14:02:05
阅读次数:
0
输入两个链表,找出它们的第一个公共节点。 如下面的两个链表: /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), n ...
分类:
其他好文 时间:
2021-03-16 13:39:17
阅读次数:
0
url模块是用来解析url的 有三个方法: parse: 可以将字符串转换成对象 format:和parse相反,将对象转换成字符串 relove:拼接url parse使用 1 const url = require("url") 2 const urlStr = "https://usernam ...
分类:
Web程序 时间:
2021-03-16 13:23:35
阅读次数:
0
给你一个链表的头节点 head 和一个整数 val ,请你删除链表中所有满足 Node.val == val 的节点,并返回 新的头节点 。 class Solution: def removeElements(self, head: ListNode, val: int) -> ListNode: ...
分类:
其他好文 时间:
2021-03-16 11:53:35
阅读次数:
0
ref #include <stdio.h> #include <stdlib.h> typedef struct node { int data; struct node *lchild, *rchild; }bitree_t; bitree_t *createNode(int data) { b ...
分类:
编程语言 时间:
2021-03-15 11:35:22
阅读次数:
0
#include <stdio.h>#include <stdlib.h>typedef struct node { int number; struct node * next;}person;person * initLink(int n) { int i = 0; person * head ...
分类:
其他好文 时间:
2021-03-15 11:31:33
阅读次数:
0