6.S095 | January IAP 2018 | Undergraduate

Programming for the Puzzled

Puzzle 4: Please Do Break the Crystal

Given a set of identical balls, you need to discover how high you can climb and drop a ball without the ball breaking. This video describes the algorithm and associated program to solve this problem while minimizing the number of required drops.

Puzzle Description

Python Code

Assignment

  • Do one or more of the exercises in the Please Do Break the Crystal puzzle.

Solution

Programming Constructs and Algorithmic Paradigms Covered in this Puzzle

  • Break statements
  • Radix representations

Course Info

Instructor
As Taught In
January IAP 2018
Learning Resource Types
Lecture Videos
Programming Assignments with Examples