Fork me on GitHub
上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 88 下一页
摘要: 76. Minimum Window Substring 题目 解析 题目来源 "76. Minimum Window Substring" 阅读全文
posted @ 2018-03-31 17:11 ranjiewen 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 75. Sort Colors 题目 Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors 阅读全文
posted @ 2018-03-31 15:56 ranjiewen 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 1. K-means算法的基本步骤,K-means算法和EM的联系与区别,为什么会陷入局部最优解?:EM算法(期望最大化)——从EM算法角度理解K-Means与GMM的区别 2.对于特征工程,样本不平衡,缺乏数据,冷启动都是实际工程容易遇到的 背景 连续数据经常采用离散化处理之后再放入模型。离散化可 阅读全文
posted @ 2018-03-30 20:38 ranjiewen 阅读(444) 评论(0) 推荐(0) 编辑
摘要: 74. Search a 2D Matrix 题目 解析 主要是注意边界条件为空的情况,然后就是两个for循环的bug,用`while (i =0&&j & matrix, int target) { if (matrix.empty()||matrix[0].empty()) { return f 阅读全文
posted @ 2018-03-30 16:31 ranjiewen 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 73. Set Matrix Zeroes 题目 解析 使用额外的空间的话,就是做两个一维数组,分别标记哪一行哪一列有0,然后把这些行和列都清0即可。这样空间复杂度为O(m+n); 不使用额外空间的方法类似,就是把第一行和第一列作为标记。 首先 先判断第一行第一列是否含有0,并用两个bool变量记录 阅读全文
posted @ 2018-03-30 16:04 ranjiewen 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 72. Edit Distance 题目 解析 题目来源 "72. Edit Distance disscus" Space)) 阅读全文
posted @ 2018-03-30 15:21 ranjiewen 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 标准的C(n,m)求解 包括输出所有组合数 解析 C++ include include include include include include include include include include include include include include //accmula 阅读全文
posted @ 2018-03-29 14:36 ranjiewen 阅读(884) 评论(0) 推荐(0) 编辑
摘要: AC三题,都比较基础主要考虑细节 注意 貌似可能只有华为编程题才合适我了 C++ include include include include include include include include include include include include include inclu 阅读全文
posted @ 2018-03-28 20:41 ranjiewen 阅读(588) 评论(0) 推荐(0) 编辑
摘要: 01背包练习题 题目 解析 Refernce "背包问题" 阅读全文
posted @ 2018-03-28 12:10 ranjiewen 阅读(358) 评论(0) 推荐(0) 编辑
摘要: 矩阵连乘 动态规划 题目分析 递推公式 计算过程 代码实现 include include define MAX 100 int matrix_chain(int p, int n, int m, int s) { //m[][]最小乘次数 //s[][]最小乘数时的断开点 int i, j, r, 阅读全文
posted @ 2018-03-28 10:48 ranjiewen 阅读(1339) 评论(0) 推荐(0) 编辑
上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 88 下一页