What is ADT? (Abstract Data Type)

前端 未结 18 1147
借酒劲吻你
借酒劲吻你 2020-12-12 13:04

I am currently studying about Abstract Data Types (ADT\'s) but I don\'t get the concept at all. Can someone please explain to me what this actually is? Also what is collecti

18条回答
  •  长情又很酷
    2020-12-12 13:56

    Before defining abstract data types, let us considers the different view of system-defined data types. We all know that by default all primitive data types (int, float, etc.) support basic operations such as addition and subtraction. The system provides the implementations for the primitive data types. For user-defined data types, we also need to define operations. The implementation for these operations can be done when we want to actually use them. That means in general, user-defined data types are defined along with their operations.

    To simplify the process of solving problems, we combine the data structures with their operations and we call this "Abstract Data Type". (ADT's).

    Commonly used ADT'S include: Linked List, Stacks, Queues, Binary Tree, Dictionaries, Disjoint Sets (Union and find), Hash Tables and many others.

    ADT's consist of two types:

    1. Declaration of data.

    2. Declaration of operation.

提交回复
热议问题