top button
Flag Notify
Site Registration

Difference between ADT(abstract data type) and DS(Data Structure)?

+1 vote
708 views

Can someone help me with what is the exact difference between ADT(abstract data type) and DS(Data Structure)? Google is not helping :(

posted Jul 14, 2014 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Any actual data representation in a specific format is Data Structure i.e. Binary Tree, Link List etc.

Now coming to Abstract Data Type, ADT is a mathematical model of a data structure which contains a set of its instances, with: a specific interface - a collection of signatures of methods that can be invoked on an instance, a set of axioms that define the semantics of the methods. Typical example could be Lists, Trees, Stacks

Now Lets construct a Rational Number ADT -
Construction: Create an instance of a rational number ADT using two integers, a and b, where a represents the numerator and b represents the denominator.
Operations: addition, subtraction, multiplication, division, exponentiation, comparison, simplify, conversion to a float number.

Now lets try to explain using a common example -
Take a List ADT, A List is an abstract data type with well-defined operations (add element, remove element, etc.) while a linked-list is a pointer-based data structure that can be used to create a representation of a List and can be called Data Structure.

answer Jul 14, 2014 by Salil Agrawal
Similar Questions
+2 votes

What are the best practices to reduce bugs caused by Python's dynamic data-type characteristic? Can Python programmers here advise?

...