微信、电商、机票、抖音上的黑灰产“生意”
偏门,也就是旁门、左道、非正途;捞偏门就是使用违法、犯戒、打法律政策擦边球等不正当的手段谋取利益。虽然道德和法律风险巨大,但是获得的收益却往往是正规合法渠道的几倍甚至几百倍。在移动互联网的今天,网络上捞偏门的手段很多。不仅表现在我们已经知道的钓鱼诈骗、电信诈骗、勒索病毒等,更有很多平常不容易察觉...
2020-07-09
动态规划:加权有向图的最短路径算法
读完本文,可以去力扣解决如下题目:787. K站中转内最便宜的航班(Medium)毕业季,对过去也许有些欢乐和感伤,对未来也许有些迷茫和向往,不过这些终究是过眼云烟,迟早会被时间淡化和遗忘。在这段美好时光的末尾,确实应该来一场说走就走的毕业旅行,放肆一把,给青春画上一个完美的句号。那么,本文就教给你一个动态...
2021-06-23
Python实现的帕斯卡三角形
带有缓存的迭代器 {代码...} 结果如下: {代码...} 使用装饰器的迭代器 {代码...} 跳舞的数字[Just for fun] {代码...}
2014-05-24
Median of Two Sorted Arrays
There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).
2015-12-15
Naïve Bayes Classifiers
We would like to classify categorical output $(k_1,k_2,...,k_3)$ given some attributes$(x_1, x_2, ..., x_n)$
2017-12-07
leetcode 鸡蛋掉落
{代码...}
2021-01-19
[LeetCode] 276. Paint Fence
There is a fence with n posts, each post can be painted with one of the k colors.You have to paint all the posts such that no more than two adjacent fence posts have the same color.Return the total number of ways you can paint the fence.
2016-03-23
LeetCode(Google) 0276 Paint Fense
There is a fence with n posts, each post can be painted with one of the k colors.
2018-04-21
[LintCode/LeetCode] Contains Duplicate II
Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and the absolute difference between i and j is at most k.
2018-07-23
B树和B+树
在计算机科学中,B树(英语:B-tree)是一种自平衡的树,能够保持数据有序。这种数据结构能够让查找数据、顺序访问、插入数据及删除的动作,都在对数时间内完成。B树,概括来说是一个一般化的二叉查找树(binary search tree),可以拥有多于2个子节点。与自平衡二叉查找树不同,B树为系统大块数据的读写操作做了优化。B...
2018-02-22
k-means 之 C++ 的实现
所谓k-means,即k均值聚类.聚类过程好比中国历史上的“春秋五霸,战国七雄”,它们同属与中国大地,同时被周王室分封。分封的过程就相当于K类的指定过程,每一个诸侯国都对应于一个聚类。五霸即五类,七雄即七类,从五霸到七雄,即相当于一个聚类生长的过程。
2016-07-22
多伦多大学 MAT 137课业解析
多伦多大学 MAT 137课业解析 题意: 完成三道计算题 解析: 第三题: . For which positive integers n ≥ 1 does 2^n > n^2 hold? Prove your claim by induction. 证明: n>=5 (1)当 n=5 时,2^5=32 > 5^2=25,不等式成立 (2)假设 n=k (k>5)时,2^k > k^2; 则 n = k+1 时,2^(k+1)=22^k > 2(k^2)...
2019-09-23
minikube代码分析与Go语言 - 3
[TOC] minikube代码分析 参考博客: minikube 源码分析 下载 minikube源码可以从github上下载: {代码...} 编译 环境:Ubuntu 16.04 {代码...} 输出信息要点: minikube 0.20.0默认使用kubernetes v1.6.4 从https://github.com/jteeuwen/go-bindata/下载了一个go-bindata 编译的文件在out目录下,体积都不小: {代码...}...
2017-07-07
买iPhone便宜2000多!海南免税买苹果手机这样才最省
<iframe src="https://player.bilibili.com/player.html?aid=541359844&bvid=BV1Zi4y1g7cN&cid=212717164&page=1" width="720" height="520" frameborder="no" scrolling="no" allowfullscreen="allowfullscreen"><span data-mce-type="bookmark" style="display: inline-block; width...
2020-07-15
多伦多大学 MAT 137课业解析
MA多伦多大学 MAT 137课业解析 题意: 完成三道计算题 解析: 第三题: . For which positive integers n ≥ 1 does 2^n > n^2 hold? Prove your claim by induction. 证明: n>=5 (1)当 n=5 时,2^5=32 > 5^2=25,不等式成立 (2)假设 n=k (k>5)时,2^k > k^2; 则 n = k+1 时,2(k+1)=22k > 2(k2)=...
2019-09-23
JVM频繁GC分析
GC日志打印YGC日志非常频繁,几秒钟一次。PSYoungGen 是使用Parallel Scavenage垃圾收集器的年轻代从日志上可以看到 7056K->544K(8192K) 年轻代总大小非常小只有8M,这就是产生频繁YGC的原因,当new了一个新对象,Young区内存不够分配时,就会触发一次YGC。那么为什么Young区会这么小呢?
Vue2.0全家桶实现一个买买买提醒应用
之前嫌弃买买买的时候老是要在比价网站蹲点很麻烦...撸了Nodejs一个监控商品的小玩具,还撸了一个很丑的前端..勉强用了一阵时间...后来开始接触到vue.js,发现还行而且文档真的非常友好,我打包票绝对可以干掉市面上的什么《vue.jsXX指南》(逃.所以就写了这个简单小项目。