Your firmware maintains a fixed memory pool for sensor packets because heap allocation is not allowed.
The pool can hold 3 packets, and each packet is represented by a struct SensorPacket.
You must:
SensorPacket with:id (integer)value (integer)SensorPacket objects, ensuring that each pool slot is individually aligned for SensorPacket.index (0–2) specifying which pool slot to useid and valueSensorPacket inside the chosen pool slot.id and value in the format:id value
Example
Input:
1 50 900
Output:
50 900
Explanation:
1id = 50, value = 90050 900
Constraints:
index will always be between 0 and 2SensorPacket object
Input
1 50 900
Expected Output
50 900