Printable worksheet ยท 4 of 4

Correctness includes not finding the target - Paper 4

Read the information, then answer the questions. An adult may read the instructions aloud. Show your working where asked.

Read before answering

List [5,8,2,8], target 8; use zero-based indices. First-match search checks left to right and stops on its first match. All-match search checks every item and records all matching indices. Separately search for 99, which is not in this supplied list. Count item-to-target comparisons only.

Worksheet preview

This exercise is included in the paid course. Full-course fee: GBP 200.00 once. Register and enrol to complete all course exercises and download the course PDFs. Access begins after payment is confirmed.

Register and enrol

Already registered? Sign in