07 Flashcards
Array
A collection of values in which all the values have the same type, & each is id by an index
Element
One of the vales in an array. The [] operator selects elements
Allocate
To reserve memory for an array or other obj. The new operator allocates memory
Reference
A val that indicates a storage loc. In a memory diagram reference appears as an arrow
Index
An integer variable or value used to indicate an element of an array
Alias
A var that referes to the same obj as another var
Traversal
Looping through the elements of an array or other collection
Search
A traversal pattern used to find a particular element of an array
Reduce
A traversal pattern that combines the elements of an array into a single val
Accumulator
A var used to accumulate results during a traversal
Deterministic
A program that does the same thing every time it is run
Nondeterministic
A program that always behaves differently, even when run with same input
Pseudorandom
A sequence of number that appears to be random but are actually the product of a deterministic computation
Histogram
An array of integers in which each integer counts the # of vales that fall into a certain range
Enhances for loop
An alternative syntax for traversing the element of an array or other collection