Problem

Same as linear search (practice).

Examples

  • shiftedLinearSearch([5, 3, 1], 1) -> 2
Compile and test (Ctrl+Enter)