数据结构实验 3 双向链表的实现

数据结构之单链表实验 单链表实验实验目的实验环境实验要求实验内容源代码运行结果 实验目的 掌握线性表的定义、特点、逻辑结构,理解线性表的抽象数据类型。 熟练掌握线性表的两种存储结构的结构类型定义、特点和基本操作的实现。 通过本次实验帮助学生加深对线性表的理解,并加以应用; 实验环境 CodeBlocks 实验要求 1.熟悉c语言的语法知识; 2.了解线性表的逻辑结构特性; 3.掌握线性表的链式存储结构—单链表的定义、创建、插入、删除、取值等基本操作; 实验内容 完成单链表的基本操作(定义、初始化、插入、删除、定位等)的汇总, 阅读详情

写在前面:双向链表和单链表非常相似,会单链表的人完全可以不用看这篇文章。看过鄙人的单链表的话可以只看下面提及的几行代码,其余代码是完全一致的。

1.双向链表与单链表在结构定义上非常相似,只是双向链表比单链表多一个指针域指向该结点的直接前驱。(参考Two-way_Linked_List.h中的结构体定义第8行)

2.双向链表与单链表在大部分的基本操作上也非常相似,只是双向链表在头插法、尾插法、插入结点、删除结点操作上需要对前指针域进行更改。(参考Two-way_Linked_List.c中的Create_Head函数第21、22行、Create_Behind函数第41行、Insert_List函数146行、Delete_List函数165行)

3.因此,双向链表的测试函数可以直接沿用单链表的测试函数。

一、实验目的

1.掌握双向链表的定义。

2.掌握双向链表和单链表的区别和联系。

3.掌握双向链表的初始化、头插法、尾插法、打印、判断空表、清空链表、求表长、按址查找、按值查找、插入、删除等基本操作。

4. 了解双向链表和单链表的优缺点,能在不同情况下选择合适的存储方式。

二、实验要求

1. 写出双向链表的操作的详细算法步骤;

2. 使用C/C++实现双向链表,并编译运行。

三、实验过程

实验环境:visual studio 2017

实验步骤:

1.初始化链表L,定义函数名为Init_List;

2.头插法创建链表L,定义函数名为Create_Head;

3.尾插法创建链表L,定义函数名为Create_Behind;

4.打印链表L,定义函数名为Print_List;

5.判断链表L是否为空表,定义函数名为Empty_List;

6.清空链表L,定义函数名为Clear_List;

7.求链表L表长,定义函数名为Length_List;

8.查找第location个结点的元素值,定义函数名为Get_Data;

9.查找第一个值为e的元素的位置,定义函数名为Locate_Data;

10.在顺序表L第location个位置插入一个元素e,定义函数名为Insert_List;

11.将顺序表L第location个元素删除,定义函数名为Delete_List;

Two-way_Linked_List.h

#include<stdio.h>       //调用头文件
#include<stdlib.h>      //调用头文件
#define ELEMTYPE int    //用#define定义一个标识符ELEMTYPE表示int

typedef struct Lnode      //构建一个结构体存储链表信息
{
	ELEMTYPE data;         //数据域——存储元素值
    struct Lnode* prior;    //前指针域——指向该结点的直接前驱
	struct Lnode* next;    //指针域——指向该结点的直接后继
}LNode,*List;    //LNode为结构体类型别名,List为结构体指针

void Init_List(List* L);      //声明初始化函数-Init_List
void Create_Head(List* L);    //声明头插法创建链表函数-Create_Head
void Create_Behind(List* L);  //声明尾插法创建链表函数-Create_Behind
void Print_List(List L);      //声明打印函数-Print_List
bool Empty_List(List L);      //声明判断空表函数-Empty_List
void Clear_List(List* L);     //声明清空函数-Clear_List
int Length_List(List L);      //声明求表长函数-Length_List
void Get_Data(List L, int location, ELEMTYPE* e);    
//声明按位置查找元素值函数-Get_Data
int Locate_Data(List L, ELEMTYPE e);    
//声明按值查找元素位置函数-Locate_Data
void Insert_List(List* L, int i, ELEMTYPE e); //声明插入函数-Insert_List
void Delete_List(List* L, int i);    //声明删除函数-Delete_List

