当前位置:网站首页>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 37
else 38
else 39
else 39
else 40
else 40
else 46
else 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).
边栏推荐
- 查询法,中断法实现USART通信
- Network remote access using raspberry pie
- Free access to the global human settlements layer (ghsl) dataset from Gee
- MySQL synchronous data configuration and shell script implementation
- ARM64特有一些的汇编指令
- 反应c语言程序结构特点的程序
- Five types of questions about network planning
- A difficult mathematical problem baffles two mathematicians
- [maintain cluster case set] gaussdb query user space usage
- Previous string inversion topic
猜你喜欢
网络远程访问的方式使用树莓派
Garbage collection mechanism
Android之Kotlin语法详解与使用
SystemVerilog (XIII) - enumerate data types
【文件包含漏洞-04】经典面试题:已知某网站仅存在本地文件包含漏洞时,如何GetShell?
数据库系列:MySQL索引优化总结(综合版)
Dell technology performs the "fast" formula and plays ci/cd
Dragon Book tiger Book whale Book gnawing? Try the monkey book with Douban score of 9.5
Getting started with Apache Shenyu
Sign up to open the third session of the "flying oar hacker marathon". It's been a long time
随机推荐
Query method and interrupt method to realize USART communication
基于OpenStreetMap+PostGIS的地理位置系统 论文文档+参考论文文献+项目源码及数据库文件
GCC related
XSS攻击
Network remote access using raspberry pie
Jincang database kingbasees plug-in force_ view
Socket communication principle
撸一个随机数生成器
Dell technology performs the "fast" formula and plays ci/cd
Android: generic mapping analysis of gson and JSON in kotlin
Leetcode 1249. 移除无效的括号(牛逼,终于做出来了)
[file inclusion vulnerability-04] classic interview question: how to getshell when a website is known to have only local file inclusion vulnerability?
金仓数据库 KingbaseES 插件force_view
Kingbasees plug-in DBMS of Jincang database_ UTILITY
Comparable的使用(用于Arrays.sort)
Oracle彻底卸载的完整步骤
Coscon'22 lecturer solicitation order
金仓数据库 KingbaseES 插件DBMS_OUTPUT
ZABBIX distributed system monitoring
At 16:00 today, Mr. sunxiaoming, a researcher of the Institute of computing, Chinese Academy of Sciences, took you into the quantum world