Skip to content

Latest commit

 

History

History
18 lines (15 loc) · 209 Bytes

search-in-rotated-sorted-array-ii.md

File metadata and controls

18 lines (15 loc) · 209 Bytes

Code

func search(nums []int, target int) bool {
	for _, num := range nums {
		if num == target {
			return true
		}
	}
	return false
}

Solution in mind

  • Naive linear search