WEEK 2: INTRO TO DSA Flashcards

(44 cards)

1
Q

a computational method for solving a problem; a sequence of steps that take us from the input to the output

A

algorithm

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

an algorithm must be (4):

A

correct, finite, general, efficicent

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

an algoritm should provide correct solution according to the specifications

A

correct

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

an algorithm should terminate

A

finite

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

an algorithm should work for every instance of a problem

A

general

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

an algorithm should use few resources (such as time and memory)

A

efficient

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

2 types of algorithm representation

A

flowchart & pseudocode

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

a graphical representation of an algorithm

A

flowchart

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

an english-like representation of the code required for an algorithm; it is the most common tool to define alogithms

A

pseudocode

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

the first programming concept

A

nonstructured, linear programs (spaghetti code)

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

in this programming concept, the logic flow wounds through the program; all processes are stored in main

A

nonstructured, linear programs

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

the second concept of programming

A

modular programminbng (structured/procedural)

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

programs were organized in functions, each of which is still used in a linear coding technique

A

modular programming

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

the third and modern programming concept

A

object-oriented programming

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

in this programming concept, the functions are developed around an object; one part of it is encapsulation, in which all processing from an object is bundled together in a library and hidden from the user

A

object-oriented programming

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

3 types of statement constructs in programming

A

sequence, selection, loop

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

a series of statements that do not alter the execution path within an algorithm

A

sequence

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

this evaluates one or more alternative; also known as conditional statements

19
Q

iterates a block of code

20
Q

main difference between array & data structure

A

array is homogeneous while data structure is not

21
Q

array concept; you declare one data type to be used for the entire structure

22
Q

a way of organizing data considering not only the items stored, but also their relationship from each other

A

data structure

23
Q

an aggregation of atomic and composite data types into a set with defined relationships

A

data structure

24
Q

a combination of elements each of which is either a data type or another one of itself

A

data structure

25
a group of data elements grouped together under one name
data structure
26
a set of associations or relationships involving combined elements
data structure
27
4 main elements of data structure
atomic data, composite data, data type, structure
28
these are data that we choose to consider as a single, nondecomposible entity
atomic data
29
this can be broken out into subfields that have meaning
composite data
30
this is a set of data and the operations that can be performed on the data
data type
31
this is a set of rules that holds data together
structure
32
name 5 types of data structures
set, array, list, queue, stack
33
it is a mathematical model for data types
abstract data type
34
class of objects whose logical behavior is defined by a set of values and a set of operations
abstract data type
35
a data declaration packaged together with the operations that are meaningful for the data type
abstract data type
36
with this, users are not concerned with how the task is done, but rather what it can do
abstract data type
37
this consists of a set of definitions that allow the programmers to use the functions while hiding the implementation
abstract data type
38
this contains elements of the same type arranged in sequential order
list abstract data type
39
this contains elements of the same type arranged in sequential order, but all operations take place at a single end that is the top of it
stack
40
these grow and shrink during execution
dynamic data types
41
with this, insertions and removals can be made anywhere
linked list
42
insertions and deletions are made at the front of the structure
stack
43
insertions are made at the back and removals made from the front of the structure
queues
44
a high-speed searching and sorting of data and efficient elimination of duplicate data items
binary tree