Into To Data Structures & Algorithms Flashcards
Data Structure
A way of storing, organizing, and performing operations on data
Record
Data structure that stores subitems, often called fields, with a name associated with each subitem
Array
Data structure that stores an ordered list of items, where each item is directly accessible by a positional index
Linked List
Data structure that stores an ordered list of items in nodes, where each node stores data and has a pointer to the next node
Binary Tree
Data structure in which each node stores data and has up to two children, known as left and right child
Hash Table
Data structure that stores unordered items by mapping (or hashing) each item to a location in an array
Heap
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
Graph
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
Algorithm
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
Computational problem
specifies an input, a question about the input that can be answered using a computer, and the desired output
NP- complete
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.
T or F: An algorithm with a polynomial runtime is considered efficient.
True
T or F: An efficient algorithm exists for all computational problems.
False
-o
specifying name for executable file
Which gcc compiler flag is needed to compile a C program for debugging?
-g
What information is added to the launch.json file?
The command for running the program