-->
Search here and hit enter....

Learning Data Structure with Example | Class 3

 Hello Viewer! how are you? I hope you are very well. Today I have learned about Abstract Data Types. below I have written what I learn today...

abstract data type


ABSTRACT DATA TYPE (ADT)

  • Abstraction means dealing only with essential things without bothering about internal or implementation things.
  • ADT are like "User-Defined Datatype" which defines operations on values using function without specifying what is inside the function and how the operations are performed.
  • It is the "collection of data" and "collection of operation"- that(operation) can perform on that collection of data.
  • It is implemented by specific data types. it specifies what the ADT Operation do, not how to implement them.
  • What operations are to be performed but not how these operations will be implemented. {understand with an example}
    • Consider the Mobile phone that you are using. in that you can perform some operation like call(), text(), watch videos() etc. but you don't need to care about how calling, texting function works. similarly, ADT means the same kind of thing.

    Example:

    Stack ADT 

  • A stack consists of elements of same type arranged in a sequential order.
    • Operations allowed on stack-
      • initialize() : initializing it to be empty.
      • push() : inserting an element into the stack.
      • pop() : deleting an element from the stack.
      • isEmpty() : checking if stack is empty.
      • isFull() : checking if stack is full.
    • Here initialize(), push() etc. all are the function that we can perform on the stack but we are not saying anything about how those functions are implemented.
    • Thus, ADT simply means hiding the implementation details.


NOTES
    In ADT, we know that,
        (a) what types of data allowed and
        (b) also, know what type of operation can be performed but,
        (c) we don't know what is inside that function and how they performed.


Advantage of ADT

  • It is reusable & ensures robust DataStructure.
  • It reduces coding efforts.
  • It is a set of objects & operations like list, insert, delete, searching.

That's All I have learned today! maybe this post has an error or something is missing I am just writing this as notes of my learning lesson so please before using it anywhere verify once. for more read this 👉 --- About us.

Request 🙏: - If You found any error then DO NOT FORGET TO PING ME IN COMMENT or MAIL ME From contact us page.

Thank You 4 Reading!💗💗

FB COMMENTS ()