随笔分类 - algorithm
摘要:二进制位统计算法(swar)_zp0int的博客-CSDN博客_swar算法 https://blog.csdn.net/qq_31720329/article/details/89085757
阅读全文
摘要:代码抄袭:那些让985学生沉默,211学生流泪的真相 - 知乎 https://zhuanlan.zhihu.com/p/40568346
阅读全文
摘要:Lecture 16 - applications of DFS and BFS http://www8.cs.umu.se/kurser/TDBAfl/VT06/algorithms/LEC/LECTUR16/NODE16.HTM 搜索 复制
阅读全文
摘要:分割等和子集 https://leetcode.cn/problems/partition-equal-subset-sum/ func canPartition(nums []int) bool { n := len(nums) if n < 2 { return false } max, sum
阅读全文
摘要:func reverseBits(num int) int { // a : 当前位置累计连续1的个数,遇到0为0 // b: 当前位置可以构成连续的1的个数 // 遇到0 状态转移 a, b, ans := 0, 0, 0 for i := 0; i < 32; i++ { if num&(1<<
阅读全文
摘要:哈啰推荐引擎搭建实战 https://mp.weixin.qq.com/s/MGP2UkZZg0nrDJNLEZGtmw 哈啰推荐引擎搭建实战 原创 盛晓昌 哈啰技术 2022-06-21 17:30 发表于上海 收录于合集 #算法5个 #推荐引擎1个 导读:逛逛是哈啰APP推出的内容社区,旨在为用
阅读全文
摘要:微信「扫一扫识物」 的背后技术揭秘 https://mp.weixin.qq.com/s/fiUUkT7hyJwXmAGQ1kMcqQ 微信「扫一扫识物」 的背后技术揭秘 原创 breezecheng 腾讯技术工程 2019-12-27 18:30 收录于合集#微信系列7个 作者:breezeche
阅读全文
摘要:https://leetcode.cn/problems/QA2IGt/solution/ke-cheng-shun-xu-by-leetcode-solution-mq6d/
阅读全文
摘要:17. 电话号码的字母组合 - 力扣(LeetCode) https://leetcode.cn/problems/letter-combinations-of-a-phone-number/ https://leetcode.cn/problems/IDBivT/solution/sheng-ch
阅读全文
摘要:张鸿志:美团大脑百亿级知识图谱的构建及应用进展 https://mp.weixin.qq.com/s/cUvzPr95gIvWqTxouQj_8w
阅读全文
摘要:https://leetcode.cn/problems/sqrtx/ https://www.geeksforgeeks.org/how-to-calculate-a-square-root/ 1,3,5,7,...,(2n-1) =n^2 [ x^2=n n/2 x!=n/2 x^2=n (n/
阅读全文
摘要:https://leetcode.cn/problems/7WqeDu/solution/zhi-he-xia-biao-zhi-chai-du-zai-gei-ding-94ei/ https://leetcode.cn/problems/sort-characters-by-frequency/
阅读全文
摘要:https://leetcode.cn/problems/w6cpku/
阅读全文
摘要:“从特殊到一般”的思想 “从特殊到一般”的思想 - 知乎 https://zhuanlan.zhihu.com/p/75988200 有时要做个“极端”的人 ——“从特殊到一般”的思想 我们都知道,“极端情况”应当“极端处理”。在学习过程中我们遇到的问题往往不是“一条路走到黑”很多复杂的题目都可以用
阅读全文
摘要:https://leetcode.cn/problems/6eUYwP/solution/xiang-xia-de-lu-jing-jie-dian-zhi-he-by-a1iyy/
阅读全文
摘要:本题是经典的字符串单模匹配的模型,因此可以使用字符串匹配算法解决,常见的字符串匹配算法包括暴力匹配、\text{Knuth-Morris-Pratt}Knuth-Morris-Pratt 算法、\text{Boyer-Moore}Boyer-Moore 算法、\text{Sunday}Sunday
阅读全文
摘要:https://leetcode.cn/problems/smallest-good-base/
阅读全文
摘要:func find132pattern(nums []int) bool { n := len(nums) if n < 3 { return false } i, j, k := 0, 1, 2 a, b, c := nums[i], nums[j], nums[k] for { if i ==
阅读全文
摘要:小结 1、 Both nextSmaller and prevSmaller 之前、之后的第一个大、小的 func largestRectangleArea(heights []int) int { /* 1、严格单调栈 2、每个元素都要入栈 序号不连续的原因:缺失的元素比栈顶元素大;尤其当栈底元素
阅读全文