算法系列15天速成——第八天 线性表【下】

2023-11-19

 

一:线性表的简单回顾

       上一篇跟大家聊过“线性表"顺序存储,通过实验,大家也知道,如果我每次向

顺序表的头部插入元素,都会引起痉挛,效率比较低下,第二点我们用顺序存储时,容

易受到长度的限制,反之就会造成空间资源的浪费。

 

二:链表

      对于顺序表存在的若干问题,链表都给出了相应的解决方案。

1. 概念:其实链表的“每个节点”都包含一个”数据域“和”指针域“。

            ”数据域“中包含当前的数据。

            ”指针域“中包含下一个节点的指针。

            ”头指针”也就是head,指向头结点数据。

            “末节点“作为单向链表,因为是最后一个节点,通常设置指针域为null。

代码段如下:

 1     #region 链表节点的数据结构
2 /// <summary>
3 /// 链表节点的数据结构
4 /// </summary>
5 public class Node<T>
6 {
7/// <summary>
8 /// 节点的数据域
9 /// </summary>
10 public T data;
11
12 /// <summary>
13 /// 节点的指针域
14 /// </summary>
15 public Node<T> next;
16 }
17 #endregion


2.常用操作:

    链表的常用操作一般有:

           ①添加节点到链接尾,②添加节点到链表头,③插入节点。

           ④删除节点,⑤按关键字查找节点,⑥取链表长度。

   

<1> 添加节点到链接尾:

          前面已经说过,链表是采用指针来指向下一个元素,所以说要想找到链表最后一个节点,

       必须从头指针开始一步一步向后找,少不了一个for循环,所以时间复杂度为O(N)。

 

代码段如下:

 1 #region 将节点添加到链表的末尾
2 /// <summary>
3 /// 将节点添加到链表的末尾
4 /// </summary>
5 /// <typeparam name="T"></typeparam>
6 /// <param name="head"></param>
7 /// <param name="data"></param>
8 /// <returns></returns>
9 public Node<T> ChainListAddEnd<T>(Node<T> head, T data)
10 {
11 Node<T> node = new Node<T>();
12
13 node.data = data;
14 node.next = null;
15
16 ///说明是一个空链表
17 if (head == null)
18 {
19 head = node;
20 return head;
21 }
22
23 //获取当前链表的最后一个节点
24 ChainListGetLast(head).next = node;
25
26 return head;
27 }
28 #endregion
29 #region 得到当前链表的最后一个节点
30 /// <summary>
31 /// 得到当前链表的最后一个节点
32 /// </summary>
33 /// <typeparam name="T"></typeparam>
34 /// <param name="head"></param>
35 /// <returns></returns>
36 public Node<T> ChainListGetLast<T>(Node<T> head)
37 {
38 if (head.next == null)
39 return head;
40 return ChainListGetLast(head.next);
41 }
42 #endregion

 

<2> 添加节点到链表头:

          大家现在都知道,链表是采用指针指向的,要想将元素插入链表头,其实还是很简单的,

      思想就是:① 将head的next指针给新增节点的next。②将整个新增节点给head的next。

      所以可以看出,此种添加的时间复杂度为O(1)。

 

效果图:

代码段如下:

 1#region 将节点添加到链表的开头
2 /// <summary>
3 /// 将节点添加到链表的开头
4 /// </summary>
5 /// <typeparam name="T"></typeparam>
6 /// <param name="chainList"></param>
7 /// <param name="data"></param>
8 /// <returns></returns>
9 public Node<T> ChainListAddFirst<T>(Node<T> head, T data)
10 {
11 Node<T> node = new Node<T>();
12
13 node.data = data;
14 node.next = head;
15
16 head = node;
17
18 return head;
19
20 }
21 #endregion


<3> 插入节点:

           其实这个思想跟插入到”首节点“是一个模式,不过多了一步就是要找到当前节点的操作。然后找到

      这个节点的花费是O(N)。上图上代码,大家一看就明白。

 

效果图:

代码段:

 1 #region 将节点插入到指定位置
