随笔分类 -  data_structure

摘要:1、 Similarly let us assume that the Job of the Employees is divided into 4 categories only i.e Manager, Analyst, Clerk, and Salesman. Such columns are 阅读全文
posted @ 2024-12-04 18:49 papering 阅读(13) 评论(0) 推荐(0)
摘要:CLH队列 CLH:Craig、Landin and Hagersten队列,是单向链表 阅读全文
posted @ 2023-03-16 20:41 papering 阅读(85) 评论(0) 推荐(0)
摘要:小结: 1、 有数组d=[1,2,3,4,5,6],对d[2]到d[4]之间的所有数加上3,变为d=[1,2,6,7,8,6],那么差分数组也就从[1,1,1,1,1,1]变成了[1,1,4,1,1,-2] Leetcode刷题笔记——差分数组 - 知乎 https://zhuanlan.zhihu 阅读全文
posted @ 2022-12-31 20:21 papering 阅读(50) 评论(0) 推荐(0)
摘要:后缀数组简介 - OI Wiki https://oi-wiki.org/string/sa/ 搜索 复制 阅读全文
posted @ 2022-12-23 19:53 papering 阅读(18) 评论(0) 推荐(0)
摘要:ConcurrentLinkedQueue in Java with Examples - GeeksforGeeks https://www.geeksforgeeks.org/concurrentlinkedqueue-in-java-with-examples/ 搜索 复制 阅读全文
posted @ 2022-11-10 17:32 papering 阅读(22) 评论(0) 推荐(0)
摘要:Go\src\sync\poolqueue.go // poolDequeue is a lock-free fixed-size single-producer, // multi-consumer queue. The single producer can both push and pop 阅读全文
posted @ 2022-10-10 11:31 papering 阅读(54) 评论(0) 推荐(0)
摘要:优先队列 过期时间 小顶堆 src\container\heap\example_pq_test.go PriorityQueue // Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is 阅读全文
posted @ 2022-09-16 17:23 papering 阅读(24) 评论(0) 推荐(0)
摘要:func solveSudoku(board [][]byte) { var line, column [9][9]bool var block [3][3][9]bool var spaces [][2]int for i, row := range board { for j, b := ran 阅读全文
posted @ 2022-08-25 21:18 papering 阅读(32) 评论(0) 推荐(0)
摘要:深入理解完美哈希 https://mp.weixin.qq.com/s/M8Wcj8sZ7UF1CMr887Puog 搜索 复制 阅读全文
posted @ 2022-07-20 19:08 papering 阅读(53) 评论(0) 推荐(0)
摘要:https://leetcode.cn/problems/find-the-town-judge/solution/zhao-dao-xiao-zhen-de-fa-guan-by-leetcod-0dcg/ 阅读全文
posted @ 2022-05-31 20:04 papering 阅读(333) 评论(0) 推荐(0)
摘要:53. 最大子数组和 - 力扣(LeetCode) https://leetcode.cn/problems/maximum-subarray/ https://leetcode.cn/problems/maximum-subarray/solution/zui-da-zi-xu-he-by-lee 阅读全文
posted @ 2022-05-19 20:16 papering 阅读(40) 评论(0) 推荐(0)
摘要:https://leetcode.cn/problems/Qv1Da2/ 阅读全文
posted @ 2022-05-19 08:11 papering 阅读(25) 评论(0) 推荐(0)
摘要:https://leetcode.cn/problems/SLwz0R/ 阅读全文
posted @ 2022-05-18 08:02 papering 阅读(23) 评论(0) 推荐(0)
摘要:Lecture 10 - Heap Operations: Insert and Delete https://webdocs.cs.ualberta.ca/~holte/T26/heap-ops.html 阅读全文
posted @ 2022-05-18 07:48 papering 阅读(28) 评论(0) 推荐(0)
摘要:A multi-producer, multi-consumer queue. queue.py 阅读全文
posted @ 2022-05-07 09:22 papering 阅读(40) 评论(0) 推荐(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 阅读(57) 评论(0) 推荐(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 阅读(52) 评论(0) 推荐(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 阅读(38) 评论(0) 推荐(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 阅读(44) 评论(0) 推荐(0)
摘要:https://leetcode-cn.com/problems/path-sum/ 给你二叉树的根节点 root 和一个表示目标和的整数 targetSum 。判断该树中是否存在 根节点到叶子节点 的路径,这条路径上所有节点值相加等于目标和 targetSum 。如果存在,返回 true ;否则, 阅读全文
posted @ 2022-04-23 23:22 papering 阅读(53) 评论(0) 推荐(0)