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
Q

Tests whether the
stack is empty.

23
Q

Returns the number of
items in the stack.

24
Q

Can be implemented
using arrays (static) or pointers (dynamic).

A

Implementation

25
Q

Insertion occurs
at the rear, and deletion occurs
at the front.

A

Simple Queue

25
Q

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).

26
Q

The last node
connects back to the first node,
forming a circle.

A

Circular Queue

27
Q

Items are
inserted and removed based on
priority

A

Priority Queue

28
Q

Insertion and deletion
can happen at both ends.

29
Q

Adds a new
item at the rear of the queue

A

enqueue(item)

30
Q

Removes an item
from the front.

31
Q

Tests whether the
queue is empty

32
Q

Returns the number of
items in the queue.

32
Q

collection of variable number of
data items called nodes

A

Linked Lists

33
Q

Each node
points to the next node.

A

Single Linked List

34
Q

Each node
points to both the next and the
previous node.

A

Doubly Linked List

35
Q

The last
node points back to the first
node.

A

Circular Linked List

36
Q

A hierarchical data structure
consisting of nodes connected by
edges.

37
Q

A tree in which each
internal node can have a maximum of
two child nodes.

A

Binary Tree

37
Q

All leaf
nodes are at the same level.

A

Complete Binary Tree

37
Q

is a non-linear data
structure consisting of vertices (nodes)
and edges (connections between
nodes).

38
Q

Edges have
direction.

A

Directed Graph

38
Q

Edges do
not have direction.

A

Undirected Graph

39
Q

Edges have
weights.

A

Weighted Graph

40
Q

No multiple
edges or loops.

A

Simple Graph

41
Q

There is a
path between any two vertices.

A

Connected Graph

42
Q

Some
vertices are not connected.

A

Non-connected Graph

43
Q

A collection of nodes, where
each node contains two parts: the
information and a link to the next node.

44
Q

An operator
precedes the two operands

A

Prefix Expression

44
Q

An operator is
between two operands

A

Infix Expression

44
Q

An operator
follows the two operands

A

Postfix Expression