Job Saarnee

JOB SAARNEE

Top Most Platform for Job Updates O Level Results Answer keys AKTU MCQs

2 Marks Important Questions of Data Structure (Unit 1)

 Unit 1

2 Marks Important Questions of Data Structure
 Important Question

This blog cover 2 Marks Important Questions of Data Structure from Unit 1 for more you read over blog from the link provided below at the end of this blog that cover all the data structures important questions alone with the program related to the data structure for more data structures important questions and answers please visit over complete blog link provided below.

2 Marks Important Questions of Data Structure

In this blog post, we’ll delve into two-mark questions, a succinct yet insightful approach to grasp fundamental aspects of data structures. These questions, often encountered in examinations and technical interviews, distill complex concepts into concise points, demanding clarity of thought and a firm grasp of the underlying principles.

2 Marks Important Questions of Data Structure

Q1: Define the term data structure. List some linear and non-linear data structures starting the application area where they will be used?
                                      OR
Differentiate between Linear and Non-Linear Data structures?

Solution:

Data Structure can define as a means or way of organizing data in memory so that it can be used efficiently. or It can be define as a mathematical model of  particular organization of Data.

Data structure are broadly classified into two types

  1.  Linear type Data Structure 
  2. non-Linear type Data Structure

Linear Type Data Structure : 

Linear Type Data Structure are the data structure which organize the data in linear manner means one after another like Array, linked list, Queue, Stack   

Non Linear Type Data Structure : 

Non Linear Type Data Structure are the data structure which organize the data in non linear manner means in certain relationship like parents child relation in case tree. Tree and graph are the example of non linear data structure.  

Application of Data Structure

1. As it is the basic building block of a program, it improves the efficiency of program because it is a time-consuming task to find any data form a large set of unorganized data than a large set of organized data. 
 2. Second application of data structure is to organize the data in a systematic manner.   


Q2: Name few terminologies used in data structure?

Solution:
Here is the list of terminology used in data structure:

 

  1. Data:  Data is raw, facts and figure like Name, Roll number, Phone Number etc.
  2. Information: Meaning full or Processed data is called Information. we can say like that individually data not have any meaning they a just like any value but when we process it or organize it in meaning full sentence or set then it become Information.  
  3. Record:  Record is the collection of different type of data item organized in certain sequence like structure in C. like student record contain all the data related to student in certain sequence like first Roll no, Name, Father Name, Mother Name, contact no etc.
  4. File: File is the collection similar type of records.
  5. Data Structure: Data Structure is a means or way of organizing data in memory so that it can be used efficiently.

Q3: What are the data types used in C?

Solution: There are lot of data type used in C some of them is as following

Integer, Float, Char 


Q4: Name some primitive and non-primitive data types?
Solution:

  1. Primitive data types are data types which already exist in the programming language like Int , Float, Char, Double etc.
  2. Non Primitive data type are the data type which are derived from primitive data type like Array, Stack, Queue, Structure etc.   

Q5: Define an algorithm?

Solution:
Algorithm is a step by step procedure to solve any problem.
Example: Algorithm of Making Tea
Problem Statement: How to Make a Tea.
Step1: Take cup of water in a bowl.
Step2: then place the bowl on to gas and switch on the gas.
Step3: Then after 2 min add two spoon of tea and sugar  according to yours taste 
Step4: Then After when tea get boiled, add some amount of milk 
Step5: Then fill the tea in the cup and serve it to friend
Note:  There can be more than one algorithm for single problem.

Q6: Give the criteria that an algorithm must satisfy?

Solution:

Note that In this question examiner is tiring to ask same  Characteristics of Algorithm an algorithm must satisfy the following criteria
1. It should have finite number of steps
2. The statement of algorithm must be unambiguous
3. It should have clearly specify Input and Output. 
4. the algorithm should be efficient in term of Space and Time.


