ADT vs DSA Flashcards

1
Q

What is an Abstract Data Type (ADT)?

A

A logical description of how data is organized and what operations are supported without concern for implementation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a Data Structure (DSA)?

A

A concrete implementation of an ADT in a programming language.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How is an ADT different from a DSA?

A

An ADT defines behavior and interface; a DSA defines how that behavior is implemented using code and memory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Is “Stack” an ADT or DSA?

A

ADT – it defines push/pop operations but doesn’t specify implementation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are some common implementations of a Stack?

A

Arrays, linked lists.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Is “Linked List” an ADT or DSA?

A

DSA – it’s a specific way to organize data in memory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are examples of ADTs?

A

Stack, Queue, List, Set, Map, Tree, Graph.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are examples of DSAs?

A

Arrays, Linked Lists, Hash Tables, Heaps, Trees, Graph representations (Adjacency List/Matrix).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Can one ADT be implemented using multiple DSAs?

A

Yes – for example a Queue ADT can be implemented with an array or linked list.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Why are ADTs important in software design?

A

They allow abstraction – programmers can use data types without knowing their implementation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Which layer of software development is concerned with ADTs?

A

The design or interface layer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Which layer is concerned with DSAs?

A

The implementation layer – how the data is stored and manipulated in memory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the benefit of separating ADT from DSA?

A

It promotes modularity, reusability, and easier maintenance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Is a HashMap an ADT or a DSA?

A

It can be seen as an ADT (Map) implemented with a DSA like a hash table.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly