Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

DS 1 Marks IMP Que-Ans

Q-1 :- Define data structure.


Ans :- Data structure is a way of organizing the data and storing the data in a
computer.

Q-2 :- Is Queue a priority queue? Justify?


Ans :- There is no priority to elements in a queue beacause the priority queue
have FIFO (First-In-First-Out) rules are implemented.

Q-3 :- Mention variations of the queue data structure.


OR
Q-3 :- What are the types of queue in Data Structure.
Ans :- There are four types of Queue in data structure :- (1) Linear Queue (2)
Circular Queue (3) Priority Queue (4) De-Queue

Q-4 :- Give two applications of graphs?


Ans :- (1) It is used in Google Maps for building transportation systems.
(2) Facebook Friend suggestion algorithm uses graph theory.

Q-5 :- List operations performed on a stack.


Ans :- There arefollwing operations perfomed on stack :-
(1) Push :- It adds an element on top of the stack.
(2) POP :- It removes the top most elementfrom the stack.
(3) PEEK :- It displays the top most element of the stack.
(4) isEmpty :- It checks whether the stack is Empty.
(5) isFull :- It checks whether the stack is Full.
Q-6 :- What is an Algorithm ? Explain Algorithm.
Ans :- An Algorithm is a step-by-step process of hardware and software
instruction list and it is used to solving a problems.

Q-7 :- What is Spanning Tree ? Explain spanning tree.


Ans :- Spanning Tree :- A spanning tree is defined as a subset of a connected
undirected graph.
 It includes all the vertices covered with the minimum number of edges
possible.

Q-8 :- What is KWIC indexing ?


Ans :- KWIC Stands for keyword in Context.
 KWIC Indexing is a system that represents document title and document
contents.

Q-9 :- What is Graph ?


Ans :- A Graph is non-linear data strcture that consisting vertices(v) and
edges(e).
 Directed Graph , Undirectred Graph , Empty Or Null Graph , Connected
Graph are the some types of graph.

Q-10 :- What is Primitive data structure ?


Ans :- Primitive data structure is a fundamental type of data structure that
stores the data of only one type.
 There are eight types of primitive data sturucture such as… byte , character ,
float , integer , Boolean , short , song , double.

Q-11 :- What is DFS ?


Ans :- DFS Stands for Depth-First-Search.
 DFS explores data structure such as trees and graphs.
Q-12 :- Define Priority Queue.
Ans :- Priority queue is an abstract data type that orders of elements based on
their priority which can be ascending or descending.

Q-13 :- Define mixed graph.


Ans :- Mixed graph is a mathematical representation of graph that combines
directed or undirected edges.

Q-14 :- Define Adjancent Node.


Ans :- Adjancent Node refers to the nodes that are directly connected to a
particular node.

Q-15 :- Define Loop in graph.


Ans :- Loop is an edge that connects a vertex itself.

Q-16 :- Define Null Graph.


Ans :- Null Graph does not have any edges and it only have vertices.

Q-17 :- Define Height of tree.


Ans :- Height of tree can be defined as the number of edges from the root node
to the leaf node.

Q-18 :- Define binary tree.


Ans :- Binary tree is a hierarchical structure in which each node have at least
two children :- (1) Left child (2) Right child. The top most node in binary tree is
called the “Root”.

Q-19 :- What is the complexity of binary search algorithm ?


Ans :- There are two complexities of binary search algorithm that are Time
Complexity and Space Complexity.
 Where Time complexity of binary search algorithm is 0(log n ), where n is
the number of an array that divides the array in half.
 Where Speace complexity of binary search algorithm is 0(1).
Q-20 :- Write two simple hash functions.
Ans :- There are following hash functions :-
(1) Division Method
(2) Mid Square Method
(3) Folding Method
(4) Multiplication Method.

Q-21 :- Define Sibling.


Ans :- In Tree data strcture , Nodes which belongs the same parent it is called
Siblings.

Q-22 :- Define Leaf Node.


Ans :- A node which does not have any child node is called Leaf Node.

Q-23 :- Define degree.


Ans :- Degree of nodes is the number of partitions in subtree in which the node
is represent as “root”.

Q-24 :- Define Height of the tree.


Ans :- Height of the tree is a length of the path from leaf to node.

You might also like