Two-way_Linked_List.c

#include "Linked_List.h"    //调用头文件

void Init_List(List* L)    //初始化链表L
{
	(*L) = (List)malloc(sizeof(LNode));  //用malloc给链表L分配一块内存
	(*L)->prior = (*L)->next = NULL;     //将头指针置为空
}

void Create_Head(List* L)    //头插法创建链表L
{
	int length;              //定义整型变量length表示链表L表长
	printf("Please input the length:");    //提示输入表长length
	scanf("%d", &length);                  //输入表长length
	for (int n = 1; n <= length; n++)      //向链表L中添加n个结点
	{
		List p;                             //定义结构体指针类型变量p
		p = (List)malloc(sizeof(LNode));    //用malloc给p分配一块内存
		printf("Please input the data:");   //提示输入结点p的数据域
		scanf("%d", &p->data);              //输入结点p的数据域
		p->next = (*L)->next;      //p作为新的首元结点,后指针域指向原来的首元结点
        (*L)->next->prior = p;    //原来的首元结点的前指针域指向新首元结点-p
        p->prior = (*L);      //前指针域指向头结点
		(*L)->next = p;      //更新首元结点
	}
}

void Create_Behind(List* L)    //尾插法创建链表L
{
	int length;          //定义整型变量length表示链表L长度
	List rear = (*L);    //rear指向尾结点,初始时指向头结点
	printf("Please input the length:");    //提示输入表长length
	scanf("%d", &length);                  //输入表长length
	for (int n = 1; n <= length; n++)      //向链表L中添加n个结点
	{
		List p;                              //定义结构体指针类型变量p
		p = (List)malloc(sizeof(LNode));      //用malloc给p分配一块内存
		printf("Please input the data:");    //提示输入结点p的数据域
		scanf("%d", &p->data);               //输入结点p的数据域
		p->next = NULL;                      //p为尾结点,后指针域为空
        p->prior = rear;    //p的前指针域指向原来的尾结点
		rear->next = p;    //原来的尾结点rear的后指针域指向现在的尾结点p
		rear = p;          //更新尾结点
	}
}

void Print_List(List L)    //打印链表L
{
	List p = L;            //定义结构体指针类型变量p为头结点
	printf("The linked list is:");    //提示输出链表L
	while (p->next != NULL)           //扫描链表L
	{
		p = p->next;                  //当前p为原来p的后继结点
		printf("%d ", p->data);       //打印p的数据域
	}
	printf("\n");                    //换行
}

bool Empty_List(List L)     		 //判断链表是否为空
{
	if (L->next == NULL)    			 //链表为空
	{
		printf("This list is empty.\n");    //表示链表L为空
		return true;   						 //返回true
	}
	else                     				 //链表L不为空
	{
		printf("This list isn't empty.\n"); //表示链表L不为空
		return false;    						 //返回false
	}
}

void Clear_List(List* L)      //清空链表L
{
	List p = (*L)->next,q;    //定义结构体指针变量q,p为首元结点
	while (p != NULL)         //扫描链表
	{
		q = p->next;          //q为p的后继结点
		free(p);	           //释放结点p所占空间
		p = NULL;            //防止出现悬空指针(失效指针)
		p = q;               //当前p为原来p的后继结点
	}
	(*L)->next = NULL;      //清空链表L后头指针为空
}

int Length_List(List L)    //求链表L表长(元素个数)
{
	int length = 0;        //定义整型变量length记录链表表长
	L = L->next;           //L为首元结点
	while (L != NULL)      //扫描链表L
	{
		length++;          //表长length加1
		L = L->next;       //当前L为原来L的后继结点
	}
	return length;        //返回链表L表长
}

void Get_Data(List L, int location,ELEMTYPE* e)    
//从首元结点开始查找第location个结点并将该结点的数据域赋值给e(按位置查找元素值)
{
	int length = (Length_List(L));   //定义整型变量length表示链表L表长
	if (location<1 || location>length)    //判断location的值是否合法
	{
		printf("get failed\n");           //提示location的值不合法
		return;                           //结束函数
	}
	else                                 //合法
	{
		List p = L;                      //定义结构体指针类型变量p
		for (int j = 0; j < location; j++)   //扫描链表顺序存取
		{
			p = p->next;                     //当前p为原来p的后继结点
		}
		(*e) = p->data;           //将第location个结点的数据域赋值给e
	}
}

