PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN
#BS0000092. Giá trị nhỏ nhất của dãy xoay (Find Minimum in Rotated Sorted Array)
HỌC THEO LỘ TRÌNH
1 lộ trìnhBài tập thuộc lộ trình
Mục lục đề ⌄
Đang đọc
Giá trị nhỏ nhất của dãy xoay (Find Minimum in Rotated Sorted Array)
Find Minimum in Rotated Sorted Array
Source: LeetCode
Version: Phuoc Hung OJ Extended
Problem Statement
A strictly increasing array of distinct integers has been rotated cyclically. Find its minimum value.
Input
The first line contains , followed by the values of the rotated array.
Output
Print the minimum array value.
Subtasks
- Subtask 1 (20 points): ; ; distinct values; a cyclic rotation of a strictly increasing array.
- Subtask 2 (30 points): ; ; distinct values; a cyclic rotation of a strictly increasing array.
- Subtask 3 (50 points): ; ; distinct values; a cyclic rotation of a strictly increasing array.
Examples
Input
5
3 4 5 1 2
Output
1
Explanation
The rotated array has minimum .