Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
Lab021
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
问题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
银宸时代
DS Lab Group
实验项目模板
Lab021
提交
86381f37
提交
86381f37
5月 21, 2019
创建
作者:
宋海霞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modify
上级
62d270c6
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
12 行增加
和
12 行删除
+12
-12
SeqTable.h
SeqTable.h
+12
-12
没有找到文件。
SeqTable.h
浏览文件 @
86381f37
...
@@ -3,40 +3,40 @@
...
@@ -3,40 +3,40 @@
//
//
//
在此处包含 C 标准库头文件
//
Include the C standard library header file here
//
//
#include <stdio.h>
#include <stdio.h>
//
//
//
在此处包含其他头文件
//
Other header files are included here
//
//
//
//
//
在此处定义数据结构
//
Define the data structure here
//
//
//
线性表中的元素
//
Elements in a linear table
typedef
int
KeyType
;
typedef
int
KeyType
;
typedef
struct
ElemType
{
typedef
struct
ElemType
{
KeyType
key
;
//
主关键字
KeyType
key
;
//
Primary key
//
省略其他数据,不再定义
//
Omit other data and no longer define
}
ElemType
;
}
ElemType
;
//
线性表的顺序存储结构
//
The sequential storage structure of a linear table
typedef
struct
SeqTable
{
typedef
struct
SeqTable
{
ElemType
*
elem
;
//
数据元素存储空间基址,建表时按实际长度分配,
ElemType
*
elem
;
//
Data element storage space base address, allocated according to the actual length when the table is built,
//
0 号单元留空,从 1 号单元开始使用。
//
Unit 0 is left blank and is used from unit 1.
int
length
;
//
表长度
int
length
;
//
The length of the table
}
SeqTable
;
}
SeqTable
;
//
//
//
在此处声明函数
//
Declare the function here
//
//
int
BinarySearch
(
SeqTable
*
pST
,
KeyType
key
);
int
BinarySearch
(
SeqTable
*
pST
,
KeyType
key
);
...
@@ -45,7 +45,7 @@ void DeleteSeqTable(SeqTable* pST);
...
@@ -45,7 +45,7 @@ void DeleteSeqTable(SeqTable* pST);
//
//
//
在此处声明全局变量
//
Declare global variables here
//
//
...
...
编写
预览
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论