full transcript

From the Ted Talk by Alex Rosenthal: The Chasm | Think Like A Coder, Ep 6


Unscramble the Blue Letters


In this case, a nïvae solution is to approach a pile of blocks, try all the arrangements, and see if one is a palindrome by reading it forward and then backwards.

The problem with this approach is that it would take a tremendous auonmt of time. If hdgee tried one combination every second, a stack of just 10 different blocks would take him 42 days to exhaust. That’s because the toatl time is a function of the factorial of the number of blocks there are. 10 blocks have over 3 million combinations.

What this naïve slootiun shows is that we need a much faster way to tell whether a pile of bolkcs can form a palindrome. To start, it may be intuitively clear that a pile of all different blocks will never form one. Why? The first and last blocks can’t be the same if there are no repeats. So when can a given sequence become a palindrome?

Open Cloze


In this case, a _____ solution is to approach a pile of blocks, try all the arrangements, and see if one is a palindrome by reading it forward and then backwards.

The problem with this approach is that it would take a tremendous ______ of time. If _____ tried one combination every second, a stack of just 10 different blocks would take him 42 days to exhaust. That’s because the _____ time is a function of the factorial of the number of blocks there are. 10 blocks have over 3 million combinations.

What this naïve ________ shows is that we need a much faster way to tell whether a pile of ______ can form a palindrome. To start, it may be intuitively clear that a pile of all different blocks will never form one. Why? The first and last blocks can’t be the same if there are no repeats. So when can a given sequence become a palindrome?

Solution


  1. naïve
  2. blocks
  3. hedge
  4. total
  5. amount
  6. solution

Original Text


In this case, a naïve solution is to approach a pile of blocks, try all the arrangements, and see if one is a palindrome by reading it forward and then backwards.

The problem with this approach is that it would take a tremendous amount of time. If Hedge tried one combination every second, a stack of just 10 different blocks would take him 42 days to exhaust. That’s because the total time is a function of the factorial of the number of blocks there are. 10 blocks have over 3 million combinations.

What this naïve solution shows is that we need a much faster way to tell whether a pile of blocks can form a palindrome. To start, it may be intuitively clear that a pile of all different blocks will never form one. Why? The first and last blocks can’t be the same if there are no repeats. So when can a given sequence become a palindrome?

Frequently Occurring Word Combinations


ngrams of length 2

collocation frequency
naïve solution 5
madam im 2
im adam 2

ngrams of length 3

collocation frequency
madam im adam 2


Important Words


  1. amount
  2. approach
  3. arrangements
  4. blocks
  5. case
  6. clear
  7. combination
  8. combinations
  9. days
  10. exhaust
  11. factorial
  12. faster
  13. form
  14. function
  15. hedge
  16. intuitively
  17. million
  18. naïve
  19. number
  20. palindrome
  21. pile
  22. problem
  23. reading
  24. repeats
  25. sequence
  26. shows
  27. solution
  28. stack
  29. start
  30. time
  31. total
  32. tremendous