On the TExES 241, the first element of any array is found at this index number.
What is 0 (zero)?
This kind of named code block performs a task but does NOT return a value (example: printing numbers).
What is a procedure?
Recursion is similar to this control structure because both repeat portions of a program (but recursion differs in HOW it repeats).
What is a loop?
This search starts at one end of an array and checks every location until the target is found or all locations are checked.
What is linear search?
Given nums = {3, 6, 9, 12, 15}, a loop adds each value where (nums[i] mod 2 == 0). This value is printed.
What is 18 (the even values 6 + 12)?
In a 2D array, these two things are organized by the outer loop and the inner loop, respectively.
What are rows (outer loop) and columns (inner loop)?
Unlike a procedure, this kind of code block returns a value back to where it was called.
What is a function?
This is how you know a method is recursive: it contains a call to this.
What is itself (the method calls itself)?
This sort repeatedly finds the smallest unsorted value and swaps it to the front of the unsorted portion.
What is selection sort?
For the jagged array grid = {{1,2,3}, {4,5}, {6,7,8,9}}, nested loops add every element. This total is printed.
What is 45?
This is the name for a 2D array whose rows do NOT all have the same length.
What is a ragged (jagged) array?
A function or procedure associated with an object or class in OOP is called this.
What is a method?
Like a loop, recursion has these four parts.
What are Start, Check, Action, and Step?
This sort takes the next element and shifts it left into its correct position among the already-sorted elements.
What is insertion sort?
For matrix = {{2,4,6}, {1,3,5}, {0,8,9}}, summing matrix[i][i] across the main diagonal prints this value.
What is 14 (2 + 3 + 9)?
This programming structure, a loop placed inside another loop, is used to visit every element of a 2D array.
What are nested loops?
This part of a method, of the form return_type identifier(parameters), is also called the signature.
What is the method header?
These are the two types of recursive methods.
What are return methods and void methods?
These are the four sorts you must know for the TExES 241.
What are selection sort, insertion sort, merge sort, and quicksort?
linearSearch(array, target, size) scans an array of the given size from index 0 and returns the index of the FIRST element equal to target (or -1 if not found). Given nums = {4, 9, 15, 6, 9, 2}, the call linearSearch(nums, 9, 6) searches all 6 elements for the value 9. What index value is returned and printed?
What is 1 (the index of the first 9)?
These are the four common array patterns taught in the Day 1 review.
What are search, reverse, sum, and swap?
When a copy of the argument is sent so changes inside the method do NOT affect the original variable, the parameter is passed this way.
What is pass by value (passing by value)?
Recursion uses lots of memory, so too many calls can cause this error and crash everything.
What is a stack overflow?
Quicksort recursively sorts the numbers around this chosen reference value.
What is a pivot?
searchCount(array, target, size) scans an array of the given size from index 0 and counts how many elements it examines (inclusive) up to and including the first element equal to target. Given nums = {8, 3, 11, 7, 5}, the call searchCount(nums, 7, 5) searches for the value 7. How many elements are examined before (and including) finding the target?
What is 4?