剑指offer6 旋转数组的最小数字
来源:互联网 发布:视频加字幕软件 编辑:程序博客网 时间:2024/06/05 00:41
这题我都简直了.......大水题
#include "iostream"#include "vector"using namespace std;class Solution {public: int minNumberInRotateArray(vector<int> rotateArray) { if(rotateArray.size()==0) return 0; int min = 9999999; for(vector<int>::iterator iter = rotateArray.begin();iter != rotateArray.end();iter++) { if(*iter<min) min = *iter; }return min; }};int main(){Solution test;vector<int> num;num.push_back(3);num.push_back(4);num.push_back(5);num.push_back(1);num.push_back(2);int result = test.minNumberInRotateArray(num);cout<<result<<endl;return 0;}
0 0
- 剑指offer6 旋转数组的最小数字
- 【剑指offer】旋转数组的最小数字
- 剑指offer--旋转数组的最小数字
- 剑指offer--旋转数组的最小数字
- 剑指offer:旋转数组的最小数字
- 《剑指offer》旋转数组的最小数字
- 剑指 offer:旋转数组的最小数字
- 剑指offer-旋转数组的最小数字
- 剑指offer 旋转数组的最小数字
- 【剑指offer】旋转数组的最小数字
- 剑指offer 旋转数组的最小数字
- 剑指offer-旋转数组的最小数字
- 剑指Offer:旋转数组的最小数字
- 剑指Offer 旋转数组的最小数字
- 剑指offer|旋转数组的最小数字
- 剑指offer:旋转数组的最小数字
- 【剑指offer】旋转数组的最小数字
- 《剑指offer》旋转数组的最小数字
- C++学习视频51集完整版
- Spark on Yarn遇到的几个问题
- (三十八)浮点类型
- OpenCV基本数据格式
- iOS LLDB调试器和断点调试
- 剑指offer6 旋转数组的最小数字
- html5系列:利用html5 file api读取本地文件(如图片、PDF等)
- springmvc+mybatis+sql server实现简单登录功能
- Intent 跳转
- Android Studio集成Genymotion插件
- C语言基础学习视频
- 优化查询
- 算法学习之Honer's Rule
- (三十九)运算符