码迷,mamicode.com
首页 >  
搜索关键字:swap nodes in pairs    ( 8848个结果
[LeetCode 1530] Number of Good Leaf Nodes Pairs
Given the root of a binary tree and an integer distance. A pair of two different leaf nodes of a binary tree is said to be good if the length of the s ...
分类:其他好文   时间:2020-07-27 15:58:17    阅读次数:93
hdu1325 Is It A Tree? solution
question: A tree is a well-known data structure that is either empty (null, void, nothing) or is a set of one or more nodes connected by directed edge ...
分类:其他好文   时间:2020-07-26 23:09:33    阅读次数:68
[LeetCode] 954. Array of Doubled Pairs 两倍数对儿数组
Given an array of integers A with even length, return true if and only if it is possible to reorder it such that A[2 * i + 1] = 2 * A[2 * i] for every ...
分类:编程语言   时间:2020-07-26 19:14:18    阅读次数:72
「APIO2019」桥梁(询问分块+并查集)
「APIO2019」桥梁(询问分块+并查集) 询问每$S$个分块后,每次对于所有块内未被更改的边 及 所有询问 排序,然后依次加入并查集,这一部分复杂度为$O(m \frac(\log m+\alpha(n)))$ 对于$S$条被改变的边,对于每个询问分别考虑这些边的贡献,复杂度为$O(qS)$,由 ...
分类:Windows程序   时间:2020-07-26 19:09:18    阅读次数:86
微信小程序rich-text中的nodes属性
微信小程序中的rich-text可以接收转移html标签 字体的样式处理 可以通过 给rich-text添加类名设置字体样式 图片的样式(自适应) 获取的html标签字符串.replace(/<img/g, '<img style="max-width:100%;height:auto;displa ...
分类:微信   时间:2020-07-26 15:42:04    阅读次数:185
HDU 1325 Is It A Tree?
A tree is a well-known data structure that is either empty (null, void, nothing) or is a set of one or more nodes connected by directed edges between ...
分类:其他好文   时间:2020-07-26 02:05:42    阅读次数:102
gitlab报错
1.页面访问出现502: 解决: (1)原因8080端口是否被占用 [root@VM_0_5_centos ~]# netstat -tnlp tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN 6130/unicorn 没被占用 (2)gitlab占用内存太多,导致服务 ...
分类:其他好文   时间:2020-07-26 01:53:04    阅读次数:62
[LuoguP4208][JSOI2008]最小生成树计数(最小生成树+矩阵树定理)
[LuoguP4208][JSOI2008]最小生成树计数 题面 现在给出了一个简单无向加权图。你不满足于求出这个图的最小生成树,而希望知道这个图中有多少个不同的最小生成树。(如果两颗最小生成树中至少有一条边不同,则这两个最小生成树就是不同的)。由于不同的最小生成树可能很多,所以你只需要输出方案数对 ...
分类:Web程序   时间:2020-07-26 00:42:11    阅读次数:88
快速排序排与堆排序
引子 最近练习时,觉得有些生疏,所以加强锻炼。 具体实现 快速排序(从小到大排序,升序) public class QuickSort{ public static void swap(int[] arr, int i, int j){ int temp = arr[i]; arr[i] = arr ...
分类:编程语言   时间:2020-07-24 22:11:29    阅读次数:94
linux服务器巡检性能与Java 进程脚本
#!/bin/bash#作者:洪永坚echo-e"\033[31m211服务器时间:\033[0m"date+%F""%H:%M#获取脚本执行的时间echo-e"\033[31m服务器ip地址:\033[0m"ifconfigeno1|awk‘/inet/‘|awk‘{print$2}‘#获取IP#检查CP
分类:编程语言   时间:2020-07-22 21:05:02    阅读次数:98
8848条   上一页 1 ... 15 16 17 18 19 ... 885 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!