Solved LeetCode program · 81 of 1,000
#0081 · Search in Rotated Sorted Array II
Original English source
The nums is a list of 2, 5, 6, 0, 0, 1, and 2. The target is 0. The found is -1.
For every position from 0 to the last position of nums.
If item position of nums is target, set found to position, then stop.
If found is not equal to -1, show true, otherwise show false.
Expected stdout
true