[3, 2, 2, 4] 1 adding j = 1 t = 3 i = 0 1 adding j = 1 t = 2 i = 1 0 0 [1, 1, 1, 3]