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.
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
- Â Linear type Data StructureÂ
- 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:
- Data:Â Data is raw, facts and figure like Name, Roll number, Phone Number etc.
- 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. Â
- 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.
- File: File is the collection similar type of records.
- 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:
- Primitive data types are data types which already exist in the programming language like Int , Float, Char, Double etc.
- 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?
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.
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.Â
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’.
- Time complexityÂ
- 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