You are viewing a single comment's thread. Return to all comments →
Iterative solution with built-in functions
int introTutorial(int V, vector<int> arr) { auto it = std::find(arr.begin(), arr.end(), V); if (it != arr.end()) return std::distance(arr.begin(), it); return -1; }
Seems like cookies are disabled on this browser, please enable them to open this website
Intro to Tutorial Challenges
You are viewing a single comment's thread. Return to all comments →
Iterative solution with built-in functions