Delete comment from: Javarevisited
thewolf said...
In Java you must force to decimal operation in ((totalCount + 1) / 2) because the result here is 60, the correct operation in Java is
int expectedSum = (int) (totalCount * ((float) (totalCount + 1) / 2));
Dec 15, 2015, 3:46:09 PM
Posted to How to Find Missing Number on Integer Array of 1 to 100 - BitSet Example