A concise solution with proof in the comment
class Solution {\n    public:\n        int findMin(vector<int> &num) {\n            int low = 0, high = num.size() - 1;\n            // loop invariant: 1. low <
    class Solution {\n    public:\n        int findMin(vector<int> &num) {\n            int low = 0, high = num.size() - 1;\n            // loop invariant: 1. low < high\n            //                 2. mid != high and thus A[mid] != A[high] (no duplicate exists)\n            //                 3. minimum is between [low, high]\n            // The proof that the loop will exit: after each iteration either the 'high' decreases\n            // or the 'low' increases, so the interval [low, high] will always shrink.\n            while (low < high) {\n                auto mid = low + (high - low) / 2;\n                if (num[mid] < num[high])\n                    // the mininum is in the left part\n                    high = mid;\n                else if (num[mid] > num[high])\n                    // the mininum is in the right part\n                    low = mid + 1;\n            }\n    \n            return num[low];\n        }\n    };
['Binary Tree']