SAP Interview Question

Valid perfect square, and street lights problem (simulation)