int Locate_Data(List L, ELEMTYPE e)    //查找元素e在链表L中的位置(按值查找元素位置)
{
	List p=L;    //定义结构体指针类型变量p
	for (int location = 1; location <= Length_List(L); location++)    //扫描链表L
	{
		p = p->next;            //当前p指向原来p的后继结点
		if (p->data == e)       //判断p指向的结点的数据域与e是否相等
			return location;    //相等则返回元素e的位置location
	}
	printf("locate failed\n");         //提示查找失败
	return 0;                          //查找失败返回0
}

void Insert_List(List* L, int location, ELEMTYPE e)    //在第location个结点上插入元素e
{
	if (location > Length_List(*L) + 1 || location < 1)    //判断location的值是否合法
	{
		printf("insert failed\n");    //location的值非法
		return;                       //退出函数
	}
	List p = (*L);                    //定义结构体指针类型变量p
	for (int n = 1; n < location; n++)//查找链表的第location-1个结点
	{
		p = p->next;                  //当前p为原来p的后继结点
	}
	List q;                          //定义结构体指针类型变量q
	q = (List)malloc(sizeof(LNode)); //用malloc给q分配一块内存
	q->data = e;                     //元素e存放至结点q的数据域
    q->prior = p;      //结点q的前指针域指向第location-1个结点p
	q->next = p->next;               //p的后继结点存放至q的后指针域
	p->next = q;                     //q为p的后继结点
}

void Delete_List(List* L, int location)    //删除第location个结点
{
	if (location<1 || location>Length_List(*L))    //判断location的值是否合法
	{
		printf("delete failed\n");      //location的值非法
		return;                         //退出函数
	}
	List p = (*L);                     //定义结构体指针类型变量p
	for (int n = 1; n < location ; n++)    //查找链表的第location-1个结点
	{
		p = p->next;      //当前p为原来p的后继结点
	}
	List q = p->next;     //定义结构体指针类型变量q为第location个结点
	p->next = q->next;     //第location-1个结点的后指针域改为第location个结点的后继结点
    q->next->prior = q->prior;		//第location+1个结点的前指针域指向第location-1个结点
	free(q);     //释放第location个元素的空间
	q = NULL;    //防止出现悬空指针(无效指针)
}

以下为测试函数

1.测试初始化函数Init_List;头插法函数Create_Head;打印函数Print_List.

#include "Linked_List.h"    //调用头文件

int main(void)        //main()函数
{
	List L;           //定义结构体指针变量L
	Init_List(&L);    //调用Init_List函数将链表L初始化
	Create_Head(&L);  //调用Create_Head函数用头插法创建链表L
	Print_List(L);    //调用Print_List函数打印链表L
	return 0;         //返回值
}

2.测试尾插法函数Create_Behind.

#include "Linked_List.h"    //调用头文件

int main(void)            //main()函数
{
	List L;		        //定义结构体指针变量L
	Init_List(&L);        //调用Init_List函数将链表L初始化
	Create_Behind(&L);    //调用Create_Behind函数用尾插法创建链表L
	Print_List(L);        //调用Print_List函数打印链表L
	return 0;             //返回值
}

3.测试判断空表函数Empty_List.

#include "Linked_List.h"    //调用头文件

int main(void)		    //main()函数
{
	List L;		       //定义结构体指针变量L
	Init_List(&L);       //调用Init_List函数将链表L初始化
	Empty_List(L);		//调用Empty_List函数判断链表L是否为空
	Create_Behind(&L);	//调用Create_Behind函数用尾插法创建链表L
	Empty_List(L);		//调用Empty_List函数判断链表L是否为空
	return 0;				//返回值
}

4.测试清空链表函数Clear_List.

#include "Linked_List.h"    //调用头文件

