Notes

  • two parts to method
    • repeat recursive call until return statement
  • base case returns number - purpose is to not have a recursive statement
  • binary sort
    • most efficient method cut in half again and again
  • merge sort: sort arraylist, divide array into halves and merge together
    • divide and conquer system
  • cannot have void because it will not return anything
  • call stack - keeps track of how many times the recursive is called
  • iterations have set instructions use for and while loops
    • recursions use function calls
  • linear recursion - single call to itself
  • selection sort - minimum from unsorted and putting it at the end of the sorted