2 /// <summary>
3 /// 将节点插入到指定位置
4 /// </summary>
5 /// <typeparam name="T"></typeparam>
6 /// <param name="head"></param>
7 /// <param name="currentNode"></param>
8 /// <param name="data"></param>
9 /// <returns></returns>
10 public Node<T> ChainListInsert<T, W>(Node<T> head, string key, Func<T, W> where, T data) where W : IComparable
11 {
12 if (head == null)
13 return null;
14
15 if (where(head.data).CompareTo(key) == 0)
16 {
17 Node<T> node = new Node<T>();
18
19 node.data = data;
20
21 node.next = head.next;
22
23 head.next = node;
24 }
25
26 ChainListInsert(head.next, key, where, data);
27
28 return head;
29 }
30 #endregion

 

<4> 删除节点:

        这个也比较简单,不解释,图跟代码更具有说服力,口头表达反而让人一头雾水。

        当然时间复杂度就为O(N),N是来自于查找到要删除的节点。

 

效果图:

代码段:

 1 #region 将指定关键字的节点删除
2 /// <summary>
3 /// 将指定关键字的节点删除
4 /// </summary>
5 /// <typeparam name="T"></typeparam>
6 /// <typeparam name="W"></typeparam>
7 /// <param name="head"></param>
8 /// <param name="key"></param>
9 /// <param name="where"></param>
10 /// <param name="data"></param>
11 /// <returns></returns>
12 public Node<T> ChainListDelete<T, W>(Node<T> head, string key, Func<T, W> where) where W : IComparable
13 {
14 if (head == null)
15 return null;
16
17 //这是针对只有一个节点的解决方案
18 if (where(head.data).CompareTo(key) == 0)
19 {
20 if (head.next != null)
21 head = head.next;
22 else
23 return head = null;
24 }
25 else
26 {
27 //判断一下此节点是否是要删除的节点的前一节点
28 while (head.next != null && where(head.next.data).CompareTo(key) == 0)
29 {
30 //将删除节点的next域指向前一节点
31 head.next = head.next.next;
32 }
33 }
34
35 ChainListDelete(head.next, key, where);
36
37 return head;
38 }
39 #endregion



<5> 按关键字查找节点:

         这个思想已经包含到“插入节点”和“删除节点”的具体运用中的,其时间复杂度为O(N)。

 

代码段:

 1 #region 通过关键字查找指定的节点
2 /// <summary>
3 /// 通过关键字查找指定的节点
4 /// </summary>
5 /// <typeparam name="T"></typeparam>
6 /// <typeparam name="W"></typeparam>
7 /// <param name="head"></param>
8 /// <param name="key"></param>
9 /// <param name="where"></param>
10 /// <returns></returns>
11 public Node<T> ChainListFindByKey<T, W>(Node<T> head, string key, Func<T, W> where) where W : IComparable
12 {
13 if (head == null)
14 return null;
15
16 if (where(head.data).CompareTo(key) == 0)
17 return head;
18
19 return ChainListFindByKey<T, W>(head.next, key, where);
20 }
21 #endregion


<6> 取链表长度:

          在单链表的操作中,取链表长度还是比较纠结的,因为他不像顺序表那样是在内存中连续存储的,

      因此我们就纠结的遍历一下链表的总长度。时间复杂度为O(N)。

 

代码段:

 1         #region 获取链表的长度
2 /// <summary>
3 ///// 获取链表的长度
4 /// </summary>
5 /// <typeparam name="T"></typeparam>
6 /// <param name="head"></param>
7 /// <returns></returns>
8 public int ChanListLength<T>(Node<T> head)
9 {
10 int count = 0;
11
12 while (head != null)
13 {
14 ++count;
15 head = head.next;
16 }
17
18 return count;
19 }
20 #endregion

 

 

好了,最后上一下总的运行代码:

View Code
  1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5
