【剑指offer】52、两个链表的第一个公共节点
题目 输入两个链表,找出它们的第一个公共结点。 思路一 因为是反向找,所以会想到用栈。将两个链表都压入两个栈,然后反向弹出,找出第一个公共节点。思路很简单 class Solution {
public:
ListNode* FindFirstCommonNode( ListNode* pHead1, ListNode* pHead2) {
stack<ListNode*> s1, s2;
if (pHead1 == nullptr || pHead2
Code Signal_练习题_matrixElementsSum
After they became famous, the CodeBots all decided to move to a new building and live together. The building is represented by a rectangular matrix of rooms. Each cell in the matrix contains an integer that represents the price of the room. Some roo
暑期周总结二(2018.7.16-2018.7.22)
本周任务安排与代码花费时间 周一 系统中病毒,重装windows 0h 周二 重装oracle,mysqll,,等等 10h 周三 重写创新平台年报统计系统 5h 周四 重写创新平台年报统计系统 8h 周五 重写创新平台年报统计系统 5h 周六 重写创新平台年报统计系统 8h 周日 重写创新平台年报统计系统 5h 下周任务:学习hadoop等大数据知识。 本周遇到的问题: 1、安装jdk配置环境变量: “变量名”:JAVA_HOME “变量值”:C:\Program Files\Java\jd
洛谷 1821 [USACO07FEB]银牛派对Silver Cow Party
【题解】 其实解法 1 #include<cstdio>
2 #include<cstring>
3 #include<algorithm>
4 #define LL long long
5 #define rg register
6 #define N 200010
7 using namespace std;
8 int n,m,s,ans,tot,last[N],dis[N],dis2[N],pos[N];
9 struct rec{
10 int u,v,
集成 dubbo 微服务
微服务架构近年来非常的火,阿里 的dubbo 是其中的一种解决方案。 dubbo 的微服务主要分为以下几部分: 1.注册中心 2.服务提供者 3.消费者 4.监控平台 1.一般流程服务提供者向注册中心注册服务。 2.客户端向注册中心请求服务。 3.注册中心通知客户端访问提供者。 4.监控负责服务是否可用。 1.注册中心的安装 就是安装zookeeper ,为了测试我们可以简单的安装一台就好,也可以安装多台做集群。 将conf 目录下的 zoo_sample.cfg 改名成为 zoo.cfg 编
Python常用操作符
Python常用操作符 1.成员关系操作符 in not in python 成员关系操作符有in和not in,它们用来判断某个元素是否在某个容器里(字符串,集合,字典,列表,元组),如果在返回True,如果不在,返回False 2.算数操作符 符号 含义 + 加法 - 减法 * 乘法 / 除法(真正的除法) % 求余
Linux块层技术全面剖析-v0.1
Linux块层技术全面剖析-v0.1
[email protected]
前言
网络上很多文章对块层的描述散乱在各个站点,而一些经典书籍由于更新不及时难免更不上最新的代码,例如关于块层的多队列。那么,是时候写一个关于linux块层的中文专题片章了,本文基于内核4.17.2。
因为文章中很多内容都可以单独领出来做...
AE模板:动画拼接效果
关于AE模板动画拼接效果
ae模板Flat Animated Story动画拼接效果是一个应用于After Effects CC软件的动态模板。“动画拼接效果”模板是一个干净的After Effects模板,具有渲染的动画内容的After Effects模板,这些易于使用,并准备在一个标题模块化结构,动画拼接效果是一个简单的After Effects模板。
动画拼接效果模板安装步骤
...
VMware14虚拟机安装苹果系统
我们经常使用VM虚拟机来安装区别于本机的操作系统,比如:Linux和Mac OS
对于Linux这种既免费又开源的操作系统当然很好搞到,但是一个Mac本本可能就要让你的钱包空掉。然后就想在虚拟机里面装一个MacOS。
一、准备材料:
VM虚拟机:链接:https://pan.baidu.com/s/1YDm4o19F2IQdcQa_W_w58A 密码:7z5e
MacOS镜像文件:链接:h...
HDU 1166 敌兵布阵(单点更新,区间和查询 模板)
//#include&lt;bits/stdc++.h&gt;
#include&lt;algorithm&gt;
#include&lt;stdio.h&gt;
#include&lt;string.h&gt;
#define lson l,m,rt&lt;&lt;1
#define rson m+1,r,rt&lt;&lt;1|1
const int MAXN = 50007;
int ...
Android 7.0 NotificationManagerService源码分析(应用层App,Fragmework中Service层,SystemUI系统App)
前言:
国产ROM定制化比较复杂,最近在做Notification的适配工作。了解Notification源码走向,才知道国产ROM系统对Notification拦截点,找到相应办法绕过。话题有些绕远了,这里还是讲解Notification源码走向。
本篇,介绍,如何从应用层,到远程的Server进程(系统进程),再到SystemUI(系提APP)渲染展示Notification。
...
celery快速入门2
项目中使用celery
我的项目目录:
TestCelery/ ├── proj │ ├── celeryconfig.py │ ├── celery.py │ ├── init.py │ └── tasks.py └── test.py
celery.py内容如下:
from celery import Celery
# 创建celery实例
app = Celery('demo...
docker安装git
1.安装docker
此处主要参考了docker安装
2.拉取git镜像
docker pull gitlab/gitlab-ce:latest
3.创建docker container (将宿主机SSH端口改为其他端口,让出22端口)
docker run \
--publish 443:443 --publish 80:80 --publish 22:22 \
...
Linux 基本命令——修改字符界面登录信息
issue(系统登录前显示界面文件)
whereis issue(查看issue在哪个系统文件中)
cat /etc/issue (查看issue系统文件信息)
nano /etc/issue (修改issue系统登录显示信息)
motd(系统登录后显示界面文件)
Whereis motd :(查看motd在哪个系统文件中)
Cat /etc/motd :(查看motd在系...
微服务架构之技术选型及架构设计
微服务架构之技术选型及架构设计
学习目标:
能够进行微服务的技术选型
能够搭建开发具备服务注册发现、客户负载均衡、服务间通信的微服务架构
熟练使用SpringCloud Eurek、SpringCloud Ribbon、restTemplate 等组件开发完成
掌握SpringCloud Eureka、SpringCloud Ribbon、restTemplate的基本原理
...
Global and local interactive buckling behavior of a stiff film/compliant substrate system
Global and local interactive buckling behavior of a stiff film/compliant substrate system
Wang, C. G., Y. P. Liu, and H. F. Tan. “Global and Local Interactive Buckling Behavior of a Stiff Film/Compli...
CCF分蛋糕20170301
方式1:
#include &lt;iostream&gt;
using namespace std;
int main() {
int arr[1001],n,k,num=0,sum=0;
cin&gt;&gt;n&gt;&gt;k;
for(int i=0;i&lt;n;i++){
cin&gt;&gt;arr[i];
}
for( int i=0;i&lt;n;i++){
...
今日推荐
周排行