public int findMin(int[] num) {
            int length = num.length;
            
            int firstNum = num[0];
            int s = 0,
                    e = length - 1,
                    m;
            while (s < e - 1) {
                m = (s + e) / 2;
                int middle = num[m];
                
                if (middle > firstNum) {
                    s = m;
                } else {
                    e = m;
                }
            }
            
            return num[e] < firstNum ? num[e] : firstNum;
        }