6 namespace ChainList
7 {
8 class Program
9 {
10 static void Main(string[] args)
11 {
12 ChainList chainList = new ChainList();
13
14 Node<Student> node = null;
15
16 Console.WriteLine("将三条数据添加到链表的尾部:\n");
17
18 //将数据添加到链表的尾部
19 node = chainList.ChainListAddEnd(node, new Student() { ID = 2, Name = "hxc520", Age = 23 });
20 node = chainList.ChainListAddEnd(node, new Student() { ID = 3, Name = "博客园", Age = 33 });
21 node = chainList.ChainListAddEnd(node, new Student() { ID = 5, Name = "一线码农", Age = 23 });
22
23 Dispaly(node);
24
25 Console.WriteLine("将ID=1的数据插入到链表开头:\n");
26
27 //将ID=1的数据插入到链表开头
28 node = chainList.ChainListAddFirst(node, new Student() { ID = 1, Name = "i can fly", Age = 23 });
29
30 Dispaly(node);
31
32 Console.WriteLine("查找Name=“一线码农”的节点\n");
33
34 //查找Name=“一线码农”的节点
35 var result = chainList.ChainListFindByKey(node, "一线码农", i => i.Name);
36
37 DisplaySingle(node);
38
39 Console.WriteLine("将”ID=4“的实体插入到“博客园”这个节点的之后\n");
40
41 //将”ID=4“的实体插入到"博客园"这个节点的之后
42 node = chainList.ChainListInsert(node, "博客园", i => i.Name, new Student() { ID = 4, Name = "51cto", Age = 30 });
43
44 Dispaly(node);
45
46 Console.WriteLine("删除Name=‘51cto‘的节点数据\n");
47
48 //删除Name=‘51cto‘的节点数据
49 node = chainList.ChainListDelete(node, "51cto", i => i.Name);
50
51 Dispaly(node);
52
53 Console.WriteLine("获取链表的个数:" + chainList.ChanListLength(node));
54 }
55
56 //输出数据
57 public static void Dispaly(Node<Student> head)
58 {
59 Console.WriteLine("******************* 链表数据如下 *******************");
60 var tempNode = head;
61
62 while (tempNode != null)
63 {
64 Console.WriteLine("ID:" + tempNode.data.ID + ", Name:" + tempNode.data.Name + ",Age:" + tempNode.data.Age);
65 tempNode = tempNode.next;
66 }
67
68 Console.WriteLine("******************* 链表数据展示完毕 *******************\n");
69 }
70
71 //展示当前节点数据
72 public static void DisplaySingle(Node<Student> head)
73 {
74 if (head != null)
75 Console.WriteLine("ID:" + head.data.ID + ", Name:" + head.data.Name + ",Age:" + head.data.Age);
76 else
77 Console.WriteLine("未查找到数据!");
78 }
79 }
80
81 #region 学生数据实体
82 /// <summary>
83 /// 学生数据实体
84 /// </summary>
85 public class Student
86 {
87 public int ID { get; set; }
88
89 public string Name { get; set; }
90
91 public int Age { get; set; }
92 }
93 #endregion
94
95 #region 链表节点的数据结构
96 /// <summary>
97 /// 链表节点的数据结构
98 /// </summary>
99 public class Node<T>
100 {
101 /// <summary>
102 /// 节点的数据域
103 /// </summary>
104 public T data;
105
106 /// <summary>
107 /// 节点的指针域
108 /// </summary>
109 public Node<T> next;
110 }
111 #endregion
112
113 #region 链表的相关操作
114 /// <summary>
115 /// 链表的相关操作
116 /// </summary>
117 public class ChainList
118 {
119 #region 将节点添加到链表的末尾
120 /// <summary>
121 /// 将节点添加到链表的末尾
122 /// </summary>
123 /// <typeparam name="T"></typeparam>
124 /// <param name="head"></param>
125 /// <param name="data"></param>
126 /// <returns></returns>
127 public Node<T> ChainListAddEnd<T>(Node<T> head, T data)
128 {
129 Node<T> node = new Node<T>();
130
131 node.data = data;
132 node.next = null;
133
134 ///说明是一个空链表
135 if (head == null)
136 {
137 head = node;
138 return head;
139 }
140
141 //获取当前链表的最后一个节点
142 ChainListGetLast(head).next = node;
143
144 return head;
145 }
146 #endregion
147
148 #region 将节点添加到链表的开头
149 /// <summary>
150 /// 将节点添加到链表的开头
151 /// </summary>
152 /// <typeparam name="T"></typeparam>
153 /// <param name="chainList"></param>
154 /// <param name="data"></param>
155 /// <returns></returns>
156 public Node<T> ChainListAddFirst<T>(Node<T> head, T data)
157 {
158 Node<T> node = new Node<T>();
159
160 node.data = data;
161 node.next = head;
162
163 head = node;
164
165 return head;
166
167 }
168 #endregion
169
170 #region 将节点插入到指定位置
171 /// <summary>
172 /// 将节点插入到指定位置
173 /// </summary>
174 /// <typeparam name="T"></typeparam>
175 /// <param name="head"></param>
176 /// <param name="currentNode"></param>
177 /// <param name="data"></param>
178 /// <returns></returns>
179 public Node<T> ChainListInsert<T, W>(Node<T> head, string key, Func<T, W> where, T data) where W : IComparable
180 {
181 if (head == null)
182 return null;
183
184 if (where(head.data).CompareTo(key) == 0)
185 {
186 Node<T> node = new Node<T>();
187
188 node.data = data;
189
190 node.next = head.next;
191
192 head.next = node;
193 }
194
195 ChainListInsert(head.next, key, where, data);
196
197 return head;
198 }
199 #endregion
200
201 #region 将指定关键字的节点删除
202 /// <summary>
203 /// 将指定关键字的节点删除
204 /// </summary>
205 /// <typeparam name="T"></typeparam>
206 /// <typeparam name="W"></typeparam>
207 /// <param name="head"></param>
208 /// <param name="key"></param>
209 /// <param name="where"></param>
210 /// <param name="data"></param>
211 /// <returns></returns>
212 public Node<T> ChainListDelete<T, W>(Node<T> head, string key, Func<T, W> where) where W : IComparable
213 {
214 if (head == null)
215 return null;
216
217 //这是针对只有一个节点的解决方案
218 if (where(head.data).CompareTo(key) == 0)
219 {
220 if (head.next != null)
221 head = head.next;
222 else
223 return head = null;
224 }
225 else
226 {
227 //判断一下此节点是否是要删除的节点的前一节点
228 if (head.next != null && where(head.next.data).CompareTo(key) == 0)
229 {
230 //将删除节点的next域指向前一节点
231 head.next = head.next.next;
232 }
233 }
234
235 ChainListDelete(head.next, key, where);
236
237 return head;
238 }
239 #endregion
240
241 #region 通过关键字查找指定的节点
242 /// <summary>
243 /// 通过关键字查找指定的节点
244 /// </summary>
245 /// <typeparam name="T"></typeparam>
246 /// <typeparam name="W"></typeparam>
247 /// <param name="head"></param>
248 /// <param name="key"></param>
249 /// <param name="where"></param>
250 /// <returns></returns>
251 public Node<T> ChainListFindByKey<T, W>(Node<T> head, string key, Func<T, W> where) where W : IComparable
252 {
253 if (head == null)
254 return null;
255
256 if (where(head.data).CompareTo(key) == 0)
257 return head;
258
259 return ChainListFindByKey<T, W>(head.next, key, where);
260 }
261 #endregion
262
263 #region 获取链表的长度
264 /// <summary>
265 ///// 获取链表的长度
266 /// </summary>
267 /// <typeparam name="T"></typeparam>
268 /// <param name="head"></param>
269 /// <returns></returns>
270 public int ChanListLength<T>(Node<T> head)
271 {
272 int count = 0;
273
274 while (head != null)
275 {
276 ++count;
277 head = head.next;
278 }
279
280 return count;
281 }
282 #endregion
283
284 #region 得到当前链表的最后一个节点
285 /// <summary>
286 /// 得到当前链表的最后一个节点
287 /// </summary>
288 /// <typeparam name="T"></typeparam>
289 /// <param name="head"></param>
290 /// <returns></returns>
291 public Node<T> ChainListGetLast<T>(Node<T> head)
292 {
293 if (head.next == null)
294 return head;
295 return ChainListGetLast(head.next);
296 }
297 #endregion
298
299 }
300 #endregion
301 }

 

