Find an element in a sequence
Jump to navigation
Jump to search
Input
- A sequence [math]\displaystyle{ S }[/math].
- an element [math]\displaystyle{ x }[/math] of the component type of [math]\displaystyle{ S }[/math].
Output
A boolean value:
- [math]\displaystyle{ true }[/math], if [math]\displaystyle{ x }[/math] is currently in [math]\displaystyle{ S }[/math],
- [math]\displaystyle{ false }[/math], otherwise.
Objective
N/A
Complexity
Linear