题目描述: 方法一: 方法二:动态规划 O(m*n) O(m*n) 另:空间:O(n) ...
分类:
其他好文 时间:
2019-07-12 18:40:38
阅读次数:
98
# 离散化|||离散化就是三句话,sort,unique,lower_bound||| 1.专业术语:把无限空间中有限的个体映射到有限的空间中去,以此提高算法的时空效率。 2.通俗语言:离散化是在不改变数据相对大小的条件下,对数据进行相应的缩小。 3.一些例子:1,999,6,1005;这四个数字离 ...
分类:
其他好文 时间:
2019-07-10 01:26:56
阅读次数:
129
一对一要约束 unique 多对多和一对一事通过一对多的基础上模拟的 ...
分类:
数据库 时间:
2019-07-09 23:45:26
阅读次数:
236
对bean中内容属性content建立索引 mongodb 对字段中有超过 1024 字节的不会建立索引,但是可以使用text 索引或者hashed 索引来实现。 ...
分类:
数据库 时间:
2019-07-08 19:34:12
阅读次数:
113
原题链接在这里:https://leetcode.com/problems/smallest-subtree-with-all-the-deepest-nodes/ 题目: Given a binary tree rooted at root, the depth of each node is t ...
分类:
其他好文 时间:
2019-07-08 13:58:55
阅读次数:
127
1、PV PV即Page View,即页面浏览量或点击量,用户每一次对网站中的每个网页访问均被记录一次。用户对同一页面的多次访问,访问量累计。 2、UV UV即Unique Visitor,是指通过互联网访问、浏览这个网页的自然人,一天内同一访客的多次访问只记录为一个访客。 3、VV VV即Visi... ...
分类:
其他好文 时间:
2019-07-08 13:22:21
阅读次数:
104
http://poj.org/problem?id=1679 #include<iostream> #include<vector> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; struct ...
分类:
其他好文 时间:
2019-07-07 11:02:20
阅读次数:
111
今天下午大致学完了进阶指南中algorithm头文件下的内容,在这里进行一个总结。 reverse翻转 顾名思义,reverse进行的操作就是翻转原来的顺序,理解非常简单,故不赘述。 操作样例: unique去重 unique的含义仍然很好理解ovo,我也不说太多了,函数返回值可以是去重后的元素个数 ...
分类:
编程语言 时间:
2019-07-06 00:05:07
阅读次数:
104
Given a non-negative integer n, count all numbers with unique digits, x, where 0 ≤ x < 10n. Example: Input: 2 Output: 91 Explanation: The answer shoul ...
分类:
其他好文 时间:
2019-07-05 19:24:57
阅读次数:
90
描述 Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives th ...
分类:
其他好文 时间:
2019-07-04 16:02:31
阅读次数:
120