redis 1 redis简介 # 1 redis存储数据是以key-value的方式存储,value有五种数据类型:string(字符串)、list(链表)、set(集合)、zset(sorted set --有序集合)和hash(哈希类型) # 2 redis是非关系型数据库,也被称为内存数据库 ...
分类:
其他好文 时间:
2020-07-26 00:26:26
阅读次数:
115
##题面 he length of the longest common prefix of two strings s=s1s2…sn and t=t1t2…tm is defined as the maximum integer k (0≤k≤min(n,m)) such that s1s2…s ...
分类:
其他好文 时间:
2020-07-26 00:15:56
阅读次数:
106
链接:https://leetcode-cn.com/problems/convert-sorted-list-to-binary-search-tree/ 代码 /** * Definition for singly-linked list. * struct ListNode { * int v ...
分类:
其他好文 时间:
2020-07-26 00:07:52
阅读次数:
59
题目大意: 给出个点,n为偶数,询问两个完全没有交集的匹配q和p。 一方面使得n个点两两互相匹配,一方面使得匹配的权值和最小 分析: 因为n是偶数,所以可以考虑将n个数分配到不同的长度为偶数的环中,对于排列q和排列p,只需要在偶环中交换一下位置就好。 但这个偶环的长度必须要大于2,因为如果长度为2, ...
分类:
其他好文 时间:
2020-07-24 21:58:55
阅读次数:
72
>>>dict() # 创建空字典 {} >>> dict(a='a', b='b', t='t') # 传入关键字 {'a': 'a', 'b': 'b', 't': 't'} >>> dict(zip(['one', 'two', 'three'], [1, 2, 3])) # 映射函数方式来构 ...
分类:
其他好文 时间:
2020-07-24 19:10:00
阅读次数:
67
二分查找 #include<bits/stdc++.h> using namespace std; const int maxn = 2e5+5; long long a[maxn], b[maxn]; long long getKth(int k, int lo1, int hi1, int lo ...
分类:
其他好文 时间:
2020-07-23 23:22:49
阅读次数:
76
pip安装 pip install pytest-html 编写脚本 import pytest class TestClass(object): def test_one(self): x = "this" assert 'h' in x def test_two(self): x = "hell ...
分类:
其他好文 时间:
2020-07-23 16:50:29
阅读次数:
121
目录 大纲概述 数据集合 数据处理 预训练word2vec模型 一、大纲概述 文本分类这个系列将会有8篇左右文章,从github直接下载代码,从百度云下载训练数据,在pycharm上导入即可使用,包括基于word2vec预训练的文本分类,与及基于近几年的预训练模型(ELMo,BERT等)的文本分类。... ...
分类:
其他好文 时间:
2020-07-22 23:31:28
阅读次数:
91
1.Redis支持的数据类型? Redis支持五种数据类型:string(字符串),hash(哈希),list(列表),set(集合)及zset(sorted set:有序集合)。 2.什么是Redis持久化?Redis有哪几种持久化方式?优缺点是什么? redis提供两种方式进行持久化,一种是RD ...
分类:
其他好文 时间:
2020-07-22 20:13:10
阅读次数:
54
地址 https://leetcode-cn.com/problems/xuan-zhuan-shu-zu-de-zui-xiao-shu-zi-lcof/ https://leetcode-cn.com/problems/find-minimum-in-rotated-sorted-array-i ...
分类:
编程语言 时间:
2020-07-22 11:21:34
阅读次数:
62