overviewlearning manual

Published on 2023-04-20 00:10:05 · 中文 · بالعربية · Español · हिंदीName · 日本語 · Русский язык · 中文繁體

Data structing is a systematic way to organize data to use it effectively. The following terms are the basic terminology for data structures.
Interface - Each data structure has an interface. An interface represents a set of operations supported by a data structure. The interface provides only a list of supported operations, the types of parameters they can accept, and the return types of those operations. Implementation - The implementation provides an internal representation of the data structure. The implementation also provides definitions of algorithms used in data structure operations.

Characteristics of the data structure

Correctness - Data structure implementations should implement their interfaces correctly. Time complexity - The elapsed time or execution time of a data structure operation must be as small as possible. Space complexity - The memory usage of data structure operations should be as minimal as possible.

Data structures are required

As applications become more complex and data-rich, applications now face three common problems.
Data Search - Consider the inventory of 1 million (106) items in your store. If an application were to search for an item, it would have to search for one item at a time out of 1 million (106) items, which slowed down the search. As your data grows, searches slow down. Processor speed - Processor speed, while very high, is limited if the data grows to a billion records. Multiple requests - Because thousands of users can search for data on a web server at the same time, even fast servers can fail when searching for data.
To solve the above problems, data structures come to the rescue. You can organize your data in a data structure so that you might not need to search all items, and you can search for the data you need almost instantly.

Execution time cases

Three scenarios that are commonly used to compare the execution times of various data structures.
Worst Case - This is the case where a particular data structure operation takes the most time. If the worst-case time of an operation is ƒ(n), then the operation will not exceed ƒ(n) time, where ƒ(n) represents a function of n. Average Case - This is the scenario that describes the average execution time of a data structure operation. If an operation requires ƒ(n) time to execute, then m operations will require mƒ(n) time. Best Case - This is the scenario that describes the minimum execution time for a data structure operation. If an operation requires ƒ(n) time to execute, then the actual operation may take time as a random number, up to ƒ(n).

Basic terminology

Data - Data is a value or set of values. Data Item - A data item refers to a single unit of value. Group Items - Data items that are divided into subitems are called Group Items. Elementary Items - Data items that cannot be divided are called basic items. Attribute and Entity - An entity is an entity that contains certain properties or attributes that can be assigned a value. Entity Set - Entities with similar properties form an entity set. A Field-field is a single basic unit of information that represents an entity's properties. Record - A record is a collection of field values for a given entity. A file-file is a collection of records of entities in a given entity set.