Pular para o conteúdo

Lesson 26: Search the shelf

English

Look one by one

  • A warehouse robot must find one box on a long shelf. It does not know where the box is.
  • So it looks at the slots one by one, in order, from the first to the last. This is a linear search.
  • The box is in a different slot on every map, and on one map it is not there at all.

Words for this lesson

Word Meaning
search look for something
slot one place on the shelf
flag a variable that is True or False
found seen; the search has worked

Entrar ou criar conta

IGCSE, A-Level & AP