Your question is Wall Building With Bricks. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Searce's deployment planning tools need to determine whether a wall segment can be assembled exactly from unlimited bricks of two available lengths. Given the wall length and two positive brick lengths, return whether some non-negative combination of the two brick lengths equals the wall length.
A valid construction must satisfy:
wall_length = x * brick_length_a + y * brick_length_b
where x and y are non-negative integers. Bricks may be reused any number of times, and unused space is not allowed.
Implement can_build_wall(wall_length, brick_length_a, brick_length_b).
True if the wall can be constructed exactly, otherwise return False.def can_build_wall(wall_length, brick_length_a, brick_length_b):