// https://leetcode.com/problems/find-minimum-in-rotated-sorted-array
// assuming Array has no duplicates
class Solution {
public int findMin(int[] nums) {
int start = 0;
int end = nums.length-1;
while (start < end){
int mid = start + (end-start)/2;
if (nums[mid] > nums[end]) start = mid+1;
if (nums[mid] < nums[end]) end = mid;
}
return nums[start];
}
}
var result = {};
for(var i=0;i< basearray.length;i++){
if(!result[basearray[i][0]]){
result[basearray[i][0]]={};
}
result[basearray[i][0]][basearray[i][1]]=basearray[i][2];
}