摘要:
https://leetcode-cn.com/problems/hua-dong-chuang-kou-de-zui-da-zhi-lcof/solution/hua-dong-chuang-kou-de-zui-da-zhi-by-lee-ymyo/
阅读全文
posted @ 2022-05-06 23:49
papering
阅读(53)
推荐(0)
摘要:
原创|X侦探所事件簿|内存到哪里去了 https://mp.weixin.qq.com/s/3ofmJhRwIZD-GV8TYxVLGw 原创|X侦探所事件簿|内存到哪里去了 原创 腾讯数据库技术 腾讯数据库技术 2022-03-29 18:57 收录于合集 #MySQL13个 #内存1个 提示:公
阅读全文
posted @ 2022-05-06 16:51
papering
阅读(219)
推荐(0)
摘要:
https://leetcode-cn.com/problems/ba-zi-fu-chuan-zhuan-huan-cheng-zheng-shu-lcof/ https://leetcode-cn.com/problems/ba-zi-fu-chuan-zhuan-huan-cheng-zhen
阅读全文
posted @ 2022-05-05 22:13
papering
阅读(67)
推荐(0)
摘要:
小结: 1、 t1 := T{} var t5 T t5 = T{} t2 := new(T) var t3 *T = new(T) var t4 *T t4 = new(T) t6 := &T0{} var t7 *T0 t7 = &T0{} t1 t5 : 结构体类型变量给 t 分配内存,并零值
阅读全文
posted @ 2022-05-05 16:18
papering
阅读(67)
推荐(0)
摘要:
type State int type CharType int const ( STATE_INITIAL State = iota STATE_INT_SIGN STATE_INTEGER STATE_POINT STATE_POINT_WITHOUT_INT STATE_FRACTION ST
阅读全文
posted @ 2022-05-05 00:41
papering
阅读(271)
推荐(0)
摘要:
https://leetcode-cn.com/problems/first-unique-character-in-a-string/solution/zi-fu-chuan-zhong-de-di-yi-ge-wei-yi-zi-x9rok/ 思路与算法 我们也可以借助队列找到第一个不重复的字符
阅读全文
posted @ 2022-05-02 23:20
papering
阅读(74)
推荐(0)
摘要:
Boyer-Moore class Solution { public: int majorityElement(vector<int>& nums) { int candidate = -1; int count = 0; for (int num : nums) { if (num == can
阅读全文
posted @ 2022-05-02 22:44
papering
阅读(47)
推荐(0)
摘要:
程序中有个常量,空间超过了1页,有哪些优化思路
阅读全文
posted @ 2022-05-01 23:48
papering
阅读(40)
推荐(0)
摘要:
用mmap 考os不用考虑, 利用 cache 向量化计算 内存对齐 叶大小 都得考虑
阅读全文
posted @ 2022-05-01 23:41
papering
阅读(51)
推荐(0)
摘要:
https://leetcode-cn.com/problems/shu-zu-zhong-shu-zi-chu-xian-de-ci-shu-ii-lcof/
阅读全文
posted @ 2022-05-01 23:06
papering
阅读(35)
推荐(0)
摘要:
https://leetcode-cn.com/problems/shu-zu-zhong-shu-zi-chu-xian-de-ci-shu-lcof/
阅读全文
posted @ 2022-05-01 22:43
papering
阅读(47)
推荐(0)
摘要:
https://leetcode-cn.com/problems/bu-yong-jia-jian-cheng-chu-zuo-jia-fa-lcof/
阅读全文
posted @ 2022-05-01 22:17
papering
阅读(42)
推荐(0)
posted @ 2022-05-01 00:12
papering
阅读(39)
推荐(0)
摘要:
https://leetcode-cn.com/problems/er-cha-sou-suo-shu-de-hou-xu-bian-li-xu-lie-lcof/
阅读全文
posted @ 2022-04-29 23:53
papering
阅读(35)
推荐(0)
摘要:
https://leetcode-cn.com/problems/shu-zhi-de-zheng-shu-ci-fang-lcof/ func myPow(x float64, n int) float64 { var R func(x float64, m int) float64 R = fu
阅读全文
posted @ 2022-04-29 23:50
papering
阅读(38)
推荐(0)
摘要:
https://leetcode-cn.com/problems/zhong-jian-er-cha-shu-lcof/ 剑指 Offer 07. 重建二叉树 输入某二叉树的前序遍历和中序遍历的结果,请构建该二叉树并返回其根节点。 假设输入的前序遍历和中序遍历的结果中都不含重复的数字。 示例 1:
阅读全文
posted @ 2022-04-29 23:23
papering
阅读(48)
推荐(0)
摘要:
func intersect(nums1 []int, nums2 []int) []int { sort.Ints(nums1) sort.Ints(nums2) length1, length2 := len(nums1), len(nums2) index1, index2 := 0, 0 i
阅读全文
posted @ 2022-04-28 20:33
papering
阅读(46)
推荐(0)
摘要:
短视频内容理解与生成技术在美团的创新实践 - 美团技术团队 https://tech.meituan.com/2022/04/14/the-innovation-practice-of-short-video-understanding-and-generation-in-meituan.html
阅读全文
posted @ 2022-04-28 13:25
papering
阅读(67)
推荐(0)
摘要:
https://leetcode-cn.com/problems/bu-ke-pai-zhong-de-shun-zi-lcof/
阅读全文
posted @ 2022-04-27 23:35
papering
阅读(32)
推荐(0)
摘要:
class Solution { public: vector<int> getLeastNumbers(vector<int>& arr, int k) { vector<int> vec(k, 0); if (k == 0) { // 排除 0 的情况 return vec; } priorit
阅读全文
posted @ 2022-04-27 23:14
papering
阅读(62)
推荐(0)
摘要:
https://leetcode-cn.com/problems/er-cha-shu-de-zui-jin-gong-gong-zu-xian-lcof/ func lowestCommonAncestor(root, p, q *TreeNode) *TreeNode { if root ==
阅读全文
posted @ 2022-04-27 22:50
papering
阅读(39)
推荐(0)
摘要:
小结: 1、结构体、指针是否相等 https://go.dev/ref/spec#Comparison_operators Comparison operators Comparison operators compare two operands and yield an untyped bool
阅读全文
posted @ 2022-04-27 20:45
papering
阅读(87)
推荐(0)
摘要:
https://leetcode-cn.com/problems/er-cha-sou-suo-shu-yu-shuang-xiang-lian-biao-lcof/ """ # Definition for a Node. class Node(object): def __init__(self
阅读全文
posted @ 2022-04-27 20:18
papering
阅读(45)
推荐(0)
摘要:
万字长文掌握软件领域驱动设计 DDD - 知乎 https://zhuanlan.zhihu.com/p/489070825 开放主机服务定义公开服务的协议(亦称为“服务契约”),包括通信方式、传递消息的格式(协议),让限界上下文可以被当做一组服务访问。开放主机服务也可以视为一种承诺,保证开放的服务
阅读全文
posted @ 2022-04-27 17:48
papering
阅读(179)
推荐(0)
摘要:
golang本地缓存(bigcache/freecache/fastcache等)选型对比及原理总结 - 知乎 https://zhuanlan.zhihu.com/p/487455942 golang本地缓存(bigcache/freecache/fastcache等)选型对比及原理总结 目录
阅读全文
posted @ 2022-04-27 17:42
papering
阅读(4459)
推荐(0)
摘要:
小结: 1、 1.上述本地缓存组件中,实现零 GC 的方案主要就两种:a.无 GC:分配堆外内存(Mmap)b.避免 GC:map 非指针优化(map[uint64]uint32)或者采用 slice 实现一套无指针的 mapc.避免 GC:数据存入[]byte slice(可考虑底层采用环形队列封
阅读全文
posted @ 2022-04-27 17:41
papering
阅读(629)
推荐(0)
摘要:
https://leetcode-cn.com/problems/maximum-subarray/ 53. Maximum Subarray Given an integer array nums, find the contiguous subarray (containing at least
阅读全文
posted @ 2022-04-27 00:15
papering
阅读(42)
推荐(0)
摘要:
https://leetcode-cn.com/problems/ping-heng-er-cha-shu-lcof/ 平衡二叉树 定义 是 定义错误 /** * Definition for a binary tree node. * type TreeNode struct { * Val in
阅读全文
posted @ 2022-04-26 23:12
papering
阅读(51)
推荐(0)
摘要:
大流量活动下钱包提现方案的设计与实现 https://mp.weixin.qq.com/s/wCbdElWL-1uEyMqXAKKZ_w 大流量活动下钱包提现方案的设计与实现 原创 张一鸣 字节跳动技术团队 2022-04-25 12:12 字节跳动技术团队 字节跳动的技术实践分享 162篇原创内容
阅读全文
posted @ 2022-04-26 17:31
papering
阅读(343)
推荐(0)
摘要:
深入理解 Promise 之手把手教你写一版 https://mp.weixin.qq.com/s/_gDIO6YCswAS2dICllMG0A 深入理解 Promise 之手把手教你写一版 原创 ekko 腾讯IMWeb前端团队 2022-04-25 19:00 收录于合集#我也想做前端25个 什
阅读全文
posted @ 2022-04-26 17:30
papering
阅读(106)
推荐(0)
摘要:
初探B端页面体验管理 https://mp.weixin.qq.com/s/VuAbeuW0wpqafZO7zF-f4Q 初探B端页面体验管理 唐朋博 京东设计中心JDC 2022-04-25 16:30 体验量化是最近几年行业内比较关注的领域,作为B端设计师如何对页面体验和性能有更好的感知后参与评
阅读全文
posted @ 2022-04-26 17:28
papering
阅读(239)
推荐(0)
摘要:
https://leetcode-cn.com/problems/er-cha-shu-zhong-he-wei-mou-yi-zhi-de-lu-jing-lcof/ /** * Definition for a binary tree node. * type TreeNode struct {
阅读全文
posted @ 2022-04-25 19:57
papering
阅读(50)
推荐(0)
摘要:
实践: 1、 不需要目的地开通端口 SNMP Trap 设备以UDP协议、162端口给Trap接收端发送Trap,接收端不需要开启UDP、162服务。 TCP:打电话 对方必须接通才能通话 UDP:发短信 可以在对方不知道的情况下发短信
阅读全文
posted @ 2022-04-24 11:33
papering
阅读(119)
推荐(0)
posted @ 2022-04-24 02:31
papering
阅读(23)
推荐(0)
摘要:
动态规划 游标 55. 跳跃游戏 - 力扣(LeetCode) https://leetcode.cn/problems/jump-game/ import "log" func max(a, b int) int { if a > b { return a } return b } // [1]
阅读全文
posted @ 2022-04-24 01:31
papering
阅读(54)
推荐(0)
摘要:
https://leetcode-cn.com/problems/path-sum/ 给你二叉树的根节点 root 和一个表示目标和的整数 targetSum 。判断该树中是否存在 根节点到叶子节点 的路径,这条路径上所有节点值相加等于目标和 targetSum 。如果存在,返回 true ;否则,
阅读全文
posted @ 2022-04-23 23:22
papering
阅读(63)
推荐(0)
摘要:
对称二叉树 https://leetcode-cn.com/problems/symmetric-tree/
阅读全文
posted @ 2022-04-22 22:49
papering
阅读(36)
推荐(0)
摘要:
https://leetcode-cn.com/problems/ju-zhen-zhong-de-lu-jing-lcof/ func exist(board [][]byte, word string) bool { n := len(word) r := len(board) c := len
阅读全文
posted @ 2022-04-22 22:48
papering
阅读(71)
推荐(0)
摘要:
二叉树最大深度 https://leetcode-cn.com/problems/maximum-depth-of-binary-tree/ /** * Definition for a binary tree node. * type TreeNode struct { * Val int * L
阅读全文
posted @ 2022-04-22 20:14
papering
阅读(48)
推荐(0)
摘要:
import ( "strconv" "strings" ) func restoreIpAddresses(s string) []string { ans, n := []string{}, len(s) current, currentCharLen := []string{}, 0 ok :
阅读全文
posted @ 2022-04-21 20:24
papering
阅读(57)
推荐(0)