English subtitles

← 06-37 Platos Republic

Get Embed Code
3 Languages

Showing Revision 1 created 06/10/2012 by Amara Bot.

  1. [Which of the following could be simplified or removed without changing the result?]
  2. So you may already have a good intuition for these sorts of optimizations.
  3. Let me give you a chance to show that off.
  4. So here I've written a function in JavaScript called Plato's Republic.
  5. It's a function of 2 variables: A and B.
  6. A gets A times 1, B gets B + 0, A gets A + B,
  7. B gets B + 2, and then finally we return A.
  8. There are 5 possible statements here.
  9. Which of them can be simplified or removed
  10. without changing the result?
  11. And here I really want you to mostly focus on removing,
  12. and note that this is a little trickier than it looks.
  13. So give it some thought.