public int findMin_lint(int[] num) {
        int begin = 0, end = num.length - 1;
        while (begin + 1 < end) {
            int mid = begin + (end - begin) / 2;
            int val = num[mid];
            if (val < num[end]) {
                // the right part is sorted
                end = mid;
            } else {
                // the right part is not sorted
                begin = mid;
            }
        }
        if (num[begin] < num[end])
            return num[begin];
        else
            return num[end];
    }