A sorted array was cyclicly shifted by unknown offset. Find min element. lc
Solution
int findMin(vector<int>& nums) {
if (nums.size() == 0) return 0;A sorted array was cyclicly shifted by unknown offset. Find min element. lc
int findMin(vector<int>& nums) {
if (nums.size() == 0) return 0;| ; This is part of my AutoHotKey [1] script. When you are in Windows Explorer it | |
| ; allows you to press Alt+N and type a filename, and that file is created | |
| ; in the current directory and opened in the appropriate editor (usually | |
| ; [gVim](http://www.vim.org/) in my case, but it will use whatever program is | |
| ; associated with the file in Windows Explorer). | |
| ; This is much easier than the alternative that I have been using until now: | |
| ; Right click > New > Text file, delete default filename and extension (which | |
| ; isn't highlighted in Windows 7), type the filename, press enter twice. | |
| ; (Particularly for creating dot files like ".htaccess".) |