我的空间复杂度是O(N) 没有用到转动的特点 import java.util.*; public class Solution { /** * * @param A int整型一维数组 * @param target int整型 * @return int整型 */ public int search (int[] A, int target) { // write code here // 如果先存储元素+下标,再改成有序的,取到目标值之后去哈希表找到对应的下标返回即可 Map<Integer,Integer> map = new HashMap<>(); for(...