码迷,mamicode.com
首页 >  
搜索关键字:swap nodes in pairs    ( 8848个结果
P5163 WD与地图
###链接 贴一下青君大佬的博客~ #include<bits/stdc++.h> #define IL inline #define LL long long #define pb push_back #define pi pair<int,int> #define mk make_pair us ...
分类:其他好文   时间:2020-11-27 11:15:36    阅读次数:6
LC 222. Count Complete Tree Nodes (二分查找)
link /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NUL ...
分类:其他好文   时间:2020-11-27 11:14:59    阅读次数:5
Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes conta ...
分类:其他好文   时间:2020-11-26 15:14:07    阅读次数:5
kubernet将pod指定到对应的nodes上运行
环境:kubernet 将pod分配到指定的节点将pod调度到指定节点有2种方式: 方式一:强制约束Pod调度到指定Node节点上 方式二:通过label-selector机制选择节点 为Node添加label [root@K8s-Master Tools]# kubectl label node ...
分类:Web程序   时间:2020-11-20 12:16:14    阅读次数:23
Leetcode(Daily 11-8 ~ 11-14)
leetcode(daily 11-8 ~ 11-14) leetcode 每日一题 11-8 122. 买卖股票的最佳时机 II class Solution { public int maxProfit(int[] prices) { // 贪心算法:只要今天买明天赚就买入 // profit用 ...
分类:其他好文   时间:2020-11-20 12:09:49    阅读次数:9
两个线程交替打印数字(看了就懂版)
/** * @description: * @author: * @create: 2020-11-15 21:12 **/ public class SwapThread { static class Mythread1 extends Thread { public void run() { s ...
分类:编程语言   时间:2020-11-20 11:56:39    阅读次数:13
sysrq mm log里Free swap、Total swap是什么含义?
sysrq mm log里Free swap、Total swap是什么含义? [22634.588075] Free swap = 0kB[22634.588076] Total swap = 204796kB get_nr_swap_pages函数返回swap file或者swap device ...
分类:其他好文   时间:2020-11-20 11:45:23    阅读次数:5
缓存与数据库一致性原则
一、场景: 两个用户发起下单请求,下单前需要查库存是否有剩余。 用户甲 :1、阶段1 :访问缓存库存,获取到缓存库存数量为1; 2、阶段1 :缓存数量为1,即有库存,准备更新,然后删除缓存库存; 3、阶段3 :然后更新数据库库存为 0; 用户乙:1、阶段2 :访问缓存库存,发现库存为空; 2、阶段2 ...
分类:数据库   时间:2020-11-18 13:22:46    阅读次数:30
C语言位运算使用技巧
1、判断奇偶数 void odd_even(int n) { if(n & 1 == 1) { printf("n是奇数!\n"); } } 2、交换两个数字 int swap(int x, int y) { x = x ^ y; y = x ^ y; x = x ^ y; } 基于异或运算的如下性 ...
分类:编程语言   时间:2020-11-17 12:40:14    阅读次数:9
优先级队列queue
#头文件 #include<queue> 首先是基本的用法 定义一个普通队列(先进先出) queue q; 然后是一些基本的用法: a=q.top(); a=q.front();//两个都是取队首元素 a=q.back();//返回对尾元素 q.push(a);//将a入队 q.pop();//将队 ...
分类:其他好文   时间:2020-11-16 14:04:06    阅读次数:18
8848条   上一页 1 ... 9 10 11 12 13 ... 885 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!