当前位置:网站首页>Course paper + code and executable EXE file of library information management system based on C language
Course paper + code and executable EXE file of library information management system based on C language
2022-06-25 11:14:00 【biyezuopinvip】
Catalog
One 、 Purpose and requirements of the experiment 0
Two 、 Overview of algorithm principle 0
- In order to find 1
- Two points search 1
- Tree table search 3
- Hash lookup 4
3、 ... and 、 Software development environment and tools 11
Four 、 Experimental content 11
5、 ... and 、 Summary of the experiment 25
6、 ... and 、 reference : 26 else 37else 38else 39else 39else 40else 40else 46else 50
One 、 Purpose and requirements of the experiment
(1) Representation and implementation of set structure .
(2) Implementation of search and sorting algorithm .
(3) File access operation
(4) system function : Book collection and editing 、 Book Search 、 Functions such as book circulation and personal information
(5) The program can check the fault tolerance of input data , Guarantee the validity of data .
(6) User interface friendliness : The program can provide menus for users to choose and corresponding interactive information .
Two 、 Overview of algorithm principle
( One ) lookup
1. Search algorithm categories :
(1) Static search and dynamic search ;
Both static and dynamic are for lookup tables .
Dynamic table refers to the table with delete and insert operations in the lookup table .
(2) Unordered search and ordered search .
Unordered search : The sequence to be searched is in order and disorder ;
Search in order : The searched sequence must be an ordered sequence .
2. The basic concept of search
(1) lookup : In the data set , The process of finding data elements that meet certain conditions is called finding .
(2) Lookup table ( Find structure ); The set of data used for lookup is called a lookup table .
(3) A keyword is the value of a data item in a data element , It can be used to identify a data element , If this keyword can uniquely identify a record , Keywords used as primary keywords .
(4) The average search length is the average number of keyword comparisons in all search processes .
about n A table of elements , Given value key Same as... In the table i The elements are equal , To be carried out n-i+1 Sub keyword comparison .
Average search length (Average Search Length,ASL): Need and specify key Expected number of keywords to compare , It is called the average search length when the search algorithm is successful .
For containing n Look up table of data elements , The average length of successful search is :ASL = Pi*Ci And .
Pi: Look up the... In the table i Probability of data elements .
Ci: Find No i The number of times that data elements have been compared .
3、 Common search algorithms
- In order to find
Premise : Sequential search is suitable for linear tables whose storage structure is sequential storage or linked storage .
The basic idea : Sequential search is also called linear search , It belongs to the unordered search algorithm . Start at one end of the data structure linear table , Sequential scanning , Scan the node keyword and the given value in turn k Comparison , If equal, the search is successful ; If no keyword is found at the end of the scan k The node of , Indicates that the search failed .
Complexity analysis :
The average search length when the search is successful is :( Suppose that the probability of each data element is equal ) ASL = 1/n(1+2+3+…+n) = (n+1)/2 ;
When the search fails , need n+1 Compare it to , The time complexity is O(n);
therefore , The time complexity of sequential lookup is O(n).














边栏推荐
猜你喜欢

金仓KFS数据级联场景部署

Ouverture de l'inscription | le troisième marathon des hackers de pagaie est arrivé comme prévu.

Leetcode 1249. 移除无效的括号(牛逼,终于做出来了)

XSS attack

Upload and modify the use of avatars

A five-year technical Er, based on the real experience of these years, gives some suggestions to the fresh students

Jincang KFS data cascade scenario deployment

一个数学难题,难倒两位数学家

网易开源的分布式存储系统 Curve 正式成为 CNCF 沙箱项目

【文件包含漏洞-03】文件包含漏洞的六种利用方式
随机推荐
Daily Mathematics Series 52: February 20
Open source invites you to participate in the openssf Open Source Security Online Seminar
撸一个随机数生成器
Free access to the global human settlements layer (ghsl) dataset from Gee
A difficult mathematical problem baffles two mathematicians
Kingbasees plug-in ftutilx of Jincang database
relu与sigmod的比较
Output reading: apply what you have learned
Shen Lu, China Communications Institute: police open source Protocol - ofl v1.1 Introduction and Compliance Analysis
金仓数据库 KingbaseES 插件DBMS_OUTPUT
Detection and analysis of simulator in an app
Writing wechat applet with uni app
网络远程访问的方式使用树莓派
GaussDB 集群维护案例集-sql执行慢
2022年PMP项目管理考试敏捷知识点(2)
Getting started with Apache Shenyu
Continuous delivery jenkinsfile syntax
[file containing vulnerability-03] six ways to exploit file containing vulnerabilities
基于Minifilter框架的双缓冲透明加解密驱动 课程论文+项目源码
Is it safe to speculate in stocks by mobile phone?