Question: Algorithm: count the odd numbers in a list input: a list of numbers count larr 0 repeat for each item in numbers: If item is
Algorithm: count the odd numbers in a list
input: a list of numbers
count larr
repeat for each item in numbers:
If item is odd, then count larr count
Output : count
Complete this trace table. Is the runtime linear or constant
with respect to the length of the list?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
