Data structure Flashcards

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

Arrays

A

A data structure that stores a collection of items at contiguous memory locations.

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

Array

A

Fixed size, elements accessed by index, efficient for random access.
- Example: int[] numbers = {1, 2, 3, 4, 5}

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

Linked Lists

A

Definition: A data structure consisting of a sequence of elements, each pointing to the next

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

Linked list

A

-Dynamic size, elements accessed sequentially, efficient for insertion/deletion.
- Types: Singly linked list, doubly linked list.

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

Stacks**:
- Definition: A data structure that follows the Last In, First Out (LIFO) principle.
- Operations: Push (add element), Pop (remove top element), Peek (view top element).
- Example: Function call stack.

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