int main(void)		       //main()函数
{
	List L;		       //定义结构体指针变量L
	Init_List(&L);		//调用Init_List函数将链表L初始化
	Create_Behind(&L);	//调用Create_Behind函数用尾插法创建链表L
	Empty_List(L);		//调用Empty_List函数判断链表L是否为空
	Clear_List(&L);		//调用Clear_List函数清空链表L
	Empty_List(L);		//调用Empty_List函数判断链表L是否为空
	return 0;            //返回值
}

5.测试求表长函数Length_List.

#include "Linked_List.h"    //调用头文件

int main(void)		       //main()函数
{
	List L;		          //定义结构体指针变量L
	Init_List(&L);		   //调用Init_List函数将链表L初始化
	Create_Head(&L);		   //调用Create_Head函数用头插法创建链表L
    printf("The length of this list is:%d\n", Length_List(L));     
    //输出表长
	return 0;					//返回值
}

6.测试按址查找函数Get_Data.

#include "Linked_List.h"    //调用头文件

int main(void)		        //main()函数
{
	List L;		          	//定义结构体指针变量L
	Init_List(&L);		   	//调用Init_List函数将链表L初始化
	Create_Head(&L);	   	   	//调用Create_Head函数用头插法创建链表L
	Print_List(L);          	//调用Print_List函数打印链表L
	ELEMTYPE e;			   	//定义查找到的元素e
	int location;		  	  	//定义待查找位置location
	printf("Please input the location of the element you want to get:");    //提示输入待查找位置location
	scanf("%d", &location);		       //输入待查找位置location
	Get_Data(L,location,&e);		       //调用Get_Data函数按址查找
	printf("The element is:%d", e);    //输出查找到的元素e
	return 0;								//返回值
}

7.测试按值查找函数Locate_List

#include "Linked_List.h"    //调用头文件

int main(void)		   //main()函数
{
	List L;		       //定义结构体指针变量L
	Init_List(&L);		//调用Init_List函数将链表L初始化
	Create_Behind(&L);	//调用Create_Behind函数用头插法创建链表L
	Print_List(L);       //调用Print_List函数打印链表L
	ELEMTYPE e;			//定义待查找结点的数据域e
	printf("Please input the element you want to search:");		
    //提示输入待查找结点的数据域e
	scanf("%d", &e);		//输入带查找元素e
	printf("The location of this element is:%d", Locate_Data(L, e));	
    //调用Locate_Data函数按值查找结点位置并输出
	return 0;				//返回值
}

8.测试插入函数Insert_List

#include "Linked_List.h"    //调用头文件

int main(void)		       //main()函数
{
	List L;		           //定义结构体指针变量L
	Init_List(&L);		    //调用Init_List函数将链表L初始化
	Create_Behind(&L);		//调用Create_Behind函数用头插法创建链表L
	Print_List(L);           //调用Print_List函数打印链表L
	ELEMTYPE e;				//定义待查找结点的数据域e
	printf("Please input the element you want to search:");		//提示输入待查找结点的数据域e
	scanf("%d", &e);		//输入带查找元素e
	printf("The location of this element is:%d", Locate_Data(L, e));	
    //调用Locate_Data函数按值查找结点位置并输出
	return 0;				//返回值
}

9.测试删除函数Delete_List

#include "Linked_List.h"    //调用头文件

int main(void)		       //main()函数
{
	List L;		          //定义结构体指针变量L
	Init_List(&L);		   //调用Init_List函数将链表L初始化
	Create_Behind(&L);	   //调用Create_Behind函数用头插法创建链表L
	Print_List(L);		   //调用Print_List函数打印链表L
	int location;        //定义待删除结点位置location
	printf("The location of the element to be deleted is:");   
 	//提示输入删除结点的位置
	scanf("%d", &location);        //输入需要删除结点的位置
	Delete_List(&L, location);
    //调用Delete_List函数删除第location个结点
	Print_List(L);		         //调用Print_List函数打印链表L
	printf("The length of this list is:%d\n", Length_List(L));    
    //输出表长
	return 0;		  //返回值
}

四、实验结果及分析

测试函数

测试用例

运行结果

Init_List Creat_Head

Print_List

5

1,2,3,4,5

Please input the length:5

Please input the data:1

Please input the data:2

Please input the data:3

Please input the data:4

Please input the data:5

The linked list is:5 4 3 2 1

-1

Please input the length:-1

The linked list is:

Create_Behind

5

1,2,3,4,5

Please input the length:5

Please input the data:1

Please input the data:2

Please input the data:3

Please input the data:4

Please input the data:5

The linked list is:1 2 3 4 5

0

Please input the length:0

The linked list is:

Empty_List

5

1,2,3,4,5

This list is empty.

Please input the length:5

Please input the data:1

Please input the data:2

Please input the data:3

Please input the data:4

Please input the data:5

This list isn't empty.

0

This list is empty.

Please input the length:0

This list is empty.

Clear_List

5

1,2,3,4,5

Please input the length:5

Please input the data:1

Please input the data:2

Please input the data:3

Please input the data:4

Please input the data:5

This list isn't empty.

This list is empty.

-1

Please input the length:-1

This list is empty.

This list is empty.

Length_List

5

1,2,3,4,5

Please input the length:5

Please input the data:1

Please input the data:2

Please input the data:3

Please input the data:4

Please input the data:5

The length of this list is:5

-1

Please input the length:-1

The length of this list is:0

Get_Data

5

1,2,3,4,5

5

Please input the length:5

Please input the data:1

Please input the data:2

Please input the data:3

Please input the data:4

Please input the data:5

The linked list is:5 4 3 2 1

Please input the location of the element you want to get:5

The element is:1

6

Please input the location of the element you want to get:6

get failed

The element is:-858993460

0

Please input the location of the element you want to get:0

get failed

The element is:-858993460

Locate_Data

5

1,2,3,4,5

4

Please input the length:5

Please input the data:1

Please input the data:2

Please input the data:3

Please input the data:4

Please input the data:5

The linked list is:1 2 3 4 5

Please input the element you want to search:4

The location of this element is:4

6

Please input the element you want to search:6

locate failed

The location of this element is:0

Insert_List

5

1,2,3,4,5

6

2

Please input the length:5

Please input the data:1

Please input the data:2

Please input the data:3

Please input the data:4

Please input the data:5

The linked list is:1 2 3 4 5

The element to be inserted is:6

The location of the element to be inserted is:6

The linked list is:1 2 3 4 5 6

The length of this list is:6

6

0

The element to be inserted is:6

The location of the element to be inserted is:0

insert failed

The linked list is:1 2 3 4 5

The length of this list is:5

6

7

The element to be inserted is:6

The location of the element to be inserted is:7

insert failed

The linked list is:1 2 3 4 5

The length of this list is:5

Delete_List

5

1,2,3,4,5

5

Please input the length:5

Please input the data:1

Please input the data:2

Please input the data:3

Please input the data:4

Please input the data:5

The linked list is:1 2 3 4 5

The location of the element to be deleted is:5

The linked list is:1 2 3 4

The length of this list is:4

0

The location of the element to be deleted is:0

delete failed

The linked list is:1 2 3 4 5

The length of this list is:5

6

The location of the element to be deleted is:6

delete failed

The linked list is:1 2 3 4 5

编写实现单链表的各种基本运算,并在此基础上设计一个主函数完成如下功能: ##单链表基本运算的笔记(可供一些初学者学习) (1)初始化单链表L。 (2)依次采用尾插法插入h、e、l、l、o。 (3)输出单链表L。 (4)输出单链表L的长度。 (5)判断单链表L是否为空。 (6)输出单链表L的第2个和第4个元素。 (7)输出元素o位置。 (8)在单链表L的第4个位置上插入元素r。 (9)输出单链表L。 (10)删除单链表L的第3个元素。 (11)输出单链表L。 (12)释放单链表L。 #include <stdio.h> #include <malloc.h&gt 阅读详情

相关推荐

数据结构实验:单链表基本操作实现与调试指南

