Do we have to use binary search? I think the time complexity of following accepted solution is O(n). But please rectify me if I am wrong.

```
class Solution:
# @param {integer[]} nums
# @param {integer} target
# @return {integer[]}
def searchRange(self, nums, target):
start = -1
length = 0
for i in range(len(nums)):
if nums[i] == target:
start = i
break
for i in range(len(nums) - start - 1):
if nums[start + i + 1] == target:
length += 1
res = [start, start + length]
return res
```