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

ADT linear table

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

The collection of data objects in the Data linear table is {A1, a2,..., an}, and each element is of type DataType. Among them, except for the first element A1, each element has one and only one direct predecessor element, and except the last element, an, each element has and only one direct successor element. The relationship between data elements is one-to-one. Operation InitList (* L): initializes the operation to create an empty linear table L. ListEmpty (L): determines whether the linear table is empty, returns true if the linear table is empty, returns false otherwise. ClearList (* L): clears the linear table. GetElem (L, I, * e): returns the I position element in the linear table L to e. LocateElem (L, e): looks for an element in the linear table L that is equal to the given value e. If the lookup is successful, the returned element has an ordinal number in the table indicating success; otherwise, returning 0 indicates failure. ListInsert (* L, I, e): inserts a new element e in position I in the linear table L. ListDelete (* L, I, * e): deletes the I position element in the linear table L and returns its value with e. ListLength (L): returns the number of elements in linear table L. End for different applications, the basic operations of linear tables are different, the above operations are the most basic. For the more complex operations of linear tables involved in practical problems, we can use the combination of these basic operations to achieve.

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