标签:最小值 开始 题目 hide subject pen 技术 cli class
排序和并找到最小值,可以用sort函数。
1 class Solution { 2 public: 3 int minNumberInRotateArray(vector<int> rotateArray) { 4 sort(rotateArray.begin(),rotateArray.end()); 5 return rotateArray[0]; 6 } 7 };
标签:最小值 开始 题目 hide subject pen 技术 cli class
原文地址:https://www.cnblogs.com/wxwhnu/p/11406587.html