Data Structures and Algorithms
Community
Data Structures and Algorithms
2077 Boards
Section A
Answer any two questions.
1
What is stack? What are the different applications of stack? Explain stack operations with example.
10
Connect with us on Discord to become a contributor.
2
Differentiate between singly linked list and doubly linked list. How do you insert and delete a node from doubly linked list? Explain.
10
Connect with us on Discord to become a contributor.
3
What is shortest path? Explain Dijkstra algorithm for finding shortest path using suitable example.
10
Connect with us on Discord to become a contributor.
Section B
Answer any eight questions.
4
What is dynamic memory allocation? Compare data structure with abstract data type.
5
Dynamic memory allocation refers to the allocation of memory at runtime, rather than at compile time. This allows for flexible data structure sizes that can grow or shrink as needed during program execution.
Comparison: Data Structure vs. Abstract Data Type (ADT)
-
Data Structure:
- A concrete implementation of how data is organized and stored in computer memory.
- Defines the physical layout and manipulation methods of data.
- Examples: Array, Linked List, Stack, Queue, Tree, Graph.
-
Abstract Data Type (ADT):
- A mathematical model for a collection of data values and a set of operations defined on those values.
- Focuses on what operations can be performed and their behavior, independent of the underlying implementation.
- Specifies the interface and logical properties of data, abstracting away the implementation details.
- Examples: List ADT, Stack ADT, Queue ADT, Set ADT, Map ADT.
| Feature | Data Structure | Abstract Data Type (ADT) |
|---|---|---|
| Nature | Concrete implementation | Logical model/interface |
| Focus | How data is stored & manipulated | What operations are available |
| Abstraction | Low-level | High-level |
| Relationship | Implements an ADT | Can be implemented by one or more data structures |
5
Explain algorithm for evaluation of postfix expression using stack
5
Connect with us on Discord to become a contributor.
6
Explain queue as an ADT.
5
Connect with us on Discord to become a contributor.
7
Write a recursive program to find GCD of two numbers.
5
Connect with us on Discord to become a contributor.
8
What is linked list? How is it different from array?
5
Connect with us on Discord to become a contributor.
9
Hand test bubble sort with array of numbers 53, 42, 78, 3, 5, 2, 15 in ascending order.
5
Connect with us on Discord to become a contributor.
10
What is hashing? Explain concept of hash table and hash function with example.
5
Connect with us on Discord to become a contributor.
11
What is minimum spanning tree? Explain
5
Connect with us on Discord to become a contributor.
12
Write short notes on:
Tail recursion
Collision resolution techniques
5
Connect with us on Discord to become a contributor.