1.merge的用法 用于将两个有序的容器合并到另外一个容器,合并后的容器也是有序的。头文件#include <algorithm> #include <iostream> #include <vector> #include <algorithm> int main(){ std::vector< ...
分类:
编程语言 时间:
2021-03-03 12:10:04
阅读次数:
0
We have a collection of stones, each stone?has a positive integer weight. Each turn, we choose the two?heaviest?stones?and smash them together. Suppos ...
分类:
其他好文 时间:
2021-03-02 12:02:57
阅读次数:
0
description: There are two strings \(a\), \(b\) with the length \(n\), and \(m\). Find the Array <\(p_1, p_2, ..., p_m>\), such that \(a_{p_i}= b_i\), ...
分类:
其他好文 时间:
2021-03-01 13:26:32
阅读次数:
0
from functools import reduce list1 = [13, 22, 42, 33, 57, 32, 56, 37] tuple1 = (13, 22, 42, 33, 57, 32, 56, 37) tuple2 = (2,) list2 = [{'a': 10, 'b': ...
分类:
编程语言 时间:
2021-02-26 13:18:00
阅读次数:
0
最近正在学习linux下堆的管理机制,收集了书籍和网络上的资料,以自己的理解做了整理,做个记录。如果有什么不对的地方欢迎指出! Memory Allocator 常见的内存管理机制 dlmalloc:通用分配器 ptmalloc2:glibc分配器,继承自dlmalloc,并提供了多线程支持,主要研 ...
分类:
其他好文 时间:
2021-02-26 12:56:38
阅读次数:
0
Redis技术栈目前广泛使用于开发领域,掌握Redis技术栈与Springboot的集成至关重要。 Redis是目前业界使用最广泛的内存数据存储。相比memcached,Redis支持更丰富的数据结构,例如hashes, lists, sets等,同时支持数据持久化。除此之外,Redis还提供一些类 ...
分类:
编程语言 时间:
2021-02-25 12:11:37
阅读次数:
0
下午新建一个项目,准备push到git上面,结果不是很懂git的我,忽略了当本地与repo上面的文件如果不一致,则拒绝push。 看到一个博客里的问题和我的一毛一样: 主要原因就是因为repo上面的比如markdown文件不在本地。 通过如下命令进行代码合并【注:pull=fetch+merge] ...
分类:
其他好文 时间:
2021-02-23 13:59:26
阅读次数:
0
Given a string s of lower and upper case English letters. A good string is a string which doesn't have two adjacent characters s[i] and s[i + 1] where ...
分类:
其他好文 时间:
2021-02-22 12:38:24
阅读次数:
0
github fork一个分之后,过一段时间就会和主分支的差异比较大。 这样提交pr的时候就会冲突,这个时候我们就需要和主分支同步代码。 步骤: 1. git remote add upstream git@github.com:coreos/etcd.git //本地添加远程主分支,叫upstre ...
分类:
其他好文 时间:
2021-02-22 12:20:10
阅读次数:
0
Given an array of non negative integers, return the maximum sum of elements in two non overlapping (contiguous) subarrays, which have lengths and . (F ...
分类:
移动开发 时间:
2021-02-18 12:53:23
阅读次数:
0