【剑指 の 精选】热门状态机 DP 运用题
假如有一排房子,共 n 个,每个房子可以被粉刷成红色、蓝色或者绿色这三种颜色中的一种,你需要粉刷所有的房子并且使其相邻的两个房子颜色不能相同。
2023-08-11
[LintCode] Permutation Sequence
"123""132""213""231""312""321"If k = 4, the fourth permutation is "231".
2016-03-12
STA314 解说
STA314 Fall 2021 Homework 4Homework 4Deadline: Monday, Nov. 29, at 11:59pm.Submission: You need to submit one file through Quercus with our answers to Questions 1, 2,and 3 as well as code requested for Question 3. You can produce the PDF file however you like(e.g. LATEX, Microsoft Word, scanner),...
2022-06-02
[LeetCode] Median of Two Sorted Arrays
There are two sorted arrays A and B 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)).
全排列和组合
{代码...} {代码...}
2016-09-05
朴素贝叶斯法 Naive Bayes
设输入空间$mathcal{X} subseteq R^n $是n维向量的集合,输出空间为类标记集合$mathcal{Y}={c_{1},c_{2},cdots,c_{k}}$.输入为特征向量$x in mathcal{X}$,输出为类标记 (class label)$y in mathcal{Y}$. X是定义在输入空间$mathcal{X}$上的随机向量,Y是定义才输入空间$mathcal{Y}$上的随机变量。P(X,Y)是X和Y的联合概...
2017-03-24
php面向对象设计模式 之 观察者模式
问题: 假如一个小贩, 他把产品的价格提升了, 不同的消费者会对此产生不同的反应。一般的编程模式无非是获取提升的价格,然后获取所有的消费者,再循环每个消费者, 不同的消费者根据价格涨幅做出决定,如果消费者的类型有限,因而进行的判断也不多,这种无可厚非,但如果有更多的类型的消费者加入进来, 那这个代码就...
快手快速涨粉操作技巧 快手的IP归属地怎么指定城市
快手作为我们现在生活中不可或缺的一个短视频软件,不少用户都能够在上面通过各种渠道实现变现,上热门对于变现能力的提升还是很重要的。快手热门作品的拍摄长度大都保持在7到17秒,太长的作品不容易上热门,尤其一分钟以上的作品在发现页面几乎看不到。发布作品的时间点最好选在19到24点,这个时间段是互联网在线人数最多...
2025-01-15
[LeetCode] 548. Split Array with Equal Sum
Given an array with n integers, you need to find if there are triplets (i, j, k) which satisfies following conditions:
2018-11-26
[LintCode/LeetCode] Rotate Array
Given an array, rotate the array to the right by k steps, where k is non-negative.
2018-07-18
【排坑指南之kubeSphere】2022年最新版-“kubeSphere3.2.1”使用DevOps-CICD之“排坑指南”
<font size=5 color=red> 下面统一告诉各位,希望各位少走弯路!!!</font>看在作者努力排坑+分享的份上,给个三连吧!!!看在作者努力排坑+分享的份上,给个三连吧!!!看在作者努力排坑+分享的份上,给个三连吧!!!
2022-05-15
Paint Fence(276)
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 adjacentfence posts have the same color. Return the total number of ways you can paint the fence. Note: n and k are non-negative integers.
TKE 1.20.6搭建Kube-Prometheus(prometheus-oprator)
线上开通了tke1.20.6的集群。嗯腾讯云有个原生的Prometheus的监控,开通了使用了一下。不过我没有怎么玩明白。文档也不全。还是想了下自己手动搭建一个Prometheus-oprator吧!基本过程基本参照:Kubernetes 1.20.5 安装Prometheus-Oprator。下面讲一下不一样的和需要注意的
2021-08-10
SSL安全证书如何购买及使用
为了保护我们的网络安全,当下众多的网站都开始部署SSL安全证书了,网站部署SSL安全证书是通过SSL加密传输协议,保障网站信息传输的安全,避免出现网络意外,在部署证书时网站需要购买SSL安全证书,在购买SSL安全证书的过程当中,所遇到的问题是比较多的,对于证书购买方面的问题也需要好好的考察,那么SSL安全证书如何...
2020-03-16
动态规划(from geeksforgeeks)
11.扔鸡蛋问题(Egg Dropping Puzzle) {代码...}
2017-03-25
剑指 Offer II 091. 粉刷房子 : 状态机 DP 运用题
假如有一排房子,共 n 个,每个房子可以被粉刷成红色、蓝色或者绿色这三种颜色中的一种,你需要粉刷所有的房子并且使其相邻的两个房子颜色不能相同。
2022-06-25
行业首个AI课上线!粉笔战略布局加速技术商业化进程
继推出AI老师后,粉笔AI产品矩阵进一步扩充。粉笔宣布,将于3月17日上线基于自研垂域大模型打造的“AI刷题系统班”,为用户提供行测、申论全科目覆盖的一站式高效备考支持。
2025-03-06