Vertical Cut Through Cake with Toppings
Determine if it's possible to make a single vertical cut through a rectangular cake with non-overlapping toppings such that the cut doesn't intersect any toppings and both resulting pieces contain at least one topping. Given a list of toppings with their positions [topping (start_x, end_x, start_y, end_y)], return True/False.
Asked at:
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Late August, 2024
Mid-level
Determine if it's possible to make a single vertical cut through a rectangular cake with non-overlapping toppings such that the cut doesn't intersect any toppings and both resulting pieces contain at least one topping. Given a list of toppings with their positions [topping (start_x, end_x, start_y, end_y)], return True/False.
Hello Interview Premium
Your account is free and you can post anonymously if you choose.