Q7: What are the characteristics of an algorithm?
Solution:
Algorithm is a step by step procedure to solve any problem.
An Algorithm have following Characteristics:-
1. Input: An algorithm take an input so there need to specifies the input of an algorithm. an algorithm can have zero or more well define inputs.
2. Output: An algorithm provides output after processing the input. an algorithm can have 1 or more outputs.
3. Finite: An algorithm should have finite number of steps mean an algorithm must terminate after finite number of steps.  
4. Ambiguous: An Algorithm should have clear and unambiguous statement means statement of algorithm must have single meaning.  
5. Efficiency: Efficiency is the another characteristics of algorithm mean the algorithm must be efficient in term of space and time.
6. Feasibility: An Algorithm should be feasible mean that it is possible to implement in any language.      

Q8: What are the different ways of analyzing an algorithm?

Solution:

Analyzing an algorithm means finding the complexity of an algorithm. The complexity of algorithm is a function f(n) which measures the time and space used by an algorithm in terms of input size ‘n’.

So we can analyze the algorithm by finding the time and space complexity of algorithm. 


Q9: Define complexity?

Solution:

The complexity of algorithm is a function f(n) which measures the time and space used by an algorithm in terms of input size ‘n’.

There are two type of Complexity 
  1. Time complexity 
  2. Space complexity

Q10: What is space and time complexity of an algorithm?

Solution:

Space complexity refers to the space used by an algorithm to solve any particular problem.
Time complexity refers to the time required by an algorithm to solve any particular problem.


Q11: What are the various asymptotic notations? Explain the Big Oh notation?


Q12: Define time-space tradeoff?

Solution:

Space time tradeoff is a way of solving problems or calculation in less time by using more storage space (on memory), or by
solving a problem in very small space by spending a long time. A space trade can be used with the problem of data storage.

For example Suppose you want to reverse a String there are two procedure to do this

1.You can make use of Stack, Simply place all the elements in stack and print it by Appling Pop operation one by one. 

2.You can perform this by applying  simple comparing the element.

In approach one there is a need of extra storage in term of stack but time require to perform this is very less, in comparison to second approach but in second approach there is no need of extra storage.      


Q13: Write down the properties of abstract data types (ADT)?


Q14: What do you mean by an array?
Q15: What are the merits and demerits of array data types?


Q16: Define Pointer?
Solution:

Pointer is a variable which contain the address of another variables.
Syntax: – data type   *ptr;

Q17: Differentiate between array and pointers?

Solution:
1. Array is a collection of similar type of data elements. It is a pointer variable the hold base address of array and pointing to the large set of similar type of elements. but Pointer is a variable which contains the address of another variables.
2. Syntex for declaring array is 
data type name_of_ array[size of array]
    Syntax for declaring pointer variable
data type *ptr;
3. Array is used to store elements of same data type. but 
    Pointers are used to store address of variable.


Q18: Differentiate between overflow and underflow condition of a linked list?
Q19: Write a function to reverse the list?


Q20: Given a 2-D array A {-100: 100, -5: 50}. Find the address of element A {99,49} considering the base address 10 and each element requires 4 bytes for storage. Follow row major order ?
Solution:

Given, a 2-D array A {-100:100, -5:50}.
Base address, b = 10
Size of element, w = 4
A {99,49} =?
Number of rows = Upper Bound – Lower Bound + 1
                              = 100-(-100) +1 = 201
Number of columns = Upper Bound – Lower Bound + 1
                                     =50-(-50) +1 = 56
Row Major: –
A {99,49} =10+ [(99-(-100))56 + (49 – (-5))]4
                 =10+ [(99+100)56 + (49+5)]4
                 =10+ [(199)56 + (54)]4
                 =10+ [11144+54]4
                 =10+ [11198]4
                 =10+ 44792
                 =44802


Q21: What is Sparse matrix? Explain the application of sparse matrix?      
Solution: A matrix contains more number of zero elements than non-zero elements such matrix is called Sparse matrix.


Q22: How can you represent a sparse matrix in memory?
Solution: There are two ways to represent a sparse matrix:
1. Array representation
2. Linked List representation


Q23: List some operations on linked list?
Sol. Following are some of the operations on linked list:
Traversal, Insertion, Deletion, Searching, Sorting, Merging, Updating

Related Post
For all study material

click here to view 
Most Frequently asked Question from unit 1
click here to view 
Long Answer Question from unit 1

click here to view 

data structures and algorithms question bank with answers pdf please follow us on over You tube Channel 

you can visit over another blog using the link provided below

click here 

Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart

You cannot copy content of this page