Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the algorithm in the data structure?

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

What this article shares with you is about what the algorithm in the data structure is. The editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.

What is a data structure?

Sartaj Sahni says in his book data structures, algorithms and applications: "A data structure is a data object and the various relationships between the instances that exist in the object and the data elements that make up the instance. These connections can be given by defining the relevant functions." He defines a data object as "a data object is a collection of instances or values."

The definition of Clifford A.Shaffer in the book data structure and algorithm Analysis is: "the data structure is the physical implementation of ADT (abstract data type Abstract Data Type)."

Lie data structure: a data structure is a collection of data elements that have one or more specific relationships with each other.

Grandma: the data structure includes the set of data objects and the way they are organized in the computer, that is, their logical structure and physical storage structure, as well as the set of operations related to the set of data objects. and the most efficient algorithms to achieve these operations.

Personal: is to convert the books in the library into some character data and store them in the computer, as well as the operation of these data object sets. Such as looking for books, putting books and so on.

What is an algorithm?

Or the example of the library, if a book looking for a tired person, if there is an index, which category to find first will be much faster. How to find it is actually an algorithm.

An algorithm is a finite set of steps to solve the problem, which is usually described by pseudo code in a certain computer language. Time complexity and space complexity are usually used to measure the advantages and disadvantages of the algorithm.

The five characteristics of the algorithm: input, output, finite, certainty and feasibility.

Input: zero or more inputs.

Output: one or more outputs.

Finite: completed in an acceptable time after a limited number of steps.

Certainty: each step has a definite meaning and has no ambiguity.

Feasibility: every step is feasible.

Algorithm design requirements: correctness, readability, robustness, high time efficiency and low storage.

Correctness: input and output, no ambiguity, correct answer.

Readability: easy to read.

Robustness: illegal input can be handled

High time efficiency and low storage: the lower the time and space complexity, the better.

These are the algorithms in the data structure, and the editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report