PRELIM Flashcards

1
Q

Collection of raw facts.

A

Data

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

Representation of the
logical relationship existing between
individual elements of data.

A

Data structure

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

Basic structures directly operated upon
by machine instructions.

A

Primitive Data Structure

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

Primitive Data Structure Examples

A

Integer, Floating-point
number, Character constants, String
constants, Pointers, etc.

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

Initializing or declaring a new
data structure (e.g., creating an integer
or a float).

A

. Create

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

More sophisticated structures derived
from primitive data structures.

A

Non-Primitive Data Structure

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

Accessing or retrieving a
specific element from the structure (e.g.,
selecting a particular value stored in an
integer variable).

A

Selection

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

Modifying the value of an
existing element (e.g., changing the
value of a variable).

A

Updating

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

Removing a data
element or deallocating the memory
used by the data structure (e.g., deleting
or clearing a variable).

A

Destroy/Delete

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

Accessing each element in
the data structure exactly once to
process it (e.g., going through a list or
array to print its elements).

A

Traverse

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

Combining two data structures
into one, often while maintaining a
specific order (e.g., merging two sorted
arrays into one sorted array).

A

Insert

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

Finding the location of a
specific element in the structure (e.g.,
searching for a value in an array or a
node in a tree).

A

Search

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

Arranging elements in a particular
order, such as ascending or descending
(e.g., sorting an array of integers).

A

Sort

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

Combining two data structures
into one, often while maintaining a
specific order (e.g., merging two sorted
arrays into one sorted array).

A

Merge

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

Operations on
Primitive Data Structures

A

Create:
Selection
Updating
Destroy/Delete

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

Operations on
Non-Primitive Data Structures

A

Create
Traverse
Insert
Delete
Search
Sort:
Merge
Destroy/Delete

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

A linear array with one row or
column.

A

One-dimensional array

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

A set of finite homogeneous
elements (same data items).

A

Array

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

A matrix-like array with rows and
columns.

A

Two-dimensional array

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

Arrays with multiple subscripts.

A

Multi-dimensional array

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

A linear data structure where the
operations are performed in LIFO (Last In, First Out) order.

A

Stack

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

Adds a new item to
the top of the stack

A

push(item)

20
Q

Removes the top item
from the stack.

21
Q

Returns the top item
without removing it.

22
Tests whether the stack is empty.
isEmpty()
23
Returns the number of items in the stack.
size()
24
Can be implemented using arrays (static) or pointers (dynamic).
Implementation
25
Insertion occurs at the rear, and deletion occurs at the front.
Simple Queue
25
is an ordered collection of items where an item is inserted at the rear and an existing item is removed at the front (FIFO - First In, First Out).
Queue
26
The last node connects back to the first node, forming a circle.
Circular Queue
27
Items are inserted and removed based on priority
Priority Queue
28
Insertion and deletion can happen at both ends.
Dequeue
29
Adds a new item at the rear of the queue
enqueue(item)
30
Removes an item from the front.
dequeue()
31
Tests whether the queue is empty
isEmpty()
32
Returns the number of items in the queue.
size()
32
collection of variable number of data items called nodes
Linked Lists
33
Each node points to the next node.
Single Linked List
34
Each node points to both the next and the previous node.
Doubly Linked List
35
The last node points back to the first node.
Circular Linked List
36
A hierarchical data structure consisting of nodes connected by edges.
Tree
37
A tree in which each internal node can have a maximum of two child nodes.
Binary Tree
37
All leaf nodes are at the same level.
Complete Binary Tree
37
is a non-linear data structure consisting of vertices (nodes) and edges (connections between nodes).
Graph
38
Edges have direction.
Directed Graph
38
Edges do not have direction.
Undirected Graph
39
Edges have weights.
Weighted Graph
40
No multiple edges or loops.
Simple Graph
41
There is a path between any two vertices.
Connected Graph
42
Some vertices are not connected.
Non-connected Graph
43
A collection of nodes, where each node contains two parts: the information and a link to the next node.
Lists
44
An operator precedes the two operands
Prefix Expression
44
An operator is between two operands
Infix Expression
44
An operator follows the two operands
Postfix Expression