You are given two integers memory1 and memory2 representing the initial available memory in two memory sticks.
Starting at second
At second
If both sticks have an equal amount of available memory, the memory is allocated from the first stick memory1.
If neither memory stick has at least
Return an array containing three integers: [crashTime, memory1Left, memory2Left], representing the exact second at which the program crashes, along with the remaining available memory in memory1 and memory2 respectively.
Constraints:
memory1, memory2
You are given two integers memory1 and memory2 representing the initial available memory in two memory sticks.
Starting at second
At second
If both sticks have an equal amount of available memory, the memory is allocated from the first stick memory1.
If neither memory stick has at least
Return an array containing three integers: [crashTime, memory1Left, memory2Left], representing the exact second at which the program crashes, along with the remaining available memory in memory1 and memory2 respectively.
Constraints:
memory1, memory2