数据结构是计算机科学的核心基础,它研究数据的组织、存储与操作方式,直接影响程序的效率与性能。其核心原理在于通过特定的逻辑结构(如线性、树形)与物理存储方式,在时间与空间复杂度间取得平衡。掌握数据结构对于编写高效、可维护的代码具有重要价值,广泛应用于数据库索引、编译器设计、网络路由等场景。链表作为一种基础的动态数据结构,完美体现了链式存储思想。本文聚焦单链表这一关键概念,深入剖析其节点与指针模型,并详细讲解创建、遍历、插入、删除等基本操作的实现逻辑与工程实践中的调试技巧,帮助你从理论到代码实现平滑过渡,攻克数

weixin_31155097的博客 274

数据结构实验之单链表----单链表的基本操作

单链表

2201_75867204的博客 3602

数据结构实验--双向链表及其应用

学习笔记--数据结构前言数据结构实验一:实验要求:二、使用步骤1.引入库2.读入数据总结欢迎使用Markdown编辑器新的改变功能快捷键合理的创建标题,有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的甘特图功能,丰富你的文章UML 图表FLowchart流程图导出与导入导出导入 前言 很早就有 想写博客的想法,但是一直都没有落实起

m0_46679726的博客 3345

数据结构实验 2 单链表的实现

一、实验目的 1.掌握链表的定义。 2.理解线性表的链式存储结构。 3.掌握链表的初始化、头插法、尾插法、打印、判断空表、清空链表、求表长、按址查找、按值查找、插入、删除等基本操作。 二、实验要求 1. 写出链表的操作的详细算法步骤; 2. 属性使用C/C++实现链表,并编译运行。 三、实验过程 实验环境:visual studio 2017 实验步骤: 1.初始化链表L,定义函数名为Init_List; 2.头插法创建链表L,定义函数名为Create_Head; 3.尾插法创建链表

Inneverleft的博客 1745

ThingsBoard 3.1.1版本在window本地运行之TB-Gateway服务搭建(三)

TB-gateway服务是TB不可或缺的部分,很多的协议都需要TB-gateway来做分类处理,今天我们就来做TB-Gateway服务搭建。

晚点遇见你,余生都是你! 2474

利用docx4j与docx4j-ImportXHTML高效实现HTML到Word的自动化转换

本文详细介绍了如何利用docx4j与docx4j-ImportXHTML库,在Java环境中高效实现HTML到Word文档的自动化转换。内容涵盖从环境搭建、核心依赖配置,到集成Spring Boot REST API的完整实战流程,并深入解析了处理图片、CSS样式、字体设置以及使用模板保证样式统一等高级技巧与常见问题解决方案,帮助开发者构建稳定的文档自动化生成流水线。

cnn8visionary的博客 365

数据结构实验之链表九:双向链表

数据结构实验之链表九:双向链表 Time Limit: 1000MS Memory limit: 65536K 题目描述 学会了单向链表,我们又多了一种解决问题的能力,单链表利用一个指针就能在内存中找到下一个位置,这是一个不会轻易断裂的链。但单链表有一个弱点——不能回指。比如在链表中有两个节点A,B,他们的关系是B是A的后继,A指向了B,便能轻易经A找到B,但从B却不能找到A

sdut_jean的博客 361

libfranka---joint_impendence_control例程分析

joint_impedance_control.cpp例程分析 部分内容来自链接,我个人以初学者的角度对代码进行了更加细致的解释。 核心部分: // Set and initialize trajectory parameters. const double radius = 0.05; const double vel_max = 0.25; const double acceleration_time = 2.0; const double run_time = 20.0; d

weixin_41567783的博客 1121

【数据结构】双向链表的实现

又是一篇万字文章,建议收藏。

adcxhw的博客 1661

树莓派3-改装wifi外置天线

声明:本文只是技术性探讨,改装引起的产品损坏等后果,由用户自负! 改装主要有两种方法 方法一:直接替换原来的天线 1、移除原有的小陶瓷天线,就在Made in PRC(或UK)那边的那个 清理一下阻焊剂方便天线接地(图中PRC左侧) 2、焊接天线 天线的屏蔽层焊接到清理完阻焊剂的地方,中间的信号线焊接到PRC右侧焊盘。 3、最终的样子

huayucong的博客 2万+

ali140滑块

