Draw This - beginner
Draw a flowchart for performing a linear search to find the number 7 in the list [3, 5, 7, 9, 11].
7 minutes
Hint 1
Hint 2
Hint 3
Hint 4
Draw a flowchart for performing a linear search to find the number 7 in the list [3, 5, 7, 9, 11].
+---------------------+
| Start |
+----------+----------+
|
v
+---------------------+
| Set index = 0 |
+----------+----------+
|
v
+---------------------+
| Is index < length? |----No----->+---------------------+
+----------+----------+ | Output: Not found |
| +----------+----------+
Yes |
| v
v +---------------------+
+---------------------+ | End |
| Is list[index] = 7? |--Yes---->+---------------------+
| Output: Found at index |
+----------+----------+
|
No
|
v
+---------------------+
| index = index + 1 |
+----------+----------+
|
v
(loop back to check index < length)This flowchart shows how linear search works step-by-step:
This method checks each item one by one until it finds the target or finishes the list.