DS Basic Terminology
DS Basic Terminology
• The data must first be sufficiently put into the structure to indicate a clear
association between the data and a physical item.
• Second, the structure should be so simple that anyone may learn how to
analyze the data effectively as needed.
Data structures include things like arrays, linked lists, stacks, queues, trees, etc.
Nearly every area of computer science, including compiler design, operating
systems, graphics, artificial intelligence, and many others, makes extensive use of
data structures.
When discussing data structures, the following basic terms are frequently used:
1. Primitive data Structures: Primitive data structures are the fundamental data
types which are supported by a programming language. Basic data types such as
integer, real, character and Boolean are known as Primitive data Structures. These
data types consists of characters that cannot be divided and hence they also
called simple data types.
2. Non- Primitive data Structures: Non-primitive data structures are those data
structures which are created using primitive data structures. Examples of non-
primitive data structures is the processing of complex numbers, linked lists, stacks,
trees, and graphs.
A data structure is said to be linear if it’s elements form a sequence or a linear list.
There are basically two ways of representing such linear structure in memory.
1. One way is to have the linear relationships between the elements represented
by means of sequential memory location. These linear structures are called arrays.
2. The other way is to have the linear relationship between the elements
represented by means of pointers or links. These linear structures are called linked
lists.
The common examples of linear data structure are Arrays, Queues, Stacks, Linked
lists
A data structure is said to be non-linear if the data are not arranged in sequence
or a linear. The insertion and deletion of data is not possible in linear fashion. This
structure is mainly used to represent data containing a hierarchical relationship
between elements. Trees and graphs are the examples of non-linear data
structure.
1. Traversing: accessing each record/node exactly once so that certain items in the
record may be processed. (This accessing and processing is sometimes called
“visiting” the record.)
2. Searching: Finding the location of the desired node with a given key value, or
finding the locations of all such nodes which satisfy one or more conditions.
3. Inserting: Adding a new node/record to the structure.
2. Merging: Combining the records in two different sorted files into a single sorted
file.