C / C++ Simple and Clean Solution, O(logn), With Comments
C++:\n\nclass Solution {\npublic:\n    int findMin(vector<int>& nums) {\n        int r = nums.size()-1, l = 0, mid;\n        if (!r) return nums[0]; // only one
**C++:**\n```\nclass Solution {\npublic:\n    int findMin(vector<int>& nums) {\n        int r = nums.size()-1, l = 0, mid;\n        if (!r) return nums[0]; // only one element\n\n        while (l < r)\n        {\n            mid = l + (r - l) / 2;\n\n            // got a part that is not rotated\n            if (nums[l] < nums[r]) return nums[l]; \n\n            // mid is larger than right - min is in right side\n            else if (nums[mid] > nums[r]) l = mid + 1;\n\n            // mid is smaller than right - min is in left side (including mid)\n            else r = mid;\n        }\n        return nums[l];\n    }\n};\n```\n****\n**C:**\n```\nint findMin(int* nums, int numsSize){\n    int r = numsSize-1, l = 0, mid;\n    if (!r) return nums[0]; // only one element\n\n    while (l < r)\n    {\n        mid = l + (r - l) / 2;\n\n        // got a part that is not rotated\n        if (nums[l] < nums[r]) return nums[l]; \n\n        // mid is larger than right - min is in right side\n        else if (nums[mid] > nums[r]) l = mid + 1;\n\n        // mid is smaller than right - min is in left side (including mid)\n        else r = mid;\n    }\n    return nums[l];\n}\n```\n**Like it? please upvote!**
['C']