Easiest solution valid for both duplicate and non duplicate
Time complexity: O(log(n))\n\nclass Solution {\npublic:\n    int findMin(vector<int>& n) {\n        int s=0,l=n.size();\n        int e =l-1;\n        while(s<e)
Time complexity: O(log(n))\n```\nclass Solution {\npublic:\n    int findMin(vector<int>& n) {\n        int s=0,l=n.size();\n        int e =l-1;\n        while(s<e){\n            int m = s+(e-s)/2;\n            if(n[m] > n[e]) s=m+1;          // left side has small values (rotated array)\n            else if(n[m] < n[e]) e=m;       // right side has small value (not rotated)\n            else e--;                       // mid value equal to end move towards small\n        }\n        return n[s];\n    }\n};\n```
['Binary Search', 'C', 'Binary Tree', 'C++']