What's the time complexity of this algorithm? My initial guess is that it's O(log[n])?
int array[] = new int[100];
int counter = 0;
for ( int i = 0; i < array.length; i++ ) {
for ( int j = i + 1; j < array.length; j++ ) {
if ( array[i] == array[j] ) {
counter++;
}
}
}