Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

DATA STRUCTURE QUESTIONS WITH CORRECT ANSWERS 100%

Rating
-
Sold
-
Pages
5
Grade
A+
Uploaded on
28-07-2025
Written in
2024/2025

DATA STRUCTURE QUESTIONS WITH CORRECT ANSWERS 100%

Institution
DATA STRUCTURES
Course
DATA STRUCTURES

Content preview

DATA STRUCTURE QUESTIONS WITH
CORRECT ANSWERS



What is the difference between a Singly Linked List and a Doubly Linked List? - Correct
Answers -A singly linked list is a set of nodes where each node has two fields 'data' and
'link'. The 'data' field stores actual piece of information and 'link' field is used to point to
next node. Basically 'link' field is nothing but address only. A DLL contains an extra
pointer, typically called previous pointer, together with next pointer and data which are
there in singly linked list.

What is a Data Structure? - Correct Answers -A data structure is a way of organizing the
data so that the data can be used efficiently. Different kinds of data structures are suited
to different kinds of applications, and some are highly specialized to specific tasks.

What are linear and non linear data Structures? - Correct Answers -Linear: A data
structure is said to be linear if its elements form a sequence or a linear list. Examples:
Array. Linked List, Stacks and Queues
Non-Linear: A data structure is said to be non-linear if traversal of nodes is nonlinear in
nature. Example: Graph and Trees.

What are the various operations that can be performed on different Data Structures? -
Correct Answers -Insertion, Deletion, Traversal, Searching, Sorting.

How is an Array different from Linked List? - Correct Answers -The size of the arrays is
fixed, Linked Lists are Dynamic in size.
Inserting and deleting a new element in an array of elements is expensive, Whereas
both insertion and deletion can easily be done in Linked Lists.
Random access is not allowed in Linked Listed.
Extra memory space for a pointer is required with each element of the Linked list.
Arrays have better cache locality that can make a pretty big difference in performance.

What is Stack and where it can be used? - Correct Answers -Stack is a linear data
structure which the order LIFO(Last In First Out) or FILO(First In Last Out) for accessing
elements. Basic operations of stack are : Push, Pop , Peek
What is Data abstraction? - Correct Answers -Data abstraction is a powerful tool for
breaking down complex data problems into manageable chunks. This is applied by
initially specifying the data objects involved and the operations to be performed on
these data objects without being overly concerned with how the data objects will be
represented and stored in memory.

, How do you insert a new item in a binary search tree? - Correct Answers -Assuming
that the data to be inserted is a unique value (that is, not an existing entry in the tree),
check first if the tree is empty. If it's empty, just insert the new item in the root node. If
it's not empty, refer to the new item's key. If it's smaller than the root's key, insert it into
the root's left subtree, otherwise, insert it into the root's right subtree.

What is the minimum number of nodes that a binary tree can have? - Correct Answers -
A binary tree can have a minimum of zero nodes, which occurs when the nodes have
NULL values. Furthermore, a binary tree can also have 1 or 2 nodes.

What is a Queue, how it is different from stack and how is it implemented? - Correct
Answers -Queue is a linear structure which follows the order is First In First Out (FIFO)
to access elements. Mainly the following are basic operations on queue: Enqueue,
Dequeue, Front, Rear
The difference between stacks and queues is in removing. In a stack we remove the
item the most recently added; in a queue, we remove the item the least recently added.
Both Queues and Stacks can be implemented using Arrays and Linked Lists.

What is Infix notation? - Correct Answers -Infix notation: X + Y - Operators are written
in-between their operands. This is the usual way we write expressions. An expression
such as
A*(B+C)/D

What is prefix notation? - Correct Answers -Prefix notation (also known as "Polish
notation"): + X Y Operators are written before their operands. The expressions given
above are equivalent to
/*A+BCD

What is postfix notation? - Correct Answers -Postfix notation (also known as "Reverse
Polish notation"): X Y + Operators are written after their operands. The infix expression
given above is equivalent to
A B C + * D/

What is a Linked List and What are its types? - Correct Answers -Singly Linked List : In
this type of linked list, every node stores address or reference of next node in list and
the last node has next address or reference as NULL. For example 1->2->3->4->NULL
Doubly Linked List : Here, here are two references associated with each node, One of
the reference points to the next node and one to the previous node. Eg. NULL<-1<->2<-
>3->NULL
Circular Linked List : Circular linked list is a linked list where all nodes are connected to
form a circle. There is no NULL at the end. A circular linked list can be a singly circular
linked list or doubly circular linked list. Eg. 1->2->3->1 [The next pointer of last node is
pointing to the first]

Written for

Institution
DATA STRUCTURES
Course
DATA STRUCTURES

Document information

Uploaded on
July 28, 2025
Number of pages
5
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$11.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
millyphilip West Virginia University
Follow You need to be logged in order to follow users or courses
Sold
2921
Member since
4 year
Number of followers
1958
Documents
44307
Last sold
12 hours ago
white orchid store

EXCELLENCY IN ACCADEMIC MATERIALS ie exams, study guides, testbanks ,case, case study etc

3.6

551 reviews

5
239
4
87
3
104
2
32
1
89

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions