CS 37 Final Review Notes Flashcards

1
Q

What does STL stand for?

A

Standard Template Library

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

What does STL contain?

A

It contains algorithms such as the sort algorithm (you still have to use std). What it essentially does is it sorts the numbers in order in an array(so for example 3 6 7 9 1 3 2, will be sorted in 1 2 3 3 6 7 9 or something like that)

The parameters for this function is sort(arr, and the size of array)

(a way to get the size of an array is sizeof(arr)/sizeof(arr[0]) (the reason we do the second part is because we need to get the size of the data type)

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

How do you sort only a specific amount of elements in an array?

A

you do (arr, arr + how many elements)

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