运行结果:

 

当然,单链表操作中有很多是O(N)的操作,这给我们带来了尴尬的局面,所以就有了很多的

优化方案,比如:双向链表,循环链表。静态链表等等,这些希望大家在懂得单链表的情况下

待深一步的研究。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

算法系列15天速成——第八天 线性表【下】 的相关文章

  • 算法:双指针

    双指针 双指针是一种思想或一种技巧并不是特别具体的算法 具体就是用两个变量动态存储两个结点 来方便我们进行一些操作 通常用在线性的数据结构中 特别是链表类的题目 经常需要用到两个或多个指针配合来记忆链表上的节点 完成某些操作 常见的双指针方
  • 数据结构中常见的树(BST二叉搜索树、AVL平衡二叉树、RBT红黑树、B-树、B+树、B*树)

    原文 http blog csdn net sup heaven article details 39313731 数据结构中常见的树 BST二叉搜索树 AVL平衡二叉树 RBT红黑树 B 树 B 树 B 树 转载 2014年09月16日
  • 50个c/c++源代码网站

    C C 是最主要的编程语言 这里列出了50名优秀网站和网页清单 这些网站提供c c 源代码 这份清单提供了源代码的链接以及它们的小说明 我已尽力包括最佳的C C 源代码的网站 这不是一个完整的清单 您有建议可以联系我 我将欢迎您的建 议 以
  • 《Linux From Scratch》第三部分:构建LFS系统 第六章:安装基本的系统软件- 6.29. Coreutils-8.23...

    Coreutils 软件包包含用于显示和设置基本系统特性的工具 大概编译时间 2 5 SBU 需要磁盘空间 193 MB 6 29 1 安装 Coreutils POSIX 要求 Coreutils 中的程序即使在多字节语言环境也能正确识别
  • 将二叉树转为有序的双向链表

    一 题目要求 输入一棵二叉排序树 现在要将该二叉排序树转换成一个有序的双向链表 而且在转换的过程中 不能创建任何新的结点 只能调整树中的结点指针的指向来实现 include
  • Hash table and application in java

    查找的效率取决于在查找是比较的次数 次数越少效率越高 反之越低 最理想的情况是无需比较 一次存取便能找到所查找的记录 根据对应关系f找到给定值K的像f K hash function 应运而生 由此思想建的表称为hash table 集合h
  • 数据结构----链式栈

    目录 前言 链式栈 操作方式 1 存储结构 2 初始化 3 创建节点 4 判断是否满栈 5 判断是否空栈 6 入栈 7 出栈 8 获取栈顶元素 9 遍历栈 10 清空栈 完整代码 前言 前面我们学习过了数组栈的相关方法 链接 线性表 栈 栈
  • findBug 错误修改指南

    FindBugs错误修改指南 1 EC UNRELATED TYPES Bug Call to equals comparing different types Pattern id EC UNRELATED TYPES type EC c
  • 微软2013暑假实习生笔试题

    自己mark一下 以作后备 下面提交原文链接 原文博客 部分题目答案不确定 会持续更新 1 Which of the following calling convention s support s supportvariable leng
  • 常用的十种算法--马踏棋盘算法

    1 马踏棋盘算法介绍 马踏棋盘算法也被称为骑士周游问题 将马随机放在国际象棋的 8 8 棋盘 Board 0 7 0 7 的某个方格中 马按走棋规则 马走日字 进行移动 要求每个方格只进入一次 走遍棋盘上全部 64 个方格 2 马踏棋盘算法
  • 亚利桑那州立大学周纵苇:研习 U-Net ——现有的分割网络创新

    雷锋网AI研习社按 经典的 Encoder Decoder 结构在目标分割问题中展现出了举足轻重的作用 然而这样一个相对固定的框架使得模型在感受野大小和边界分割精度两方面很难达到兼顾 本次公开课 讲者以 U Net 为案例分析 总结现有的分
  • 数据结构小白之插入排序算法

    1 插入排序 1 1 思路 将n个需要排序的元素看成两个部分 一个是有序部分 一个是无序部分 开始的时候有序表只有一个元素 无序表有n 1个元素 排序过程中每次从无序表中取出元素 然后插入到有序表的适当位置 从而成为新的有序表 类似排队 如
  • 以太坊系列之十五: 以太坊数据库

    以太坊数据库中都存了什么 以太坊使用的数据库是一个NOSQL数据库 是谷歌提供的开源数据leveldb 这里尝试通过分析以太坊数据库存储了什么来分析以太坊可能为我们提供哪些关于区块链的API 存储内容 NOSQL是一个key value数据
  • Unique Binary Search Trees -- LeetCode

    原题链接 http oj leetcode com problems unique binary search trees 这道题要求可行的二叉查找树的数量 其实二叉查找树可以任意取根 只要满足中序遍历有序的要求就可以 从处理子问题的角度来
  • 浮生六记

    浮生六记 目录 浮生六记卷一 闺房记乐 002 浮生六记卷二 闲情记趣 015 浮生六记卷三 坎坷记愁 022 浮生六记卷四 浪游记快 034 浮生六记 2 浮生六记卷一 闺房记乐 余生乾隆癸未冬十一月二十有二日 正值太平盛世 且在 衣冠之
  • 二叉树结构的建立与遍历

    实验项目 1 编写建立二叉树的二叉链表存储结构 左右链表示 的程序 并以适当的形式显示和保存二叉树 2 完成二叉树的7种遍历操作 3 给定一个二叉树 编写算法完成下列应用 1 判断其是否为完全二叉树 2 求二叉树中任意两个结点的公共祖先 输
  • 索引优化之Explain 及慢查询日志

    索引 本质是数据结构 简单理解为 排好序的快速查找数据结构 以索引文件的形式存储在磁盘中 目的 提高数据查询的效率 优化查询性能 就像书的目录一样 优势 提高检索效率 降低IO成本 排好序的表 降低CPU的消耗劣势 索引实际也是一张表 该表
  • Leetcode2661. 找出叠涂元素

    Every day a Leetcode 题目来源 2661 找出叠涂元素 解法1 哈希 题目很绕 理解题意后就很简单 由于矩阵 mat 中每一个元素都不同 并且都在数组 arr 中 所以首先我们用一个哈希表 hash 来存储 mat 中每
  • 【数据结构】单链表的定义和操作

    目录 1 单链表的定义 2 单链表的创建和初始化 3 单链表的插入节点操作 4 单链表的删除节点操作 5 单链表的查找节点操作 6 单链表的更新节点操作 7 完整代码 嗨 我是 Filotimo 很高兴与大家相识 希望我的博客能对你有所帮助
  • C++ AVL树(四种旋转,插入)

    C AVL树 四种旋转 插入 一 AVL树的概念及性质 二 我们要实现的大致框架 1 AVL树的节点定义 2 AVL树的大致框架 三 插入 1 插入逻辑跟BST相同的那一部分 2 修改平衡因子

