NewProject Coding is here — build features and fix bugs in real codebases with an AI assistantSee what's new

Design a simulation for an alien base attack game. The alien base is represented by the interval [0, n], where n is a positive integer. Each attack is executed at a coordinate x and destroys the segment [x, x+1] of the base. After a series of attacks, determine whether the entire base has been destroyed.

Implement AlienBaseAttack class that supports the following operations:

Test Cases
Input
Output
Expected