Into To Data Structures & Algorithms Flashcards

1
Q

Data Structure

A

A way of storing, organizing, and performing operations on data

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

Record

A

Data structure that stores subitems, often called fields, with a name associated with each subitem

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

Array

A

Data structure that stores an ordered list of items, where each item is directly accessible by a positional index

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

Linked List

A

Data structure that stores an ordered list of items in nodes, where each node stores data and has a pointer to the next node

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

Binary Tree

A

Data structure in which each node stores data and has up to two children, known as left and right child

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

Hash Table

A

Data structure that stores unordered items by mapping (or hashing) each item to a location in an array

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

Heap

A

Max Heap: tree that maintains the simple property that a node’s key is greater than or equal to the node’s children’s keys

Min Heap: a tree that maintains the simple property that a node’s key is less than or equal to the node’s children’s’ keys

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

Graph

A

Data structure for representing connections among items, and consists of vertices connected by edges.

Vertex: item in a graph

Edge: represents a connection between two vertices in a graph

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

Algorithm

A

describes a sequence of steps to solve a computational problem or perform a calculation. An algorithm can be described in English, pseudocode, a programming language, hardware, etc

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

Computational problem

A

specifies an input, a question about the input that can be answered using a computer, and the desired output

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

NP- complete

A

problems are a set of problems for which no known efficient algorithm exists. NP-complete problems have the following characteristics:

No efficient algorithm has been found to solve an NP-complete problem.
No one has proven that an efficient algorithm to solve an NP-complete problem is impossible.
If an efficient algorithm exists for one NP-complete problem, then all NP-complete problems can be solved efficiently.

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

T or F: An algorithm with a polynomial runtime is considered efficient.

A

True

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

T or F: An efficient algorithm exists for all computational problems.

A

False

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

-o

A

specifying name for executable file

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

Which gcc compiler flag is needed to compile a C program for debugging?

A

-g

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

What information is added to the launch.json file?

A

The command for running the program