Divide the Cake

Consider a rectangular cake with a rectangular section (of any size or orientation) removed from it. Is it possible to divide the cake exactly in half with only one cut?

Hints
  • Solution Approach
  • Complete Solution
6139 successful submissions.
Asked In:
  • Google
Click here to jump start your coding interview preparation