当前位置: 首页 > article >正文

LeetCode:链表

160. 相交链表

/*** 单链表的定义* Definition for singly-linked list.* public class ListNode {*     int val;*     ListNode next;*     ListNode(int x) {*         val = x;*         next = null;*     }* }*/
public class Solution {public ListNode getIntersectionNode(ListNode headA, ListNode headB) {ListNode l1 = headA;ListNode l2 = headB;while(l1 != l2){if(l1!=null){l1=l1.next; //指针移动到下一个节点}else{l1=headB;//指针移动到最后,换成另一个链表遍历}if(l2!=null){l2=l2.next;}else{l2=headA;}}return l2;}
}

206. 反转链表

讲解:反转链表【基础算法精讲 06】_哔哩哔哩_bilibili

/*** Definition for singly-linked list.* public class ListNode {*     int val;*     ListNode next;*     ListNode() {}*     ListNode(int val) { this.val = val; }*     ListNode(int val, ListNode next) { this.val = val; this.next = next; }* }*/
class Solution {public ListNode reverseList(ListNode head) {if(head==null || head.next==null)return head;//原地调整链表//利用cur、nxt、pre三个新指针ListNode cur = head;ListNode pre = null;while(cur!=null){//nxt指针为当前节点的下一个ListNode nxt = cur.next;cur.next = pre;pre = cur;cur = nxt;}return pre;}
}

21. 合并两个有序链表

【从零开始刷LeetCode】第四天:合并两个有序链表(动画演示、手写 Java 代码、详细注释、LeetCode 高频算法题)_哔哩哔哩_bilibili

/*** Definition for singly-linked list.* public class ListNode {*     int val;*     ListNode next;*     ListNode() {}*     ListNode(int val) { this.val = val; }*     ListNode(int val, ListNode next) { this.val = val; this.next = next; }* }*/
class Solution {public ListNode mergeTwoLists(ListNode list1, ListNode list2) {if(list1==null) return list2;if(list2==null) return list1;//虚拟头节点ListNode dummy = new ListNode(-1);//虚拟前置指针ListNode pre = dummy;while(list1!=null && list2!=null){if(list1.val <= list2.val){pre.next = list1;list1=list1.next;}else{pre.next = list2;list2=list2.next;}pre = pre.next;}//以防一个链遍历完了,另一个没有遍历完if(list1==null && list2!=null)pre.next=list2;if(list1!=null && list2==null)pre.next=list1;return dummy.next;}
}

83. 删除排序链表中的重复元素

class Solution {public ListNode deleteDuplicates(ListNode head) {ListNode cur = head;ListNode pre = new ListNode(-1);pre = head;while(cur!=null && cur.next!=null){if(cur.val==cur.next.val){pre=cur;cur.next=cur.next.next;}else{pre=cur;cur=cur.next;}}return head;}
}

19. 删除链表的倒数第 N 个结点

class Solution {public ListNode removeNthFromEnd(ListNode head, int n) {ListNode cur = head;ListNode dummy = head;int len=0;while(cur!=null){cur=cur.next;len++;}ListNode newCur = head;for(int i=0; i<len-n-1; i++){newCur=newCur.next;}newCur.next=newCur.next.next;return dummy;}
}
删除链表的倒数第N个节点这道题中,我写的newCur.next=newCur.next.next;
这一句为什么报错?在您提供的代码中,报错的原因可能是因为当您试图删除倒数第N个节点时,
如果N等于链表的长度(即要删除的是头节点),
那么在执行 newCur.next = newCur.next.next; 这一行时,
newCur 实际上可能是 null,因为 len - n - 1 可能为 -1。为了修复这个问题,您应该修改循环条件,并确保在删除节点之前 newCur 不是 null。
以下是修改后的代码:class Solution {public ListNode removeNthFromEnd(ListNode head, int n) {ListNode cur = head;int len = 0;// 计算链表长度while (cur != null) {cur = cur.next;len++;}ListNode dummy = new ListNode(0); // 创建一个哑节点,指向头节点dummy.next = head;//头节点可能会被删除,所有用一个dummy作为head的替身,最后返回的不是head,而是dummy.nextListNode newCur = dummy; // 从哑节点开始遍历// 找到要删除节点的前一个节点for (int i = 0; i < len - n; i++) {newCur = newCur.next;}// 删除节点newCur.next = newCur.next.next;return dummy.next; // 返回哑节点的下一个节点,即新的头节点}
}
创建了一个哑节点 dummy,它的 next 指向 head。这样即使删除的是头节点,我们也可以通过 dummy 正确地返回新的头节点。
循环条件从 len - n - 1 改为 len - n,因为我们要找到要删除节点的前一个节点。
返回值从 dummy 改为 dummy.next,这样即使头节点被删除,也能正确返回新的头节点。

24. 两两交换链表中的节点

class Solution {public ListNode swapPairs(ListNode head) {if(head==null || head.next==null) return head;ListNode dummy = new ListNode(-1);dummy.next=head;ListNode pre=dummy;//pre的位置选取是待处理两个节点的前一个
//l1、l2都是在循环里设的
//熟悉过程while(pre.next!=null && pre.next.next!=null){ListNode l1 = pre.next;ListNode l2 = pre.next.next;ListNode nxt = l2.next;pre.next=l2;l2.next=l1;l1.next=nxt;pre=l1;}return dummy.next;}
}

234. 回文链表

class Solution {public boolean isPalindrome(ListNode head) {ListNode mid = findMiddle(head);ListNode list2 = reverseList(mid);while(list2!=null){if(head.val != list2.val){return false;}head=head.next;list2=list2.next;                }return true;}//快慢指针找中点public ListNode findMiddle(ListNode head){ListNode slow = head;ListNode fast = head;while(fast != null && fast.next != null){slow=slow.next;fast=fast.next.next;}return slow;}//还是反转链表public ListNode reverseList(ListNode head){if(head==null || head.next==null)return head;ListNode pre = null;ListNode cur = head;while(cur!=null){ListNode nxt = cur.next;cur.next = pre;pre = cur;cur = nxt;}return pre;}}

141. 环形链表

public class Solution {public boolean hasCycle(ListNode head) {if(head==null || head.next==null)return false;ListNode slow = head;ListNode fast = head;//存在fast.next.next这种越级调用时,需要确保fast.next不为空while(fast!=null && fast.next!=null){slow=slow.next;fast=fast.next.next;if(slow==fast)return true;                       }return false;}
}

142. 环形链表 II

public class Solution {public ListNode detectCycle(ListNode head) {ListNode slow = head;ListNode fast = head;while(true){if(fast==null || fast.next==null) return null;slow=slow.next;fast=fast.next.next;//定位到两针相遇位置,跳出,此时确定有环if(slow==fast)break;}//此时从head处走到环的开始处 与 从相遇处走到环的开始处 步数一样fast=head;while(fast!=slow){slow=slow.next;fast=fast.next;}return slow;}
}

725. 分隔链表

class Solution {public ListNode[] splitListToParts(ListNode head, int k) {ListNode[] ans = new ListNode[k];if(head==null) return ans;// 遍历链表int len = 0;ListNode cur = head;while (cur != null) {len++;cur = cur.next;}// 计算每组的长度 和 多余的长度int subLen = (len>k) ? (len/k):1;int rest = (len>k) ? (len%k):0;cur = head;int num = 0;while(cur!=null){//每组需要移动的长度int move = subLen + (((rest--)>0)?1:0);for(int i=0; i<move-1; i++){cur=cur.next;}ans[num]=head;head=cur.next;cur.next=null;cur=head;num++;}return ans;}
}

148. 排序链表

【力扣hot100】【LeetCode 148】排序链表|归并排序的应用_哔哩哔哩_bilibili

class Solution {public ListNode sortList(ListNode head) {if(head==null || head.next==null) return head;ListNode head2 = middleList(head);head = sortList(head);head2 = sortList(head2);return merge(head, head2);}//找链表中点,并断链public ListNode middleList(ListNode head){ListNode dummy = new ListNode(-1);ListNode pre = dummy;ListNode slow = head;ListNode fast = head;while(fast!=null && fast.next!=null){//pre=pre.next 不行,有空指针pre=slow;slow=slow.next;fast=fast.next.next;}pre.next=null;return slow;}//两个链表合成有序链表public ListNode merge(ListNode list1, ListNode list2){ListNode dummy = new ListNode(-1);ListNode cur = dummy;while(list1!=null && list2!=null){if(list1.val<list2.val){cur.next=list1;list1=list1.next;}else{cur.next=list2;list2=list2.next;}cur=cur.next;}//以防有链表没结束if(list1!=null && list2==null) cur.next=list1;if(list1==null && list2!=null) cur.next=list2;return dummy.next;}
}

138. 随机链表的复制

题解:leetcode上——> 两种实现+图解 138. 复制带随机指针的链

/*
// Definition for a Node.
class Node {int val;Node next;Node random;public Node(int val) {this.val = val;this.next = null;this.random = null;}
}
*/class Solution {public Node copyRandomList(Node head) {if(head==null) return head;Node pre = head;//在每个节点后面设置新节点while(pre!=null){Node newNode = new Node(pre.val, pre.next, null);pre.next=newNode;pre=newNode.next;}pre=head;
//设置新节点的随机random指针while(pre!=null && pre.next!=null){if(pre.random!=null)pre.next.random=pre.random.next;pre=pre.next.next;}Node cur = head;Node dummy = new Node(-1);pre=dummy;//设法将新旧两个链表分开while(cur!=null){pre.next=cur.next;pre=pre.next;cur.next=pre.next;cur=cur.next;           }return dummy.next;}
}

146. LRU 缓存

class LRUCache {private static class Node {Node pre, next;int key, value;// 构造器Node(int key, int value) {this.key = key;this.value = value;}}private final int capacity;private final Node dummy = new Node(0, 0);private final Map<Integer, Node> keyToNode = new HashMap<>();public LRUCache(int capacity) {this.capacity = capacity;dummy.next = dummy;dummy.pre = dummy;}public int get(int key) {Node node = getAndFront(key);if (node == null) {return -1;}return node.value;}//易错处public void put(int key, int value) {// 如果key的node存在Node node = keyToNode.get(key);if (node != null) {node.value = value;remove(node);addFront(node);return;}// 这个key不存在,新建nodenode = new Node(key, value);addFront(node);keyToNode.put(key, node);if (keyToNode.size() > capacity) {// 从表尾删除一个节点Node lastNode = dummy.pre;keyToNode.remove(lastNode.key);remove(lastNode);}}// 以上的put和get应基于以下几个基础操作// 删除节点public void remove(Node x) {x.pre.next = x.next;x.next.pre = x.pre;}// 从链表头插入public void addFront(Node x) {x.pre = dummy;dummy.next.pre = x;x.next = dummy.next;dummy.next = x;}// 用key get某个节点,并把节点移到链表头部public Node getAndFront(int key) {if (!keyToNode.containsKey(key))return null;Node node = keyToNode.get(key);remove(node);addFront(node);return node;}
}

2. 两数相加

class Solution {public ListNode addTwoNumbers(ListNode l1, ListNode l2) {ListNode dummy = new ListNode(0); // 辅助节点ListNode pre = dummy;//进位carryint carry=0;while(l1!=null || l2!=null){if(l1!=null){carry += l1.val;l1=l1.next;}if(l2!=null){carry += l2.val;l2=l2.next;}//新节点是carry的个位数pre.next = new ListNode(carry%10);pre = pre.next;//判断是否有进位carry = (carry>=10)?1:0;}//最后循环结束,如果有进位,还需要补上最后一个1(这个1是最高位的1)if(carry==1){pre.next = new ListNode(carry);}return dummy.next;}
}

25. K 个一组翻转链表(⭐)

【LeetCode 每日一题】25. K 个一组翻转链表 | 手写图解版思路 + 代码讲解_哔哩哔哩_bilibili

class Solution {public ListNode reverseKGroup(ListNode head, int k) {ListNode dummy = new ListNode(-1, head);ListNode start_pre = dummy;ListNode end = dummy;while(true){//遍历end,至本组最后一个节点for(int i=0; i<k&&end!=null; i++)end=end.next;if(end==null) break;//start为本组第一个节点ListNode start = start_pre.next;//endNxt为下一组的最后一个节点ListNode endNxt = end.next;//翻转之前把链断掉end.next=null;//翻转本组节点start_pre.next = reverse(start);//翻转之后,本组的尾部去接下一组的头部start.next=endNxt;//调整各个指针位置end = start;start_pre = start;}return dummy.next;}public ListNode reverse(ListNode head){ListNode pre = null;ListNode cur = head;while(cur!=null){ListNode nxt = cur.next;cur.next=pre;pre=cur;cur=nxt;}return pre;}
}

23. 合并 K 个升序链表(hard)

迭代法
class Solution {public ListNode mergeKLists(ListNode[] lists) {int n = lists.length;if (n == 0) return null;while(n>1){//index每次都初始化为0,因为要在lists的开头来存放合并出来的临时结果int index = 0;for(int i=0; i<n; i+=2){ListNode l1 = lists[i];ListNode l2 = null;if(i+1<n)l2 = lists[i+1];lists[index++] = mergeTwoLists(l1, l2);}//index是lists数组新的长度n = index;}return lists[0];}
递归法
/*** Definition for singly-linked list.* public class ListNode {* int val;* ListNode next;* ListNode() {}* ListNode(int val) { this.val = val; }* ListNode(int val, ListNode next) { this.val = val; this.next = next; }* }*/
class Solution {public ListNode mergeKLists(ListNode[] lists) {if (lists.length == 0) return null;return merge(lists, 0, lists.length-1);}//递归法public ListNode merge(ListNode[] lists, int low, int high){if(low==high)return lists[low];int middle = low + (high-low)/2;ListNode l1 = merge(lists, low, middle);ListNode l2 = merge(lists, middle+1, high);return mergeTwoLists(l1, l2);}//合并两个有序链表public ListNode mergeTwoLists(ListNode list1, ListNode list2) {if (list1 == null && list2 == null)return null;if (list1 == null || list2 == null)return (list1 == null) ? list2 : list1;ListNode dummy = new ListNode(-1);ListNode pre = dummy;while (list1 != null && list2 != null) {if (list1.val < list2.val) {pre.next = list1;list1 = list1.next;} else {pre.next = list2;list2 = list2.next;}pre = pre.next;}if (list1 != null)pre.next = list1;if (list2 != null)pre.next = list2;return dummy.next;}
}

相关文章:

LeetCode:链表

160. 相交链表 /*** 单链表的定义* Definition for singly-linked list.* public class ListNode {* int val;* ListNode next;* ListNode(int x) {* val x;* next null;* }* }*/ public class Solution {public ListNode getIntersectionN…...

Dockerfile项目实战-单阶段构建Vue2项目

单阶段构建镜像-Vue2项目 1 项目层级目录 以下是项目的基本目录结构&#xff1a; 2 Node版本 博主的Windows电脑安装了v14.18.3的node.js版本&#xff0c;所以直接使用本机电脑生成项目&#xff0c;然后拷到了 Centos 7 里面 # 查看本机node版本 node -v3 创建Vue2项目 …...

音视频小白系统入门笔记-0

本系列笔记为博主学习李超老师课程的课堂笔记&#xff0c;仅供参阅 音视频小白系统入门课 音视频基础ffmpeg原理 绪论 ffmpeg推流 ffplay/vlc拉流 使用rtmp协议 ffmpeg -i <source_path> -f flv rtmp://<rtmp_server_path> 为什么会推流失败&#xff1f; 默认…...

Zabbix 简介+部署+对接Grafana(详细部署!!)

目录 一.Zabbix简介 1.Zabbix是什么 2.Zabbix工作原理&#xff08;重点&#xff09;​ 3.Zabbix 的架构&#xff08;重点&#xff09;​ 1.服务端 2.客户端&#xff1a; 4.Zabbix和Prometheus区别 二.Zabbix 部署 1.前期准备 2.安装zabbix软件源和组件 3.安装数据库…...

C++: Initialization and References to const 初始化和常引用

cpp primer 5e, P97. 理解 这是一段很容易被忽略、 但是又非常重要的内容。 In 2.3.1 (p. 51) we noted that there are two exceptions to the rule that the type of a reference must match the type of the object to which it refers. The first exception is that we …...

Ubuntu2404装机指南

因为原来的2204升级到2404后直接嘎了&#xff0c;于是要重新装一下Ubuntu2404 Ubuntu系统下载 | Ubuntuhttps://cn.ubuntu.com/download我使用的是balenaEtcher将iso文件烧录进U盘后&#xff0c;使用u盘安装&#xff0c;默认选的英文版本&#xff0c; 安装后&#xff0c;安装…...

职坐标:智慧城市未来发展的核心驱动力

内容概要 智慧城市的演进正以颠覆性创新重构人类生存空间&#xff0c;其发展脉络由物联网、人工智能与云计算三大技术支柱交织而成。这些技术不仅推动城市治理从经验决策转向数据驱动模式&#xff0c;更通过实时感知与智能分析&#xff0c;实现交通、能源等领域的精准调控。以…...

DAY 45 leetcode 28的kmp算法实现

KMP算法的思路 例&#xff1a; 文本串&#xff1a;a a b a a b a a f 模式串&#xff1a;a a b a a f 两个指针分别指向上下两串&#xff0c;当出现分歧时&#xff0c;并不将上下的都重新回退&#xff0c;而是利用“next数组”获取已经比较过的信息&#xff0c;上面的指针不…...

从代码学习深度学习 - 自注意力和位置编码 PyTorch 版

这里写自定义目录标题 前言一、自注意力:Transformer 的核心1.1 多头注意力机制的实现1.2 缩放点积注意力1.3 掩码和序列处理1.4 自注意力示例二、位置编码:为序列添加位置信息2.1 位置编码的实现2.2 可视化位置编码总结前言 深度学习近年来在自然语言处理、计算机视觉等领域…...

设计和实现一个基于 DDS(直接数字频率合成) 的波形发生器

设计和实现一个基于 DDS&#xff08;直接数字频率合成&#xff09; 的波形发生器 1. 学习和理解IP软核和DDS 关于 IP 核的使用方法 IP 核&#xff1a;在 FPGA 设计中&#xff0c;IP 核&#xff08;Intellectual Property Core&#xff09;是由硬件描述语言&#xff08;HDL&a…...

AWS IAM权限详解:10个关键权限及其安全影响

1. 引言 在AWS (Amazon Web Services) 环境中,Identity and Access Management (IAM) 是确保云资源安全的核心组件。本文将详细解析10个关键的IAM权限,这些权限对AWS的权限管理至关重要,同时也可能被用于权限提升攻击。深入理解这些权限对于加强AWS环境的安全性至关重要。 2.…...

UniRig ,清华联合 VAST 开源的通用自动骨骼绑定框架

UniRig是清华大学计算机系与VAST联合开发的前沿自动骨骼绑定框架&#xff0c;专为处理复杂且多样化的3D模型而设计。基于强大的自回归模型和骨骼点交叉注意力机制&#xff0c;UniRig能够生成高质量的骨骼结构和精确的蒙皮权重&#xff0c;大幅提升动画制作的效率和质量。 UniR…...

DELL电脑开机进入自检界面

疑难解答 - 如何解决开机直接进入BIOS画面 添加链接描述 一、DELL电脑开机自检提示please run setup program 未设置一天中的时间-请运行安装程序(Time-of-day not set - please run SETUP program) 配置信息无效-请运行安装程序(Invalid configuration information - ple…...

分库分表-除了hash分片还有别的吗?

在分库分表的设计中,除了常见的 Hash 分片,还有多种策略根据业务场景灵活选择。以下是几种主流的分库分表策略及其应用场景、技术实现和优缺点分析,结合项目经验(如标易行投标服务平台的高并发场景)进行说明: 一、常见分库分表策略 1. 范围分片(Range Sharding) 原理:…...

Spring Cloud初探之使用load balance包做负载均衡(三)

一、背景说明 基于前一篇文章《Spring Cloud初探之nacos服务注册管理(二)》&#xff0c;我们已经将服务注册到nacos。接下来继续分析如何用Spring cloud的load balance做负载均衡。 load balance是客户端负载均衡组件。本质是调用方拿到所有注册的服务实例列表&#xff0c;然…...

MySQL 数据库备份和恢复全指南

MySQL 是一款常用的开源数据库系统&#xff0c;在日常运维中&#xff0c;数据备份和恢复是系统管理的重要一环。本文将细致介绍 MySQL 两大备份方案—— mysqldump 和 XtraBackup&#xff0c;包括备份方式、恢复步骤、定时脚本、远程备份和常见问题处理方案。 一、mysqldump 备…...

Linux 命令全解析:从零开始掌握 Linux 命令行

Linux 作为一款强大的开源操作系统&#xff0c;广泛应用于服务器、嵌入式系统以及超级计算机领域。掌握 Linux 命令行技能&#xff0c;是每一位开发者和系统管理员的必备能力。本文将从基础开始&#xff0c;为你详细介绍常用的 Linux 命令&#xff0c;以及它们的使用场景和示例…...

vector常用的接口和底层

一.vector的构造函数 我们都是只讲常用的。 这四个都是比较常用的。 第一个简单来看就是无参构造&#xff0c;是通过一个无参的对象来对我们的对象进行初始化的&#xff0c;第一个我们常用来当无参构造来使用。 第二个我们常用的就是通过多个相同的数字来初始化一个vector。 像…...

VMware安装Ubuntu实战分享

1.前期准备 1. 硬件要求 确保您的计算机满足以下基本硬件要求&#xff0c;以便顺利运行 VMware 和 Ubuntu&#xff1a; 处理器&#xff1a; 至少支持虚拟化技术&#xff08;如 Intel VT-x 或 AMD-V&#xff09;。可以在 BIOS 设置中启用此功能。 内存&#xff1a; 至少 4GB …...

解锁Grok-3的极致潜能:高阶应用与创新实践

引言 Grok-3&#xff0c;作为xAI公司推出的第三代人工智能模型&#xff0c;以其强大的推理能力和多模态处理能力在全球AI领域掀起了热潮。不仅在数学、科学和编程等基准测试中超越了众多主流模型&#xff0c;其独特的DeepSearch和Big Brain模式更赋予了它处理复杂任务的卓越性…...

【2025年3月中科院1区SCI】Rating entropy等级熵及5种多尺度,特征提取、故障诊断新方法!

引言 2025年3月&#xff0c;研究者在国际机械领域顶级期刊《Mechanical Systems and Signal Processing》&#xff08;JCR 1区&#xff0c;中科院1区 Top&#xff0c;IF&#xff1a;7.9&#xff09;上以“Rating entropy and its multivariate version”为题发表科学研究成果。…...

【AI学习】李宏毅老师讲AI Agent摘要

在b站听了李宏毅2025最新的AI Agent教程&#xff0c;简单易懂&#xff0c;而且紧跟发展&#xff0c;有大量最新的研究进展。 教程中引用了大量论文&#xff0c;为了方便将来阅读相关论文&#xff0c;进一步深入理解&#xff0c;做了截屏纪录。 同时也做一下分享。 根据经验调整…...

Nacos-Controller 2.0:使用 Nacos 高效管理你的 K8s 配置

作者&#xff1a;濯光、翼严 Kubernetes 配置管理的局限 目前&#xff0c;在 Kubernetes 集群中&#xff0c;配置管理主要通过 ConfigMap 和 Secret 来实现。这两种资源允许用户将配置信息通过环境变量或者文件等方式&#xff0c;注入到 Pod 中。尽管 Kubernetes 提供了这些强…...

小程序获取用户总结(全)

获取方式 目前小程序获取用户一共有3中(自己接触到的),但由于这个API一直在改,所以不确定后期是否有变动,还是要多关注官方公告。 方式一 使用wx.getUserInfo 实例: wxml 文件<button open-type="getUserInfo" bindgetuserinfo="onGetUserInfo&quo…...

SQL(2):SQL条件判断、排序、插入、更新、删除

1、满足条件 AND和OR&#xff0c;简单 SELECT * FROM 表 WHERE countryCN AND alexa > 50;SELECT * FROM Websites WHERE countryUSA OR countryCN;2、排序&#xff0c;掌握&#xff1a;<order by&#xff0c;降序怎么表示> 就没问题 默认升序&#xff0c;ASC表示升…...

玩转Docker | 使用Docker部署Xnote笔记工具

玩转Docker | 使用Docker部署Xnote笔记工具 前言一、Xnote介绍Xnote简介1.2 Xnote特点二、系统要求环境要求环境检查Docker版本检查检查操作系统版本三、部署Xnote服务下载镜像编辑配置文件编辑部署文件创建容器检查容器状态检查服务端口安全设置四、访问Xnote服务访问Xnote首页…...

RPCRT4!OsfCreateRpcAddress函数分析之AssociationBucketMutexMemory数组的填充

第一部分&#xff1a; 1: kd> p RPCRT4!OsfCreateRpcAddress0x28: 001b:77c0f4f5 e888e5ffff call RPCRT4!OSF_ADDRESS::OSF_ADDRESS (77c0da82) 1: kd> t RPCRT4!OSF_ADDRESS::OSF_ADDRESS: 001b:77c0da82 ?? ??? 1: kd> kc # 00 RPCRT4!…...

【BUG】Redis RDB快照持久化及写操作禁止问题排查与解决

1 问题描述 在使用Redis 的过程中&#xff0c;遇到如下报错&#xff0c;错误信息是 “MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk...”&#xff0c;记录下问题排查过程。 2 问题排查与解决 该错误提示表明&#…...

conda如何安装和运行jupyter

在Conda环境中安装和运行Jupyter Notebook是一项常见且实用的任务&#xff0c;特别是在数据科学和机器学习项目中。以下是使用Conda安装和运行Jupyter Notebook的步骤&#xff1a; 安装Jupyter Notebook 首先&#xff0c;确保你的Conda是最新的。打开终端或Anaconda Prompt&a…...

java分页实例

引言 在现代Web应用和移动应用中&#xff0c;面对大量数据的展示&#xff0c;分页技术成为了提升用户体验和优化数据加载效率的关键手段。尤其是在MySQL数据库环境中&#xff0c;合理运用分页查询不仅能显著减少服务器负载&#xff0c;还能提升数据访问速度&#xff0c;为用户提…...