Can someone please explain why the brute force approach is inefficient, i.e., O(N^2) 2 pointer approach like bubble sort etc
def find_subarrays(arr, target):
result = []
if not arr:
return result
for left in range(len(arr)):
product = arr[left]
right = left
while product < target:
result.append(arr[left:right+1])
right += 1
if right >= len(arr):
break
product *= arr[right]
return result