Practice ยท 4 of 4
Distance Between
Implement long index_of(const int *begin, const int *end, int target) returning the ELEMENT DISTANCE from begin to the first match, or -1 if absent. Compute with pointer subtraction on a found position.
Difficulty: beginner
Press Submit to check your solution.
Back to lesson: Practice: Arithmetic Workbench