DSA

¡Supera tus tareas y exámenes ahora con Quizwiz!

Lines beginning with _____ are preprocessor commands, which usually change what code is actually being compiled

#

tells the preprocessor to dump in the contents of another file

#include

When we want to access an identifier defined in a namespace, we tell the compiler to look for it in that namespace using the scope resolution operator ____. we're telling the compiler to look for cout in the std namespace, in which many standard C++ identifiers are defined.

( :: )

Analysis of algorithm (Issues)

-correctness -time efficiency -space efficiency -optimality

Analysis of algorithm (Approaches)

-theoretical analysis -empirical analysis

code that indicates everything following it until the end of the line is a comment

//

What date C++ was created?

1979

is a well-defined finite set of rules that specifies sequential series of elementary operations to be applied to some data called the input, producing after a finite amount of time some data called the output

ALGORTIHM

A good algorithm analyst must be able to carefully estimate or calculate the resources (time, space or other) that the algorithm will use when running. This requires logic, care and often some mathematical ability.

Analysis

is a group of consecutive memory locations with same name and data type.

Array

An array can be sorted in two order:

Ascending Order Descending Order

The operation that contributes most toward the running time of the algorithm

Basic Operation

Who created C++?

Bjarne Stroustrup

indicates true or false

Bool / Boolean

is immensely popular, particularly for applications that require speed and/or access to some low-level features. is a high-level language: when you write a program in it, the shorth hands are sufficiently expressive that you don't need to worry about the details of processor instructions.

C++

exist to explain non-obvious things going on in the code.

Comment

The Advantages of Programming? (3)

Conciseness Maintainability Portability

-if -case

Condition

A collection of data elements whose organization is characterized by accessing operations that are used to store and retrieve the individual data element. It is a way of grouping fundamental types (like integers, floating point numbers, and arrays) into a bundle that represents some identifiable thing.

Data Structures

Every expression has a type - a formal description of what kind of data its value is

Data Type

A good algorithm designer must have a thorough background knowledge of algorithmic techniques, but especially substantial creativity and imagination

Design

The most important thing in a program is the ___ of the algorithmic. It is far more significant than the language the program is written in, or the clock speed of the computer.

Design

An algorithm solution to a computational problem will usually involve designing an algorithm, and then analyzing its performance

Design and Analysis

Name of things that are not built into language

Identifiers

Word with special meaning to the compiler

Keywords

basic constant values whose value is specified directly in the source code

Literals

-for -while -repeat

Loops

Three operator types

Math, logic, bitwise or mathematical operators, logical operators, bitwise

An array with dimensions more than two. The maximum limit of array is compiler dependent

Multi-Dimensional Array

is one in which one subscript/indices specification is needed to specify a particular element of array.

One Dimensional Array

Mathematical or Logical Operation

Operators

Defining the structure

Punctuation

- One command at a time - Parallel and distributed computing

Sequence

Algorithm Principles (3)

Sequence Condition Loops

Types of Array (3)

Single/One-Dimensional Array Two Dimensional Array Multi-Dimensional Array

Is a process of arranging the value of array in a particular order

Sorting

-How much memory it takes to compute -Measure by a function S(N)

Space Complexity

A sequence of characters such as Hello, world is known ____.

String

are the minimal chunk of program that have meaning to the compiler - the smallest meaningful symbols in the language

TOKENS

-How much time it takes to compute -Measure by a function T(N)

Time Complexity

Algorithm Complexity (2)

Time Complexity Space Complexity

_____ is analyzed by determining the number of repetitions of the basic operation as a function of input size

Time efficiency

is an array which each element is itself an array

Two Dimensional or 2-D array

Space of various sorts: ignored by the compiler

Whitespace

give 5 examples of escape sequence

\n \t \a \r \f \b \\

examples of some data structures(6):

arrays maps linked list queues trees graphs

Single text character or small integer. Indicates with single quote ' '

char

floating numbers

double

The memory location in the array known as?

elements

The elements of array is accessed with reference to its position in array, that is called ____

index or subscript

larger integer

int

defines the code that should execute when the program starts up. The curly braces represent grouping of multiple commands into a block.

int main() {...}

which defines the procedures for input/output.

iostream file

The total number of elements in the array is called ____

length

In C++, identifiers can be defined within a context - sort of a directory of names - called a

namespace

A typical declaration of an array:

type name [elements];

This line tells the compiler that it should look in the std namespace for any identifier we haven't defined.

using namespace std;


Conjuntos de estudio relacionados

HITT 2343 Test #3 Chapters 13-18

View Set

Health Unit 3 Quiz 3:Disease and Prevention

View Set

Chapter 6: Wireless LANs I (Test Your Knowledge)

View Set