ali 140滑块采用补环境的方式进行逆向,需要的文件主要为这两个,其中collina.js是最主要的环境校验和参数加密的逻辑,这两个文件放本地进行补环境。然后挂上代理,先保证能够正常运行代码,补了些许后能够正常运行了,我们打印最主要的加密函数看看:n值就是得到:挂上代理看看鼠标事件,不管加密逻辑,关心入参即可:收集一些鼠标事件传进记录的函数。其余就是处理一些环境值,一些resetSA的逻辑就行。截图记录:

bboysteed的博客 1677

【双向链表】数据结构双向链表的实现

双向链表的实现

m0_56069910的博客 2196

高通GAIA V3命令参考手册的研读学习(15):自定制命令的详细工作描述

里的示例一样,手机APP发出这个GetManuFacturer的命令发0x0000,那么耳机回复:0x8000, 同时在回复的playload部分,用最多15个字节的ACSII码来表达制造商信息(因此最多15个字母)。那么这个APP在通过GAIA协议控制这个耳机时,不仅可以通过前面讲过的vendor ID来识别,也可以更进一步通过这个命令来识别这个耳机,到底是不是本公司的。通过这个可变长度的playload,真的是可以传达极多的事先约定的信息,相当的灵活,真是不错!这个命令用来得到设备的制造商信息。

qq_37191547的博客 398

数据结构之双向链表的实现

主要是定义一些功能常量和单链表的结构,和之前的数据结构的文章一样。

m0_62681656的博客 1205

【LAMMPS学习】八、基础知识(4.5)TIP5P水模型

​ 五点 TIP5P 刚性水模型通过添加两个通常无质量的附加位点 L 来扩展three-point TIP3P model,其中放置与氧原子相关的电荷。这些位点 L 位于距氧原子固定距离处,形成从 HOH 平面旋转 90 度的四面角。因此,这些位点在某种程度上近似于氧的孤对,从而改善了水结构,与four-point TIP4P model相比变得更加“四面体”。

荷塘阅色 1421

【AI智能体】Coze 数据库从使用到实战操作详解

Coze 数据库使用到实战详解

congge 5913

数据结构——双向链表

(存储元素)、(prev)和(next)。与单向链表不同,双向链表的节点不仅可以通过下一个节点(next)进行访问,还可以通过前一个节点(prev)进行访问,因此它支持从两个方向进行遍历。这种结构使得在任意节点的插入、删除以及遍历操作都非常高效。希望这个简要的图示和说明可以帮助你理解双向链表的基本概念!

xiaoxin_________的博客 1203

jdk-8u144-linux-x64.tar.gz.

该资源为搭建Linux系统Java环境用,资源的后缀为tar.gz格式的压缩包

【数据结构入门】双向链表

双向链表实现的详细过程、二级指针使用的时机;双链表和数组的优缺点

欢迎来到我的博客,有问题可以联系:luoshuaishuai2001@163.com 1052

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

怀旧版电脑GBC模拟器

再现原版GBC掌机的界面,电脑运行连游戏界面都一样大小,很怀旧,很真实,(英文版)强烈推荐,很小的文件,很难才找到的。

c# 数据结构 链表篇 有关双向链表的一切

本人能力有限,如有不足还请斧正。

咩咩的博客 1284

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

数据结构实验 双向链表

实验三:双向链表的基本操作     1.利用尾插法建立一个双向链表。     2.遍历双向链表。     3.实现双向链表中删除一个指定元素。 4.在非递减有序双向链表中实现插入元素e仍有序算法。     5.判断双向链表中元素是否对称若对称返回1否则返回0。 6.设元素为正整型,实现算法把所有奇数排列在偶数之前。     7.在主函数中设计一个简单的菜单调试上述算法。 //排序的

zizaimengzhongyue的专栏 2026

Java数据结构:双向链表的实现

本文对比了单链表和双向链表,并对双向链表的具体实现进行了讲解。文中附双向链表实现的完整代码及测试类,供码友们参考学习!

黄小黄的博客 1319

[数据结构]实现双向链表

带头双向链表的实现

qq_59456417的博客 799
上一篇: 数据结构实验 2 单链表的实现
下一篇: 数据结构实验 4 顺序栈的实现
Binkkkk
博客等级 码龄5年 303粉丝 13原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Binkkkk

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值