0% found this document useful (0 votes)
10 views4 pages

2 Mark Questions Answers Bold

The document outlines key concepts in data structures, including definitions and differences between data types, stacks, queues, linked lists, trees, and graphs. It also covers various operations, applications, and traversal methods associated with these structures, as well as sorting and searching techniques. Additionally, it discusses time and space complexity in algorithms.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views4 pages

2 Mark Questions Answers Bold

The document outlines key concepts in data structures, including definitions and differences between data types, stacks, queues, linked lists, trees, and graphs. It also covers various operations, applications, and traversal methods associated with these structures, as well as sorting and searching techniques. Additionally, it discusses time and space complexity in algorithms.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Most Likely 2-Mark Questions and Answers

Unit 1: Data Structures Basics


Define Data Structure:

A data structure is a way of organizing and storing data so that it can be accessed and modified

efficiently.

What are Abstract Data Types (ADTs)?:

ADTs are logical models of data types that define the operations on the data without specifying

implementation details.

Difference between Primitive and Non-Primitive data types:

- Primitive: Basic types like int, char, float.

- Non-Primitive: Complex types like arrays, linked lists, trees.

Linear and Non-linear data structures with examples:

- Linear: Data elements are arranged sequentially (e.g., Array, Stack).

- Non-linear: Data elements are arranged hierarchically (e.g., Tree, Graph).

Define Stack:

A stack is a linear data structure that follows the LIFO (Last In First Out) principle.

Operations of Stack:

- Push (Insert)

- Pop (Delete)

Applications of Stack:

- Function call management

- Expression evaluation

Unit 2: Queue and Linked List


Define Queue / Circular Queue:

- Queue: A linear structure that follows FIFO (First In First Out).

- Circular Queue: A queue where the last element is connected back to the first.
Operations of Queue:

- Enqueue (Insert)

- Dequeue (Remove)

Types of Queue:

- Simple Queue

- Circular Queue

- Priority Queue

- Double-ended Queue (Deque)

Applications of Queue:

- Printer job scheduling

- CPU task scheduling

Define Linked List:

A linked list is a linear data structure where each element points to the next, forming a chain.

Types of Linked List:

- Singly Linked List

- Doubly Linked List

- Circular Linked List

Operations of Linked List:

- Insertion

- Deletion

Unit 3: Trees
Define Tree:

A tree is a hierarchical data structure with nodes connected by edges, having one root and many

subtrees.

Define Binary Tree:

A binary tree is a tree in which each node has at most two children (left and right).

Define Binary Search Tree (BST):


A BST is a binary tree where the left child has smaller value and the right child has larger value than

the node.

Define B-Tree:

A B-Tree is a self-balancing search tree designed to work well on disk-based storage, where nodes

can have more than two children.

Define AVL Tree:

An AVL tree is a self-balancing binary search tree where the height difference of left and right

subtrees is at most one.

Applications of Trees:

- File systems

- Database indexing

Tree traversal methods:

- Inorder (Left, Root, Right)

- Preorder (Root, Left, Right)

- Postorder (Left, Right, Root)

Unit 4: Graphs and Algorithms


Define Graph:

A graph is a non-linear structure consisting of nodes (vertices) connected by edges.

Difference between Directed and Undirected Graphs:

- Directed: Edges have a direction (A -> B).

- Undirected: Edges have no direction (A - B).

Applications of Graph:

- Social networks

- Network routing

DFS / BFS:

- DFS (Depth First Search): Explores as far as possible before backtracking.

- BFS (Breadth First Search): Explores all neighbors level by level.


What is Sorting? Types:

Sorting is arranging data in a specific order.

Types: Bubble, Selection, Insertion, Merge, Quick Sort.

Searching and its types:

Searching is finding the location of a data element in a structure.

Types: Linear Search, Binary Search.

Heap Definition and Applications:

A Heap is a complete binary tree used for implementing priority queues.

Applications: Heap sort, Priority queue.

Time Complexity and Space Complexity:

- Time Complexity: Measures the time taken by an algorithm.

- Space Complexity: Measures the memory used by an algorithm.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy