Case #1: 1 4 0 5 7 Case #2: 10 5