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
动态规划:加权有向图的最短路径算法
读完本文,可以去力扣解决如下题目:787. K站中转内最便宜的航班(Medium)毕业季,对过去也许有些欢乐和感伤,对未来也许有些迷茫和向往,不过这些终究是过眼云烟,迟早会被时间淡化和遗忘。在这段美好时光的末尾,确实应该来一场说走就走的毕业旅行,放肆一把,给青春画上一个完美的句号。那么,本文就教给你一个动态...
2021-06-23
大屏可视化从青铜到王者的进阶,你只差了一个「组件复用」 !
Hello,麦粉们,这里是小麦本麦。小麦最近收到了一位麦粉关于“大屏可视化制作”的留言,在与这位麦粉的交流中,小麦深深的感受到了这位麦粉的焦虑。这里先交代一下这位麦粉的职业——某品牌汽车销售。
2022-02-15
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
关于新媒体运营技术的一点简要思考
最近这几年新媒体运营非常火爆,而且大部分的公司和企业都对新媒体这一块非常重视。因为通过新媒体这块给他们带来的利润确实是很高的,所以他们尝到甜头之后就会更加重视这方面。而且现在不管什么行业都会新媒体运营这一职位所以现在新媒体时代已经来到了我们的身边。
2020-06-30
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
B树和B+树
在计算机科学中,B树(英语:B-tree)是一种自平衡的树,能够保持数据有序。这种数据结构能够让查找数据、顺序访问、插入数据及删除的动作,都在对数时间内完成。B树,概括来说是一个一般化的二叉查找树(binary search tree),可以拥有多于2个子节点。与自平衡二叉查找树不同,B树为系统大块数据的读写操作做了优化。B...
2018-02-22
买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区会这么小呢?
PHP基础算法之冒泡排序法
{代码...}