Random Number Formula
(int)(Math.random() * numOfPossibleValues + startingNumber)
Random Number Function Range
0 - 0.999…
Empty 1D Array Construction
type[] arr = new type[size]
Full 1D Array Construction
type[] arr = {0,1,2,3…}
Function to get the amount of elements in 1D Array
arr.length; (Think that b/c it can’t expand, that therefore its a variable and not a function)
ArrayList Construction
ArrayList<Type> arrList = new ArrayList<Type>();
Read Element Data of ArrayList
arrList.get(index);
Function to get the amount of elements in arrayList
arrList.size();
Order Of Operations for Selection Sort (1st pass only - 3 Steps)
1) Grab First element
2) Iterate through rest and find smallest
3) Swap with first element
Order Of Operations for Insertion Sort (1st element - 6 Steps)
1) Grab first element
2) Compare to the next.
3) If next is lower, overwrite data of first data with next.
5) Repeat until next isn’t higher.
6) Replace current element with first element value.