Algorithm Flashcards

1
Q

Default random number range

Creating random numbers in a certain range

A

Default range: 0 to 1

Lower limit + rand(size of output)*(upper limit-lower limit)

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

Reversing order of an array

A

Array = end:-1:1

Start from last position, decrease in position by 1, final value at first position

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