about | help | code help+videos | done | prefs |
linearSearch
Searches for a target value in an array. Returns the index of the first target value in an array.Returns -1 if the target value is not in the array. The array will have a length >= 1. linearSearch([8, 3, -1, 7], 7) → 3 linearSearch([1, -1, -5, 7], 1) → 0 linearSearch([1, 1, 5, -7], 1) → 0 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 310
Copyright Nick Parlante 2017 - privacy