There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply () below.
If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.
Join the Discussion. Help a fellow learner on their journey.
Ask or answer a question about this exercise by clicking reply () below!
Agree with a comment or answer? Like () to up-vote the contribution!
In one of the worst cases, the target value is found. Is this case more efficient than the second case because it was able to find the target value in the list? Leave your thoughts on this post in the forum and then click ‘Next’ to move onto the next exercise.
Although it was a happy outcome to find the target value in the last location, it was no more efficient than not finding the value at all.
I don’t think so, because it still had to check the last value, and checking the last value would be the very last iteration. The only difference is the print statement.
I think we are all on the same page. The question is whether or not it is more efficient to find as the last item in a list. It’s not more efficient. But it is never-the-less a preferable outcome. Unless you don’t want to find something. Like maybe an oncologist looking at organs for cancer or something
I digress. NO MORE EFFICIENT!