セクション 3. 章 2
single
Challenge: Find Element Index
メニューを表示するにはスワイプしてください
タスク
スワイプしてコーディングを開始
Write a function named findIndex that takes a std::vector<int> and an int value as arguments. Use the std::find algorithm from the Standard Library to search for the value in the vector. If the value is found, return its index; if not, return -1.
- Use the
std::findalgorithm to perform the search. - Return the zero-based index of the found element.
- Return
-1if the value is not present in the vector.
解答
すべて明確でしたか?
フィードバックありがとうございます!
セクション 3. 章 2
single
AIに質問する
AIに質問する
何でも質問するか、提案された質問の1つを試してチャットを始めてください