0% found this document useful (0 votes)
29 views2 pages

Assignment DS

An abstract data type describes data objects and operations on them without specifying implementation. It specifies components, relationships, and allowed operations. A data structure represents an ADT. Dynamic data structures can extend or shrink memory allocation at runtime. Linear data structures arrange elements linearly while non-linear ones attach them hierarchically.

Uploaded by

Gourav Jain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views2 pages

Assignment DS

An abstract data type describes data objects and operations on them without specifying implementation. It specifies components, relationships, and allowed operations. A data structure represents an ADT. Dynamic data structures can extend or shrink memory allocation at runtime. Linear data structures arrange elements linearly while non-linear ones attach them hierarchically.

Uploaded by

Gourav Jain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

An Abstract Data Type (ADT) describes the data objects, which constitute the data structure

and the fundamental operations supported on them. An ADT promotes data abstraction and
focuses on what a data structure does, rather than how it implements (does). An ADT is a
conceptual model of information structure. An ADT specifies the components, their
structuring relationships and a list of operations that are allowed to perform. It is just a
specification, no design or implementation information is included. Specification involves
the ―what‖ the operations, not the ―how‖. ADT‘s are generalizations of primitive data
types. A data structure is the design representation of an ADT. The same ADT may be
represented by several data structures. There are many data structures corresponding to
the ADT ―set

Dynamic Data Structure is another kind of data structure, which can be


extended or shrink during the execution, i.e., the memory allocation as well as memory de-
allocation for the data structure takes place at run-time and allocates memory as required
amount at any time.

1.

Linear Data Structure Non-linear Data Struct

.In a linear data structure, data elements In a non-linear data structure, data
are arranged in a linear order where each elements are attached in hierarchically
and every elements are attached to its manner.
previous and next adjacent
. In linear data structure, single level is
involved. . Whereas in non-linear data structure,
. In linear data structure, data elements multiple levels are involved.
can be traversed in a single run only. . While in non-linear data structure, data
elements can’t be traversed in a single run
. In a linear data structure, memory is not only.
utilized in an efficient way. . While in a non-linear data structure,
. Its examples are: array, stack, queue, memory is utilized in an efficient way.
linked list, etc. . While its examples are: trees and graphs.

2. Operation Description

Creation: Allocation of memory for the data structure, the creation of data structure may take
place either during compile-time or during run-time.

Insertion :Insert a data item in the data structure.

Deletion :Delete a data item from the data structure.

Traversing :Accessing and processing each data item of the data structure exactly once.
Searching :Find the location of the key value within the data structure.

Sorting: Arranging all the data items in a data structure either in ascending or in descending
order or in lexicographical order (for Strings).

Merging :Combining the data items of two different sorted lists into a single sorted list.
3. Definition: A matrix is said to be Sparse Matrix if most of its elements are zero (near more
than 2/3 elements are zero), having a relatively small number of non-zero elements. A
matrix that is not sparse is called Dense Matrix. A sparse matrix is a two-dimensional array in
which most of the elements have a null value or zero. However, for sparse matrices, this
invokes wastage of a lot of memory space.

You might also like