当前位置:网站首页>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).














边栏推荐
- Server rendering
- Handling of NPM I installation problems
- At 16:00 today, Mr. sunxiaoming, a researcher of the Institute of computing, Chinese Academy of Sciences, took you into the quantum world
- Query method and interrupt method to realize USART communication
- Android:kotlin中Gson与JSON的泛型映射解析
- Gaussdb others scenarios with high memory
- Es learning
- 3 Questions par jour (3) - vérifier l'existence d'entiers et de leurs doubles
- [file containing vulnerability-03] six ways to exploit file containing vulnerabilities
- SystemVerilog (XIII) - enumerate data types
猜你喜欢

Apache ShenYu 入門

数据库系列:MySQL索引优化总结(综合版)

Oracle彻底卸载的完整步骤

Complete steps for a complete Oracle uninstall

1-7snapshots and clones in VMWare

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

Garbage collection mechanism

基于Minifilter框架的双缓冲透明加解密驱动 课程论文+项目源码

CSRF攻击

开源社邀请您参加OpenSSF开源安全线上研讨会
随机推荐
Spannable 和 Editable、SpannableString 和 SpannableString
Task03 probability theory
Netease's open source distributed storage system curve officially became the CNCF sandbox project
Jincang KFS data centralized scenario (many to one) deployment
Leetcode 1249. 移除无效的括号(牛逼,终于做出来了)
报名开启|飞桨黑客马拉松第三期如约而至,久等啦
Gaussdb others scenarios with high memory
炒股票开户的话,手机开户安全吗?有谁知道啊?
Démarrer avec Apache shenyu
XSS攻击
从GEE中免费获取全球人类住区层 (GHSL) 数据集
视频会议一体机的技术实践和发展趋势
[维护集群案例集] GaussDB 查询用户空间使用情况
A random number generator
10.1. Oracle constraint deferred, not deferred, initially deferred and initially deferred
How gaussdb counts the response time of user SQL
Some assembly instructions specific to arm64
[shangyun boutique] energy saving and efficiency improvement! Accelerating the transformation of "intelligent manufacturing" in the textile industry
Daily 3 questions (2) - find out the lucky numbers in the array
Shen Ying, China Academy of communications and communications: font open source protocol -- Introduction to ofl v1.1 and analysis of key points of compliance