Skip to content

Instantly share code, notes, and snippets.

@nycdavid
Last active December 9, 2017 01:45
Show Gist options
  • Save nycdavid/9487cf2a687a3188e48739f69886d474 to your computer and use it in GitHub Desktop.
Save nycdavid/9487cf2a687a3188e48739f69886d474 to your computer and use it in GitHub Desktop.
Test 3 Review
  1. Given:
    • A list of numbers
    • Two different sorting algorithms
    • Use cost i.e. different cost value for a move vs. comparison
    • Determine which algorithm is the most efficient
  2. Heap sort
  3. Determining average number of reads in a BST
    • Multiply the number of nodes by the level number
    • Divide by the number of nodes
  4. Deleting nodes from a BST:
    • Going from the right or going from the left.
    • Left: largest element
    • Right: lowest element
    • Explain which side you went to
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment