Course:: Easy-To-Follow Java Programming
Course:: Easy-To-Follow Java Programming
1. Which algorithms did we learn about? Select the ones that were in video 4.
sum
having fun
count
linear search
reverse
selection
maximum
binary search
minimum
sorting
median
You would like to remove all the jokers from a hand of cards.
3. Put the missing instruction into the following general code of counting.
int count = 0;
int number;
iterate over the numbers (for, while or do-while)
number = ...;
if (number is OK)
;
end of iteration
5. Put the missing instruction into the following general code of linear
search.
SIZE = ;
The answers
1. Which algorithms did we learn about? Select the ones that were in video 4.
X sum
having fun
X count
X linear search
reverse
X selection
X maximum
binary search
X minimum
sorting
median
select You would like to remove all the jokers from a hand of cards.
sum We combine the elements with each other, and with the help of
functions (e.g. addition, multiplication, etc.) we create another
element out of them.
int count = 0;
int number;
iterate over the numbers (for, while or do-while)
number = ...;
if (number is OK)
count++;
end of iteration
5. Put the missing instruction into the following general code of linear
search.