Company: Publicius_sapient_9nov
Difficulty: medium
Cyber Attack Simulation Points Problem Description Calculate attacker points in a multi-level cyber attack simulation. An attack progresses through n security levels, from 1 to n . The attacker can choose to start at any level i (where 1 ) with an initial energy k . At each level l (where 1 ): The attacker must spend layers[l-1] energy to breach that level. If the current energy is insufficient to breach level l , the attack fails and ends. If, after successfully breaching level l , the remaining energy is greater than or equal to energy[l-1] , the attacker scores 1 point. The goal is to compute an array of n integers. The j -th element of this array (0-indexed, corresponding to starting level j+1 ) should represent the maximum number of points an attacker can score when starting the attack at level j+1 with initial energy k . The attack proceeds sequentially from the chosen starting level to subsequent levels until energy runs out or all levels are breached. Complete the function getN