1class Solution {2 public int[] memLeak(int memory1, int memory2) {3 int i = 1;4 while (Math.max(memory1, memory2) >= i) {5 if (memory1 >= memory2) memory1 -= i;6 else memory2 -= i;7 i++;8 }9 return new int[] {i, memory1, memory2};10 }11}
WPM •0 •0
ACC •0 •0
TIME •0