Analysis of Algorithms
Given N distinct integers, how many zeros is there?
class Zeros {
public int findZeros(int[] arr) {
int count = 0;
for (int i = 0; i < arr.length; i++) {
if (i == 0) {
count++;
}
}
return count;
}
}Given N distinct integers, how many combination of two sum to exactly zero?
Given N distinct integers, how many triples sum to exactly zero?

Memory
Last updated

