0
点赞
收藏
分享

微信扫一扫

Leetcode81. 搜索旋转排序数组 II


题目传送地址:​​https://leetcode.cn/problems/search-in-rotated-sorted-array-ii/​​

运行效率

Leetcode81. 搜索旋转排序数组 II_i++

代码如下:

class Solution {
public boolean search(int[] nums, int target) {
for (int i = 0; i < nums.length; i++) {
if (nums[i] == target) {
return true;
}
}
return false;
}
}


举报

相关推荐

0 条评论