Answer:
The method in Java is as follows:
public static int numUnique(int list[]) {
int unique = 1;
for (int i = 1; i < list.length; i++) {
int j = 0;
for (j = 0; j < i; j++) {
if (list[i] == list[j])
break;
}
if (i == j)
unique++;
}
return unique;
}
Explanation:
This line defines the numUnique method
public static int numUnique(int list[]) {
This initializes the number of unique elements to 1
int unique = 1;
This iterates through the list
for (int i = 1; i < list.length; i++) {
The following iteration checks for unique items
int j = 0;
<em> for (j = 0; j < i; j++) {
</em>
<em> if (list[i] == list[j]) </em><em>If current element is unique, break the iteration</em><em>
</em>
<em> break; </em>
<em> }
</em>
if (i == j)
unique++;
}
This returns the number of unique items in the list
return unique;
}
One technology is the telescope
A custom information feel that "HELPS USERS FIND A SPECIFIC DOCUMENT"... is what I got out of that sentence.
ANSWER: Search Box?
Answer: 1.5 : 1
Explanation:
The average of 92 marks for the test is a weighted average of the proportion of students in the class.
Assume boys are in the proportion, x.
(90 * x) + (95 * (1 - x)) = 92
90x + 95 - 95x = 92
-5x = 92 - 95
-5x = -3
x = -3/-5
x = 0.6
Boys are 0.6 of the class
Girls are:
= 1 - 0.6
= 0.4
0.6 : 0.4
1.5 : 1