In embedded firmware, some objects (such as state machine nodes or mode configurations) must be reinitialized without changing their memory location.
Heap allocation is not allowed. Instead, placement new is used to construct objects directly inside a preallocated static buffer.
You must:
Mode with a single integer field level.Mode object.Mode object in the buffer, initializing level with the first input.Mode object in the same buffer, initializing level with the second input.
Example
Input:
3 9
Output:
9
Constraints:
Mode.
Input
3 9
Expected Output
9