随机推荐

  • C语言字符数组和字符串

    http c biancheng net cpp html 2921 html 用来存放字符的数组称为字符数组 例如 char a 10 一维字符数组 char b 5 10 二维字符数组 char c 20 c p r o g r a m
  • ★教程2:fpga学习教程入门100例目录

    1 订阅本教程用户可以免费获得本博任意2个 包括所有免费专栏和付费专栏 博文对应代码 私信博主给出代码博文的链接和邮箱 2 本FPGA课程的所有案例 部分理论知识点除外 均由博主编写而成 供有兴趣的朋友们自己订阅学习使用 未经本人允许 禁止
  • AI系统论文阅读:SmartMoE

    提出稀疏架构是为了打破具有密集架构的DNN模型中模型大小和计算成本之间的连贯关系的 最著名的MoE MoE模型将传统训练模型中的layer换成了多个expert sub networks 对每个输入 都有一层special gating n
  • 这款毕设至少得收一千五,Python实现学生教师刷脸签到系统。

    背景 今天我在母校群又接到了一个做毕业设计的单子 论题 用Python或者Java实现学生教师刷脸签到系统 一般来讲做学生信息管理系统收500 这个大家觉得报价1500贵吗 我先带大家看干货 简介 利用Python语言 Flask框架 Dl
  • mysql查询时加不加引号的问题

    在查询mysql时碰到了查询条件加引号和不加引号的问题 一 如果字段本身是int类型 如果查询条件中加了引号 比如select from user where id 4 这时候可以查出id 4的用户信息 但是使用select from us
  • 打开mysql的步骤。

    安装mysql软件之后 打开mysql 显示error Can t connect to MySQL server on localhost 10061 原因是服务器没开 这个时候workbench连接不上 然后client登录不上 总结m
  • 2023华为OD机试真题【星际篮球争霸赛/动态规划】

    题目描述 在星球争霸篮球赛对抗赛中 最大的宇宙战队希望每个人都能拿到MVP MVP的条件是单场最高分得分获得者 可以并列所以宇宙战队决定在比赛中尽可能让更多队员上场 并且让所有得分的选手得分都相同 然而比赛过程中的每1分钟的得分都只能由某一
  • Radxa Rock 3a NPU调用指南

    0x0 Radxa Rock 3a开发板介绍 Radxa Rock 3a开发板是基于瑞芯微RK3568芯片设计的 ARM CPU采用4核Cortex A55 Cortex A53的继任者 主频最高可达2 0Ghz CPU性能相当于中高端手机
  • paramiko sftp 问题记录

    paramiko 是一款非常优秀得远程ssh库 能够ssh远程到主机 并执行命令 而且还能通过sftp连接主机 笔者得测试环境 因为安全关系 ssh默认端口修改成其他端口 再往上查阅资料 连接sftp 代码 t paramiko Trans
  • 坐标移动c语言,C语言 坐标移动详解及实例代码

    搜索热词 题目描述 开发一个坐标计算工具 A表示向左移动 D表示向右移动 W表示向上移动 S表示向下移动 从 0 0 点开始移动 从输入字符串里面读取一些坐标 并将最终输入结果输出到输出文件里面 输入 合法坐标为A 或者D或者W或者S 数字
  • 【狂神说】Mybatis学习笔记(全)

    文章目录 前言 1 简介 1 1 什么是MyBatis 1 2 如何获得Mybatis 1 3 持久化 1 3 1 数据持久化 1 3 2 为什么需要持久化 1 4 持久层 1 5 为什么需要MyBatis 2 第一个Mybatis程序 2
  • 《IT项目管理》-大题&计算题保分秘籍

    经过今天的努力 已经把大部分大题和计算题全部总结完了 希望对你们有用 查看链接自取 百度网盘 APP即可获取 链接 https pan baidu com s 1U0EFY23KgTtM8lKlYnjrug pwd tehx 提取码 teh
  • 软考-嵌入式系统设计师-笔记:历年专业英语题

    文章目录 2020年 2019年 2018年 2017年 2016年 2015年 2014年 2013年 2020年 题目 加粗的为各题答案 Fog computing is a mid layer between cloud data c
  • deepIn 、 DDE 系统桌面黑屏解决方案

    桌面黑屏有两种情况 1 桌面除了底部菜单栏 其它全是黑的 解决方案 Deepin sudo apt install reinstall dde DDE sudo apt fix broken install sudo apt install
  • 基于SpringBoot和vue的若依后台管理系统 部署

    RuoYi Vue是一款前后端分离的极速后台开发框架 基于SpringBoot和Vue 目录 一 准备 二 启动前端项目 解决报错 digital envelope routines unsupported 测试 三 启动后端项目 四 运行
  • 8个适合新手的Python小项目

    这是我挑出来的8个适合新手的小项目 涉及了爬虫 多线程 selenium PhantomJs itchat 邮件发送 crontab 命令行颜色显示 excel操作 PIL 识别验证码 首先说明 天下没有免费的午餐 每个项目平均下来2元多一
  • 根据子网掩码算出 IP 地址 的网络号和主机号

    我们如何根据子网掩码算出 IP 地址 的网络号和主机号呢 举个例子 比如 10 100 122 0 24 后面的 24表示就是 255 255 255 0 子网掩码 255 255 255 0 二进制是 11111111 11111111
  • Ant design Pro V5 +Typescript + Hooks + Umi + Dev + SpringBoot + mysql + redis + scrity 实现动态菜单权限管理

    Ant design Pro V5 Typescript Hooks Umi Dev SpringBoot mysql redis scrity 实现动态菜单权限管理 企业中台架构 1 app tsx页面配置 该页面集成了登陆权限控制 动态
  • Android实战系列(三)---级联菜单

    需求A 一级菜单 多级菜单联动 1 在activity上弹出多个pop窗口 达到父菜单与子菜单级联的效果 2 多个Activity页面相互的嵌套实现多级菜单 考虑 传值 数据结构的定义 之前在用前端写Android构造级联菜单出现过标题栏不
  • 算法系列15天速成——第八天 线性表【下】

    一 线性表的简单回顾 上一篇跟大家聊过 线性表 顺序存储 通过实验 大家也知道 如果我每次向 顺序表的头部插入元素 都会引起痉挛 效率比较低下 第二点我们用顺序存储时 容 易受到长度的限制 反之就会造成空间资源的浪费 二 链表 对于顺序表存