Get Latest Exam Updates, Free Study materials and Tips

Introduction to Data Structures

1.What is the definition of Data Structures?

Ans:

Data structures are a specific way of organizing data in a specialized format on a computer so that the information can be organized, processed, stored, and retrieved quickly and effectively. They are a means of handling information, rendering the data for easy use.

2.Explain ADT with an example.

Ans:

Abstract data types, commonly abbreviated ADTs, are a way of classifying data structures based on how they are used and the behaviors they provide. They do not specify how the data structure must be implemented or laid out in memory, but simply provide a minimal expected interface and set of behaviors. For example, a stack is an abstract data type that specifies a linear data structure with LIFO (last in, first out) behavior. Stacks are commonly implemented using arrays or linked lists, but a needlessly complicated implementation using a binary search tree is still a valid implementation. To be clear, it is incorrect to say that stacks are arrays or vice versa. An array can be used as a stack. Likewise, a stack can be implemented using an array. Example for ADT: List - can be implemented using Array and LinkedList, Queue, Deque, Stack, Associative array, Set.

3.What are the Classifications of Data Structure?

Ans:

There are three main data structure classifications:
   a)Linear and Nonlinear.
   b)Static and Dynamic.
   c)Homogenous and Non-Homogenous.

4. What is the basic difference between linear and non-linear data structure?

Ans:

Linear structures arrange data in a linear sequence, such as found in an array, list, or queue. In nonlinear structures, the data doesn’t form a sequence but instead connects to two or more information items, like in a tree or graph.

5.What are the different operations on data structure?

Ans:

● Insertion: Add a new data item in the given collection of data items.
   ● Deletion: Delete an existing data item from the given collection of data items.
   ● Traversal: Access each data item exactly once so that it can be processed.
   ● Searching: Find out the location of the data item if it exists in the given collection of data items.
   ● Sorting: Arranging the data items in some order i.e. in ascending or descending order in case of numerical data and in dictionary order in case of alphanumeric data.

6.Define Static and Dynamic structures

Ans:

As the term implies, static structures consist of fixed, permanent structures and sizes at compile time. The array reserves a set amount of reserve memory set up by the programmer ahead of time. Dynamic structures feature non-fixed memory capacities, shrinking or expanding as required by the program and its execution requirements. Additionally, the location of the associated memory can change.

7. What are Homogenous and Non-Homogenous structures ?

Ans:

Homogenous data structures consist of the same data element type, like element collections found in an array. In non-homogenous structures, the data don’t have to be the same type, such as structures.

Not Allowed

Right free icon  Prepare For Your Placements  Left free icon

Stay connected with us on